Sonos Play URL card keeps repeating

Heyas Homeys,

I have an issue where playing URL sound card on a Sonos device keeps repeating. I tried cards with and without volume setting. I am using this both for playing google cloud TTS URLS and internal soundboard URLs. I have to actively stop the Sonos speaker for the sounds to stop repeating.
Even if I insert a “repeat off” card from the Sonos app, it doesn’t help.
It is super annoying. Any ideas?

Probably the URL is triggered again when the audio-URL is finished.
Try to test your flow by using another trigger to find out if that is the course of the problem.

1 Like

Thank you, @JPe4619 Jan,

that URL trigger definitely plays a role. When I play regular sounds with a preset URL, nothing repeats. Like so:

In the previous flow example I need the trigger - it is the only way to know when google TTS has done its job and is ready with the URL. I will check back in the Google services thread with @Arie_J_Godschalk to see how I can use the trigger without triggering the flow multiple times.

Could you log something after the trigger? Because i am not familier with the trigger triggering repeatedly.

You can check a variable if it is SET, if not, SET the variable and run the flow. At a later moment, reset the variable.

Hiyas again @JPe4619 Jan,

logging showed it wasn’t the URL trigger. Triggers only once.
This is what happens. I cast the URL and then the Sonos mobile app thinks it is playing a radio station and stays on, looping the URL. Looks like this:

I can klick the pauze button on the device to stop it. A flow with a pauze card from the Sonos app works as well, same as the pauze button.

Does this make sense? Is this behavior as intended? Is there a way to cast a URL that plays only once? It is possible to use countdown timer to pause the Sonos device after the URL speech duration expires. But I’d like to know if there is a cleaner way to do this. If I cast this speech URL, interrupting a radio station that is running, or the sound off the TV (the device is an ARC), pausing Sonos is probably not what I want to be doing.

  • edit: to let you know why it is important to me. Both soundboard sounds (internally referenced via URL so I can cast to Sonos as well as Chromecast) as well as google TTS has this repeating issue - basically all the fun I intended to have with Homey and Sonos.

Hiyas again, some new findings.

I tried a few mobile applications that play songs, in order to turn on and off the repeat setting. When I now a send a “play URL at volume” card, it plays only once. I am not exactly sure how I did it. After that, I played around with the mobile apps and the Sonos app repeat card, but I couldn’t reproduce the behavior!
It plays once now, however its stops whatever is currently playing and you can see that the source has changed in the Sonos mobile app.

Now the funny part. I have been testing on my living room playbar, which is an older system. I just sent it to a new one, an arc in my bedroom and I got a big surprise. Not only does it play the URL only once, also it mixes it in with the playing TV sound or Spotify list (muting it), so you hear both, but the URL card message more clearly. The original stream returns to its normal volume when the URL card is done. Apparently the newer playbar knows how to deal with multiple sources.

Conclusion, I am giving up on the old arc, stop testing with it, stop annoying you all here.

Maybe, hopefully, these obscure details will be useful to someone in the future :slight_smile:
Thanks a lot!

3 Likes