node-sonos-http-api icon indicating copy to clipboard operation
node-sonos-http-api copied to clipboard

Alarm integration?

Open julesbike opened this issue 11 years ago • 7 comments

I have this working nicely with Openremote for home automation. One nice feature for me would be to make use of the alarm feature of sonos to kick off events. For example in the morning turn on the lights when the alarm goes off. Is this feasible? I guess you would need the json STATE to include a field with the Alarm status.

julesbike avatar Jan 26 '15 09:01 julesbike

I'm not entirely sure that it's possible to identify that an alarm is running, I would need to run some tests to be sure.

Personally I schedule "alarms" from an external server instead, giving me the possibility to start with an "alarm" preset which is a two-step alarm. First, it break out my bedroom speaker and play ambient tunes, then after 30 minutes it switches to a more upbeat playlist and group my whole system together. This kind of control is not possible with the Sonos alarm.

If you have it externally (in your case, OpenRemote), it would be easier to control the lights since OpenRemote would be in charge of the alarm. Of course, it won't allow control from the Sonos app, but maybe that isn't an issue for you.

jishi avatar Jan 26 '15 09:01 jishi

Interesting I was thinking about an external alarm - what are you using? Someone has written a basic once which works in Openremote but it really is too simple. The sonos alarm front end is quite easy to use - I do something similar using 2 alarms with separate playlists but the zones I manage outside of Sonos using Openremote and multizone amps.

julesbike avatar Jan 26 '15 09:01 julesbike

Today I'm only using a simple crontab which isn't really very user friendly :) I've had thoughts about building something like this as an add-on to the web-controller, but it's merely an idea at this point.

I would have thought that scheduling etc would be part of OpenRemote, but by the looks of it it seems kind of limited in that regard.

jishi avatar Jan 26 '15 11:01 jishi

yep openremote is limited to crontab as well...I guess as long as you are not changing alarm time every week this is fine. I found someone has done a Sonos api which picks up whether the alarm is on so it must be possible to use it as a trigger. However because you can't name alarms in Sonos it is not ideal...I was sort of hoping to have Sonos act as a neat scheduling front end. The other option is to go with google calendar and have a naming convention that could schedule actions in Openremote. At least then it could pick up school holidays etc...

julesbike avatar Jan 26 '15 12:01 julesbike

Yeah, I sort of miss the possibility to "skip" certain days ahead, when going on vacation or when there is a holiday or similar.

jishi avatar Jan 26 '15 14:01 jishi

I managed in the end to build an alarm front end to sonos using Openremote which works quite nicely so that you can turn on lights as well as music. Next step is to see if there is an api for google calendar...will let you know if I do.

julesbike avatar Feb 03 '15 21:02 julesbike

Nice to hear. I'm sure people would be interested to know how you did it, especially over at the OpenRemote forum.

Closing this though because it isn't an open issue for this project.

jishi avatar Feb 05 '15 09:02 jishi