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

set Alarm

Open milymat opened this issue 8 years ago • 9 comments

there is no possibility to add an alarm to your sonos speaker.

Could u please implement it.

milymat avatar Feb 08 '17 23:02 milymat

Adding an alarm is a fairly complex task, you need to reference time, volume and a sonos playlist, as well as specifying weekdays when it should be triggered.

It's not a good fit for the GET based url scheme I'm using, so it's dependant on me extending the protocol to include support for more complex POST calls. Leaving this around so people can vote for it though.

How would you use it? Why is the official app inconvenient for this?

jishi avatar Feb 09 '17 09:02 jishi

Thx for your answer.

I would use it to set the alarm via some home automation software. So the speaker are independent and if the home automation software crashed the alarm still works.

My suggestion: You could use something like: http://...//Alarm/HH/MM/PLAYLIST to set a simple alarm once

Check out these implementation, maybe I could help: https://github.com/bencevans/node-sonos/blob/master/lib/services/AlarmClock.js

milymat avatar Feb 09 '17 10:02 milymat

I created my own alarn system using the npm package node-scheduler. It is pretty easy to set up a schedule and then run whatever you code you want when the timer hits. https://www.npmjs.com/package/node-schedule

Burnett2k avatar Feb 17 '17 13:02 Burnett2k

I'm interested in seeing this functionality. I'm working on a private voice assistant and being able to call this rest api to set an alarm would be ideal.

jcacavias avatar May 16 '18 22:05 jcacavias

I'm also very interested in this feature. It's the only thing i'm missing. Sometimes I have shift work with different start times. I would be very usefull to set the sonos alarm clock with my homeautomation.

Blockmove avatar Dec 02 '18 18:12 Blockmove

Also very interested in this feature (getAlarm, setAlarm, deleteAlarm).

honato11 avatar Feb 12 '19 13:02 honato11

One inconvenient of Sono, is that you have to be on site to manage them, and the alarms. Should it be possible to develop an interrogation returning a son with all alarms set ? And, as I do understand is is quite complex to create a new alarm, we could just modify one existing §volume, active, day(s), time) ? This should be very nice, so we could set this up remotely.

vjooris avatar Jun 09 '19 21:06 vjooris

@jishi: Would it be possible to at least add a simple command to the existing API that lets one enable/disable existing alarms set up in the Sonos system?

Something like:

  • /[Room name]/alarm/[time]/[state] e.g. /Bedroom/alarm/06-30/off

And similar to the "sayall"-endpoint:

  • /alarmall/[time]/[state] e.g. /alarmall/08-00/on

I would love to be able to use a handy IoT-button on my nightstand to quickly turn on/off my alarms. :smile:

Thanks a bunch for the project anyway!

4ch1m avatar Feb 15 '20 14:02 4ch1m

Yes, please add this feature so that I can trigger my phone alarm, hue lights and Sonos music all with one command dependent on the random time I need to wake up the following morning! Thanks

matthewchubb avatar Dec 11 '20 22:12 matthewchubb