Initialize Sonos?

I set the Action event of my door contact sensors to play a track on my PC. For example: "Front door just opened." This works for the most part but not always.

When the speaker hasn't played anything in say 30 minutes or so, sometimes it plays the track but sometimes it doesn't. I open the door: nothing. I open the door a 2nd time, it plays the track. And yet other times, it plays the track the first time.

I thought I fixed this with a clunky set of actions but still, sometimes when no action has been performed for a while, Sonos refuses to play the track.

Is there a way to initialize the speaker? I didn't see anything. Is there some syntax I'm missing or some order of actions? Anything?

Obviously, a burgler is not going to open the door twice in the middle of the night so if Sonos can't play the track on the first time the door opens, it's useless.

Here's what I tried that seems to work most of the time but not 100% of the time.

Is your speaker connected via Ethernet cable or uses Wi-Fi? But first, have you checked your Past Logs immediately after a missed play to see what happened at the time the track didn't play as expected (you may want to turn the logging on for both your devices and the app)?

Since you asked whether connect via Ethernet or Wifi, I will do a little experiment and see if it makes a difference and then I will get back to you. Also will enable logs for apps AND devices. Thank you for the help!

1 Like

It's been a few days and I tried the sonos wireless and wired. I thought wireless might be the problem. I wired the sonos direct to the router yesterday and right off the bat this morning, first time I opened the front door: nothing. Second time, sonos played the track.

So here are the corresponding sonos logs from when I opened the door twice, the first time nothing played and the second time the track did play:

And here are the corresponding contact sensor logs from the two times I opened the door, which look fine:

I'm baffled. If nobody else has this problem, I'm doing something wrong. Surely others are playing tracks rather than using TTS?

It is baffling. Based on the logs, everything on the Hubitat side works as expected. And yes, I am playing tracks, but I am serving them from the hub. Maybe that is the issue. Try loading the mp3 on the hub then use that track instead. Settings >> File Manager.

Thanks for that. I put an MP3 on the hubitat but don't know how to add the hubitat to the sonos library.