@mike.maxwell Is this being worked on?
Or @bangali is there another way of allowing the SONOS device to be able to do notification messages within hubitat?
@mike.maxwell Is this being worked on?
Or @bangali is there another way of allowing the SONOS device to be able to do notification messages within hubitat?
@BorrisTheCat till HE supports sonos as a speaker device use it as a media device for announcements?
No worries, what's the limitations with that? I didn't think it worked when i tried
Edit: yeah I get this error
[app:8](http://192.168.1.78/logs#app8)2018-10-31 19:47:59.470:errorjava.lang.IllegalArgumentException: Command 'playTrackAndResume' is not supported by device. on line 799 (contactClosedEventHandler)
that was for speaker device or media device?
media player
according to this both playTrackAndRestore
and playTrackAndResume
should be supported:
so not sure why playTrackAndResume would throw an error. for the device please share a screen shot of the device details.
up for editing a line of code in rooms manager?
yep just point and ill shoot
change that:
musicPlayers.playTrackAndResume(str, vol)
to:
musicPlayers.playTrackAndRestore(str, vol)
save and try.
no logs or errors and it didn't work but it did play the message that was last spoken or the last message in its track data.
but does not resume the playing track?
It resumes the existing playing track and that's it but doesn't speak your message.
ill try PlayTextandRestore
ahh … the passed in string is not spoken.
change that:
musicPlayers.playTrackAndResume(str, vol)
to:
musicPlayers.playTextAndRestore(vol, str)
save and try.
EDIT: the params are reversed on this one.
already done and tried it, it does work but it doesn't restore the music i had playing for the test.
Edit: it does increase the volume speak then restore the volume though
while the music is playing please share the state variables for sonos.
### State Variables
* restoreTrack : **0**
* restoreLevel : **0**
* restoreURI : **0**
* model : **Sonos PLAY:3**
* uri : **x-sonosapi-stream:s24939?sid=254&flags=8224&sn=0**
* trackData : **{"audioSource":"Unknown","station":null,"name":null,"artist":null,"album":null,"trackNumber":"1","status":"playing","level":"37","mute":"unmuted","uri":"x-sonosapi-stream:s24939?sid=254&flags=8224&sn=0","trackUri":"hls-radio://http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_radio_one.m3u8","transportUri":"x-sonosapi-stream:s24939?sid=254&flags=8224&sn=0","enqueuedUri":"x-sonosapi-stream:s24939?sid=254&flags=8224&sn=0","metaData":"BBC Radio 1object.item.audioItem.audioBroadcastSA_RINCON65031_","trackMetaData":"x-sonosapi-stream:s24939?sid=254&flags=8224&sn=0/getaa?s=1&u=x-sonosapi-stream%3as24939%3fsid%3d254%26flags%3d8224%26sn%3d0x-sonosapi-stream:s24939?sid=254&flags=8224&sn=0object.item"}**
if you paste the track uri as the resume track
string and click resume track on the device interface what happens?
hls-radio://http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_radio_one.m3u8
nothing
was the player stopped when you tried it?