Sonos - Search Music Using a Dashboard Tile

I was able to finally create a dashboard tile to allow searching with my Sonos setup. I am using the node-sonos-http-api running on a Mac mini.

I am also using the variable-connector that Bruce demonstrated in the August 22 Hubitat Live Episode. He starts explaining it around 6:35 into the episode.

19%20PM

The actions for the rule are fairly simple.

  1. The first is to take any spaces and replace them with a "+". This was part of the API requirements.
  2. The second is to pause the current music
  3. This will clear the queue. Depending on your config, you could have 50 or more songs in the current queue.
  4. This sends the request***

*** One gotcha I ran into was not being able to use a multi named room in #4. I wasn't able to find a way to cover the space in the URL. I tried things like /Family Room/ and /Family%20Room/ and both failed. Hopefully someone can come up with the magic answer for that.

There are other services by apple that can be used and that is up to your configuration.

Hope this helps someone.

3 Likes

First off - thank you very much! Owe you a drink.

Second, I don't have Apple Music; however, this URL works perfectly for me to start playing music by Axelle Red ....

http://192.168.1.4:5005/Master%20Bedroom/musicsearch/library/song/axelle+red

No explanation why the %20 worked for me .....

Scratch that. Cannot get it to work again.

Could you use HTTP Momentary Switch for your #4 command? Set up the command in the switch and then turn on the switch?