Sonos Integration to play music

Hello Community, I am very new to Hubitat, so please excuse any lack of knowledge. I would like to have a Dashboard button that plays classic rock in my office (Sonos amp) from my Spotify account.

I have the Sonos integration working with my water leak detection workflows to announce and shut down the water main. Works very nicely.

I found through reading from this community that I can integrate 'node-sonos-http-api' from Jishi on GitHub, but I am having an issue installing it on a Raspberry Pi 5, which is not why I am here. I think I have a known issue that version 5 is causing, and I need to wait for Jishi and the team to fix it when he has time.

I would appreciate it if someone could show me a straw man configuration through the Apps and Rules engine so that I can possibly make this happen.

Once I get my Sonos speakers playing, I can start and stop the songs through my Dashboard buttons, but I would like to know more about how to make it more interactive.

Thanks, Don - very curious for sure just not a developer. However, I can follow Rules...

What do you usually tell Spotify to play? A playlist? Specific albums?

I would tell Spotify to play a playlist like Eric Clapton's music.

I mostly use Hubitat’s Sonos integration for voice announcements like you mentioned.

But if you can get the Spotify URI for any playlist of interest, I believe Hubitat can start that playlist directly. No need to run anything else on a RPi.

This might work... :thinking:

1 Like

@Ranchitat - I loaded the Sonos Favorites Support (SFS) and the Sonos Integration.
I now see the new device from SFS and have control of the music.

Now I would like to have a tile that allows me to play/pause/stop the music chosen.

Then, on the Dashboard, I see the new device (a big win for sure). But the tile on the left is the result, and I do not have play/stop control. What am I doing wrong? It could be a keyboard actuator error.

I greatly appreciate any direction you can provide.

Thanks,
Don (Noob)


Sorry, I just use Google to control the Sonos.

But, I think you could do that with two dashboard tiles, one music player tile to control the Sonos and another switch tile (with custom name/icon) to launch the playlist.