Getting "Speak Text and Resume" to Properly Work (possibly Google Home specific)


#1

1) Give a description of the problem
I’m trying to figure out how to properly continue playing music on my speakers (Google Home) after a TTS notification has been sent to it. I have my Google Home devices showing up at SmartThing devices (including the audio groups I’ve set up). I can properly send notifications to my speakers (using node.js logic) but, if there is music playing on the speakers, it never resumes even if I have “Speak Text and Resume” selected. I’ve also tried with “Speak Text and Restore” (without the attribute trick noted in the next paragraph).

I found https://community.smartthings.com/t/capture-and-restore-music-player/73555/30 which suggested to save attributes to a local variable, speak text, restore attributes. However, I’m not sure how to properly set this up in webCoRE. The screenshot below is my first stab at it. I’m hoping the experts here can correct my mistakes.

2) What is the expected behavior?
If playing music on the speaker defined and the event fires to send a TTS notification, I would like the music playing to resume where it left off.

3) What is happening/not happening?
Event fires, TTS happens as expected, but music does not continue. Logs indicate a command cannot be found.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)

12/23/2017, 5:33:10 PM +652ms
+1ms	╔Received event [Contact Sensor 2t].contact = closed with a delay of 142ms
+160ms	╚Event processed successfully (160ms)
12/23/2017, 5:32:55 PM +97ms
+0ms	╔Received event [Home].time = 1514079176174 with a delay of -1078ms
+280ms	║Could not find a command to set attribute 'status' to value 'Ready to cast'
+296ms	║Could not find a command to set attribute 'trackData' to value '{}'
+306ms	║Could not find a command to set attribute 'trackDescription' to value 'Ready to cast
+306ms	║--'
+349ms	╚Event processed successfully (349ms)
12/23/2017, 5:32:43 PM +803ms
+0ms	╔Received event [Contact Sensor 2].contact = open with a delay of 61ms
+2375ms	║Setting up scheduled job for Sat, Dec 23 2017 @ 5:32:56 PM PST (in 9.997s)
+2383ms	╚Event processed successfully (2383ms)
12/23/2017, 5:32:29 PM +69ms
+1ms	╔Starting piston... (v0.2.100.20171211)
+319ms	║Subscribing to Contact Sensor 2.contact...
+447ms	╚Piston successfully started (446ms)

#2

I was hoping someone could help me out with this issue. I shouldn’t have posted it right before the holiday so hopefully bumping it can get a suggestion for how to resolve this.


#3

Hey there,

Not convinced restore or resume work. I tried a variation of this “and resume” but I also found this, First ever Piston - not quite working

Cheers,
BDB


#4

I am using this, a little advanced, but always works. And yes you can change the volume of the speakers.


#5

Have you confirmed that your script will pause actively playing content, announce the TTS, and resume the original content? Which devices and media types have successfully been able to resume after TTS?

In my case, a quick test with your code stopped an active YouTube video (on a Gen1 ChromeCast), played the TTS successfully, but instead of resuming it just hangs at the node.js ‘cast’ screen until it goes idle.

THX


#6

Well it works when I am playing music. It speaks through my Samsung speakers then the music resumes. But nothing with automation is the same on two different setups. Now I am not using Google home.


#7

@joelw135 what device handlers are you using for the Samsung speakers? And what type of music resumes? Music you’re playing from the multiroom app? Or TuneIn radio?


#8

Good info; Samsung may have a local “What was I doing before that event came in?” ChromeCast may not have that, maybe for security reasons we can’t ‘store’ the old stream state, and ‘resume’ it after.

Google Home streaming Google Play Music also did not resume after a TTS event.


#9

For me resume was a pain in the butt. I have my speakers playing text when events happen, and sometimes the music would start playing while on the phone or even sleeping. I turned it off.


#10

It seems to be a Webcore event. If I start playing a song from my media server (Kodi) and then trigger a “Speak Text Resume”, the song re-starts from the beginning after the TTS.


#11

Hi @joelw135

I’m trying to do exactly the same thing. I am playing the music through a Samsung Multiroom speaker and am getting unreliable results.

Whether or not it works correctly seem to depend on how i’m playing the music to the speaker.

For example, if i am using TuneIn through the Samsung Multiroom app the ‘speak text’ command works but doesn’t resume the music. If I’m playing through deezer in the Samsung app nothing seems to work.

If is use ‘speak text and resume’ it will resume the last TuneIn station i was listening to - even if nothing is playing at the time.

Interested to know what audio sources you are using when these audio notifications play.

Thanks,

Neil


#12

I lost the connectivity to my Google Home and have been out of tinkering with my SmartThings Hub until recently so I was able to fix my integration to get my speakers working again with the TTS. However, it seems like the “Speak text and resume” still doesn’t work. Is this an issue that can be fixed via WebCoRE? Is it a fix in a device handler or smartapp I’m using for TTS? Or is this more of a Samsung issue that they need to fix (no idea if it’s even been reported or is on a roadmap)?


#13

I know this is an old post, but I couldn’t get resume working either.

What I ended up doing was putting a new Home Mini (that i had way too many of from cheap sales) in each room, added to a casting group, disabled the mic and notifications and everything else I could find in the settings, and then I speak text to that group.
It eliminates any issues of music not restarting, and I can set the volume specifically for the alerts without affecting music also.