Novice help request for playing a track on Sonos

I want to play a track from any cloud service on my Sonos triggered by a rule. TTS is easy and works consistently well for custom voice announcements. I've searched the community posts and have not found a simple step-by-step process for playing a track from Amazon Music, Spotify, or any other cloud source. Is there a way to do this?

I'm running HE version 2.1.5.124. I have Sonos Integration installed.

Playing tracks through the Sonos integration on demand, is kind of a pain. I have managed to use a Rule to start playing a Pandora Radio Station on my Play:3 at night, by using the suggestion by @mike.maxwell in the link below (not exactly a specific track...):

There are also some clues in this thread that might help:

I haven't dug around enough, but based on all the threads on this subject, it seems like there should be a HOWTO: around here someplace...

S

1 Like

Thanks. That gives me a start and as I suspected, it is not a very straightforward process. I appreciate your providing the two links to the discussion threads.

If you have a RPi or anything that can run node servers, then look into: node-sonos-http-api.

It integrates using @ogiewon's http-momentary-switch, to play favorites from Sonos, and lots of other functions.

One of those functions is a search function, and @homeauto2112 came up with this great method to use the Hubitat Dashboard to search for an play specific artists from a Sonos-connected music source. @homeauto2112 uses it for Apple Music; I use it for my own Music Library.

I’ve been trying to figure this out for OVER A YEAR.

TTS works 100%, but TTS to ANY Playlist has NEVER worked for me. I had it working ONCE but that seemed to have been the night the stars were perfectly aligned.

After a year, I have no more patience to troubleshoot further. The forums are ZERO help because it’s a congested HOT MESS and gives me a headache. NO.

If you use Node-Red, it's pretty easy. But Node-Red is a rabbithole. And it's rather deep.

This is my Sonos page. The yellow highlight is a local end point within Node-Red that is called by Hubitat for playing (in this case) a queue.