ioBroker / ioBroker.sonos

Control and monitor SONOS player from ioBroker
MIT License
37 stars 19 forks source link

Get List of alarms -> Smart Home Automation #65

Open ScherzHerzog opened 4 years ago

ScherzHerzog commented 4 years ago

Dear Developers of this awesome Plugin,

this is basically no issue but a feature request. Is it possible to read the set sonos alarms and put them into objects?

Goal is to start my HUE wakeup light a few minutes before the sonos musik in my bedroom starts.

Thank you very much!

ScherzHerzog commented 4 years ago

A short update on this: In FHEM this is already possible - you can get the reading "AlarmList" per Sonos Speaker. This gives a long string with all alarms:

'1713' => {'Recurrence_Monday' => 1,'RoomUUID' => 'RINCON_5CAAFD798FBE01400','Recurrence_Thursday' => 1,'IncludeLinkedZones' => '1','ProgramURI' => 'x-sonosapi-stream:s17488?sid=254&flags=8224&sn=0','StartTime' => '07:10:00','Duration' => '02:00:00','ProgramMetaData' => '95.5 Charivari</dc:title>object.item.audioItem.audioBroadcast</upnp:class>SARINCON65031','Enabled' => '1','Recurrence_Friday' => 1,'Recurrence_Wednesday' => 1,'Shuffle' => 1,'Recurrence_Tuesday' => 1,'Recurrence_Sunday' => 0,'Recurrence_Saturday' => 0,'Volume' => '10','Repeat' => 1,'Recurrence_Once' => 0},'51' => {'Recurrence_Monday' => 0,'RoomUUID' => 'RINCON_5CAAFD798FBE01400','Recurrence_Thursday' => 0,'IncludeLinkedZones' => '1','ProgramURI' => 'x-sonosapi-stream:s17488?sid=254&flags=8224&sn=0','StartTime' => '07:10:00','Duration' => '02:00:00','ProgramMetaData' => '95.5 Charivari</dc:title>object.item.audioItem.audioBroadcast</upnp:class>SARINCON65031','Enabled' => '1','Recurrence_Friday' => 0,'Recurrence_Wednesday' => 0,'Shuffle' => 1,'Recurrence_Tuesday' => 0,'Recurrence_Sunday' => 1,'Recurrence_Saturday' => 1,'Volume' => '12','Repeat' => 1,'Recurrence_Once' => 0}}

This could be put in Objects and used further.

Headhunter70 commented 4 years ago

Hi, I also support the idea of having Alarms under the object tree. From here we can switch them off and on and have it added to Homekit via yahka, which would allow us to start a playlist or a certain radio-station.