Hi all,
I ran into this 'Sonos won't resume after TTS' issue that a lot of people seem to have come across.
Every thread I read seems to have not found a resolution and been closed.
After messing around with it I've found a fix that works for me.
My own need was to:
- Have a streaming radio station either paused or playing.
- I set my alarm with HSM and Mode changes to AWAY.
- Stop the stream (If playing), and play an alarm exit message by TTS at volume 50.
- Reduce volume to 14.
- Restore the radio stream but keep stopped.
This way when I return home I can just press play on the Sonos and it will play the radio stream, at level 14. Not repeat the TTS at level 50.
As others have found the Resume/Restore/Play Text And Restore etc don't work.
I played the radio station I usually listen to and in the device info for the Sonos I copied the stream URL.
Then created the following in Rule Machine:
Trigger Event-
Mode becomes Away
Actions-
Sonos:Stop
Speak on Sonos (Volume:50): 'Alarm Setting.'
--> delayed: 0:00:02
Sonos --> Set Level to 14
--> delayed: 0:00:08
Sonos: Set Track: 'radio stream URL'
--> delayed: 0:00:12
The above is what the end result rule looks like but if anyone wants me to elaborate on options selscted when creating the rule let me know.
This has been working great so far.
The delays are necessary to allow each part of the rule to execute without overlaps, and the stop command at the start I added because there was a slight delay in stopping the radio stream if it was playing due to the buffer and this stopped the rule from running. Adding a Stop first solved this.
This of course is limited to using the same resume content each time which for me is fine.
I think the issue with resuming whatever was playing before is down to the fact the Sonos knows what it's previous state was but HE doesn't remember it.
To make that work we'd need some kind of 'GET' command to first grab the current state and then we can set the track again after our rule. Maybe a job for Variables? I haven't got into that much yet but I'll keep playing around with it.
Anyway, just thought I'd share.
Hope it helps someone.