Playing specific SiriusXM channel on Sonos through HA

Good day all,

I cannot find any good working examples of using HA + the Sonos integration to kick off playing a specific channel on Sirius (either by name or channel number)

I’ve even looked into the “sonos plus” Node-Red palette and no dice there either…

Anyone got some pointers on how to accomplish this? I’d love to be able to make starting up a Sirius station throughout the house as part of my global morning routine.

Thanks in advance!

Did u figure this out? Have the same question

I found this : https://github.com/andrew0/SiriusXM

Suspect I can add HLS streams using Stream - Home Assistant (or maybe using Media Extractor - Home Assistant)

Going to play with it over the weekend.

Progress???

After lots of banging my head against the wall for weeks trying to get this working I have found a way to reliably play a SiriusXM channel on Sonos via HA and associating that station with a button on a Lovelace dashboard, and it’s really not that hard. Note that I am using the SiriusXM Canada option in the Sonos App for this. It SHOULD work for others but I have no way of testing that.

Tons of thanks to the people involved in this post and in this one: Media Browser and Sonos Player - #22 by heartkingz. These really helped me get the ideas together for this solution.

These are the step-by-step instructions to get this working:

  1. If you haven’t associated your Sonos speakers with HA then do that first (that’s beyond the scope of this note and there are LOTS of examples to do that).
  2. If there is ANYTHING playing on your Sonos speakers make sure to stop it using HA before you start this configuration or else these notes won’t work.
  3. Make sure that the SiriusXM option is activated in the SONOS APP (on iOS) and that you are logged into the SiriusXM option and can play a SiriusXM station through your Sonos speakers via the SONOS APP.
  4. Get the SiriusXM station that you want playing on your Sonos speakers using the SONOS APP
  5. In HA, go to Developer Tools | States and select a Sonos speaker entity.
  6. Copy the entry for “media_content_id:” (excluding the words “media_content_id:” and the “>” if present). This is going to be an entry starting with “x-sonosapi-hls:Api%3…”
  7. Paste that content into the Content ID field of a Media Button Card (among others).
  8. Add “-static” to the entry so that it says “x-sonosapi-hls-static:Api%3…” (<=THIS IS CRITICAL)
  9. Set the Content Type to “music”
    That’s it. It works!! (At least it does for me as of May 10, 2023).

This is using HA 2023.3.6 with Supervisor 2023.4.1 under HAOS 9.5.

2 Likes