hklages / node-red-contrib-sonos-plus

A set of Node-RED nodes to control SONOS player in your local network.
MIT License
75 stars 14 forks source link

Problem playing Spotify uri #263

Closed cwesterfield closed 1 year ago

cwesterfield commented 1 year ago

I'm getting an error with the imported examples that say for node "group.queue.urispotify"

group.queue.urispotify:Sonos error on AddURIToQueue UPnPError 800 (Command not supported or not a coordinator)

I have verified with player.get.role that my dining room sonos is the coordinator, so I don't think thats it.

Does the spotify command only work with S2 setups? Mine is still on S1, so I thought maybe that would kick a not supported error.

[{"id":"5052113f.0e8e5","type":"inject","z":"e71f7711.a7ce08","name":"insert_spotify_uri Track","props":[{"p":"payload","v":"spotify:track:5AdoS3gS47x40nBNlNmPQ8","vt":"str"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"spotify:track:5AdoS3gS47x40nBNlNmPQ8","payloadType":"str","x":1179,"y":1996,"wires":[["634d07c2.0a4e08"]]},{"id":"2c0f1d3a.1fce12","type":"inject","z":"e71f7711.a7ce08","name":"insert_spotify_uri TopTrack","props":[{"p":"payload","v":"spotify:artistTopTracks:1dfeR4HaWDbWqFHLkxsg1d","vt":"str"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"spotify:artistTopTracks:1dfeR4HaWDbWqFHLkxsg1d","payloadType":"str","x":1189,"y":2028,"wires":[["634d07c2.0a4e08"]]},{"id":"bb67878e.ba03c8","type":"inject","z":"e71f7711.a7ce08","name":"insert_spotify_uri Album","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"spotify:album:1TSZDcvlPtAnekTaItI3qO","payloadType":"str","x":1179,"y":2060,"wires":[["634d07c2.0a4e08"]]},{"id":"634d07c2.0a4e08","type":"sonos-universal","z":"e71f7711.a7ce08","confignode":"6265ac283050ebe8","command":"group.queue.urispotify","state":"","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":1439,"y":2060,"wires":[["826347186274c7f3"]]},{"id":"826347186274c7f3","type":"debug","z":"e71f7711.a7ce08","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1630,"y":2000,"wires":[]},{"id":"a1883693.ffe118","type":"comment","z":"e71f7711.a7ce08","name":"SONOS-Queue Spotify","info":"","x":1179,"y":1964,"wires":[],"icon":"node-red/alert.svg"},{"id":"6265ac283050ebe8","type":"sonos-config","name":"Dining Room","ipaddress":"10.0.1.187"}]
hklages commented 1 year ago

Hi. I don't have any S1 SONOS to test but so far I haven't heard about any issues. Spotify uses regions, default in this package is set to Europe. Where do you live, or more precise where do you have your Spotify account?

For non Europe try this

cwesterfield commented 1 year ago

Setting the region has cleared the errors and I can now add spotify things to the queue. I have two spotify accounts tied to our sonos, is there a way to specify which one is used?

hklages commented 1 year ago

Don't think so. Can you do that in the Sonos App?

cwesterfield commented 1 year ago

Not in the app, but apparently in home assistant.

hklages commented 1 year ago

What integration in home assistant do you use? Spotify or Sonos? Can you point me to the documentation? Do you need Spotify developer account?

cwesterfield commented 1 year ago

I use this one https://www.home-assistant.io/integrations/spotify

It does look like developer is needed.

hklages commented 1 year ago

Understand. That's not possible with this package.

What would you like to achieve? Are there any private playlists you do not want to make available for your other account?

cwesterfield commented 1 year ago

Oh no, this is a minor thing. It's mostly the spotify generated lists. If you play too much of one kind of thing, the generated lists fill up with that. So my SO can influence my generated lists.

No big deal, my SO influences just about everything else 😄 , just wondering if it was possible.