Hi,
I’ve got some problems with the method “notificationsound” while SONOS is playing radio from TuneIn.
While notificartionsound delivers, when I’m listening to eg Spotify (Track is paused, Volume changes to NotificationVolume, Sample is played, Volume is restored and Track continues) it works.
While listening to a radio-station from TuneIn just nothing happens.
I also tried “notificationsound” with SONOS just playing nothing and an empty playlist: here the notificationsound also works as supposed.
I started playing around in a sample-rule, eg by using the “tuneinstationid”-method to circle in on the problem, but still without a success.
Does anyone of yours had a similar problem and was able to solve it?
Thanks in advance,
Alexander
Things:
Thing sonos:PLAYBAR:RINCON_5CAAFD16124201400 "Sonos Playbar (Arbeitszimmer)" [udn="RINCON_5CAAFD16124201400", refresh=60, notificationVolume=100]
Thing sonos:PLAY1:RINCON_949F3E72A57C01400 "Sonos Play:1 1/2 (Arbeitszimmer)" [udn="RINCON_949F3E72A57C01400", refresh=60, notificationVolume=100]
Thing sonos:PLAY1:RINCON_949F3E72A61201400 "Sonos Play:1 2/2 (Arbeitszimmer)" [udn="RINCON_949F3E72A61201400", refresh=60, notificationVolume=100]
Thing sonos:PLAYBAR:RINCON_B8E9377F8BB501400 "Sonos Playbar (Kinderzimmer)" [udn="RINCON_B8E9377F8BB501400", refresh=60, notificationVolume=100]
Thing sonos:PLAY1:RINCON_949F3E07EAEA01400 "Sonos Play:1 (Badezimmer)" [udn="RINCON_949F3E07EAEA01400", refresh=60, notificationVolume=100]
Thing sonos:CONNECT:RINCON_B8E9379B6FD401400 "Sonos Connect (Wohnzimmer)" [udn="RINCON_B8E9379B6FD401400", refresh=60, notificationVolume=100]
Items:
Group Sonos "Sonos Soundsystem" <"speaker-black"> (Home)
Group WZ_Sonos (Sonos)
Group AZ_Sonos (Sonos)
Group KZ_Sonos (Sonos)
Group BZ_Sonos (Sonos)
Group:Number:AND Sonos_Coords (Sonos)
Group:Dimmer:AVG Sonos_Volumes (Sonos)
String Sonos_Summary "Sonos [%s]"
String Sonos_CONNECT_Wohnzimmer_Add "Add [%s]" <sonos_add> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:add"}
Switch Sonos_CONNECT_Wohnzimmer_SetAlarm "Set Alarm" <sonos_alarm> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:alarm"}
String Sonos_CONNECT_Wohnzimmer_AlarmProperties "Alarm Properties [%s]" <sonos_alarm_prop> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:alarmproperties"}
Switch Sonos_CONNECT_Wohnzimmer_AlarmIsrunning "Alarm is running" <sonso_alarm_run> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:alarmrunning"}
Player Sonos_CONNECT_Wohnzimmer_Control "Control" <sonos_control> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:control"}
String Sonos_CONNECT_Wohnzimmer_CurrentAlbum "Album [%s]" <sonos_album> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:currentalbum"}
String Sonos_CONNECT_Wohnzimmer_CurrentArtist "Artist [%s]" <sonos_artist> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:currentartist"}
String Sonos_CONNECT_Wohnzimmer_CurrentTitle "Title [%s]" <sonos_title> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:currenttitle"}
String Sonos_CONNECT_Wohnzimmer_CurrentTrack "Track [%s]" <sonos_track> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:currenttrack"}
Switch Sonos_CONNECT_Wohnzimmer_Shuffle "Shuffle" <sonos_shuffle> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:shuffle"}
String Sonos_CONNECT_Wohnzimmer_Repeat "Repeat [%s]" <sonos_repeat> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:repeat"}
String Sonos_CONNECT_Wohnzimmer_Favorite "Favorite [%s]" <sonos_favorite> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:favorite"}
Switch Sonos_CONNECT_Wohnzimmer_Led "Led" <sonos_led> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:led"}
Switch Sonos_CONNECT_Wohnzimmer_LocalCoordinator "Local Coordinator" <sonos_coordinator> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:localcoordinator"}
Switch Sonos_CONNECT_Wohnzimmer_Mute "Mute" <sonos_mute> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:mute"}
String Sonos_CONNECT_Wohnzimmer_NotificationSound "Notification Sound [%s]" <sonos_notification> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:notificationsound"}
Dimmer Sonos_CONNECT_Wohnzimmer_Notificationsoundvolume "Notification Sound Volume" <soundvolume> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:notificationvolume"}
String Sonos_CONNECT_Wohnzimmer_PlayPlaylist "Play Playlist [%s]" <sonos_playlist> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:playlist"}
Switch Sonos_CONNECT_Wohnzimmer_PlayQueue "Play Queue" <sonos_que> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:playqueue"}
Number Sonos_CONNECT_Wohnzimmer_PlayTrack "Play Track" <sonos_play_track> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:playtrack"}
String Sonos_CONNECT_Wohnzimmer_PlayURI "Play URI [%s]" <sonos_play_uri> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:playuri"}
Switch Sonos_CONNECT_Wohnzimmer_PublicAddress "Public Address" <sonos_publiv> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:publicaddress"}
String Sonos_CONNECT_Wohnzimmer_Radio "Radio [%s]" <sonos_radio> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:radio"}
String Sonos_CONNECT_Wohnzimmer_Remove "Remove [%s]" <sonos_remove> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:remove"}
Switch Sonos_CONNECT_Wohnzimmer_Restore "Restore" <sonos_restore> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:restore"}
Switch Sonos_CONNECT_Wohnzimmer_RestoreAll "Restore All" <sonos_restore_all> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:restoreall"}
Switch Sonos_CONNECT_Wohnzimmer_Save "Save" <sonos_save> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:save"}
Switch Sonos_CONNECT_Wohnzimmer_SaveAll "Save All" <sonos_save_all> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:saveall"}
Number Sonos_CONNECT_Wohnzimmer_Snooze "Snooze" <sonos_snooze> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:snooze"}
Switch Sonos_CONNECT_Wohnzimmer_StandAlone "Stand Alone" <sonos_stand_alone> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:standalone"}
String Sonos_CONNECT_Wohnzimmer_State "State [%s]" <sonos_state> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:state"}
Switch Sonos_CONNECT_Wohnzimmer_Stop "Stop" <sonos_stop> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:stop", autoupdate="false"}
Dimmer Sonos_CONNECT_Wohnzimmer_Volume "Volume" <soundvolume> (WZ_Sonos,Sonos_Volumes) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:volume"}
String Sonos_CONNECT_Wohnzimmer_ZoneGroupID "Zone Group ID [%s]" <sonos_zone> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:zonegroupid"}
String Sonos_CONNECT_Wohnzimmer_ZoneName "Zone Name [%s]" <sonos_zone> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:zonename"}
String Sonos_CONNECT_Wohnzimmer_Coordinator "Coordinator [%s]" <sonos_coordinator> (WZ_Sonos,Sonos_Coords) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:coordinator"}
Number Sonos_CONNECT_Wohnzimmer_SleepTimer "Sleep Timer" <sonos_sleep_timer> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:sleeptimer"}
String Sonos_CONNECT_Wohnzimmer_CurrentAVtransportURI "AV transport URI [%s]" <sonos_uri> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:currenttransporturi"}
String Sonos_CONNECT_Wohnzimmer_CurrenttrackURI "track URI [%s]" <sonos_uri> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:currenttrackuri"}
String Sonos_CONNECT_Wohnzimmer_tuneinstationid "TuneIn Station [%s]" <sonos_tuneinid> (WZ_Sonos) {channel="sonos:CONNECT:RINCON_B8E9379B6FD401400:tuneinstationid"}
Sample-Rule:
rule "Sonos Test Rule"
when
Item GF_Sonos_Test changed
then
if (GF_Sonos_Test.state == ON) { //
logInfo("sonos_test.rules", "Sonos-Test spiele Notification")
if (Sonos_CONNECT_Wohnzimmer_tuneinstationid.state === NULL) {
Sonos_CONNECT_Wohnzimmer_NotificationSound.sendCommand("http://192.168.0.111/Public/sounds/doorbell.mp3")
} else {
logInfo("sonos_test.rules", "Sonos-Test spielt Radio - Sonderbehandlung")
Sonos_CONNECT_Wohnzimmer_Save.sendCommand("ON")
Sonos_CONNECT_Wohnzimmer_NotificationSound.sendCommand("http://192.168.0.111/Public/sounds/doorbell.mp3")
Sonos_CONNECT_Wohnzimmer_Restore.sendCommand("ON")
}
} else {
logInfo("sonos_test.rules", "Sonos-Test spiele Sound")
//Sonos_CONNECT_Wohnzimmer_PlayURI.sendCommand("http://192.168.0.111/Public/sounds/doorbell.mp3")
}
end