jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.83k stars 462 forks source link

Sonos S2 and S1 in the same network, #783

Closed moikorg closed 3 years ago

moikorg commented 3 years ago

Hi everybody

I have some "new" Sonos (S2) components (Amp, Playbar, Sub, P1) and have also one old Player:5 (S1) component, both on the same local network.

Now I have the node-sonos-http-api server (running in a Docker) discovers sometimes the new environment (S2), but also sometimes the old one (S1). Is there a configuration or trick to select S1 or S2?

Thank you very much for any help Mike

jishi commented 3 years ago

You can specify a household identifier in settings.json to force it to only associate with a specific system. See more here: https://github.com/jishi/node-sonos-http-api/issues/396

That endpoint mentioned to find the household ID no longer exists, but you can use http://ip_of_player:1400/status/zp to find it, the last entry (HouseholdControlID) is the string that you want.

It is also documented here: https://github.com/jishi/node-sonos-http-api#settingsjson

moikorg commented 3 years ago

Okay, thanks, it worked, once I removed everything after the dot: HHID_\<abc>.\<xyz>

only the part HHID_\<abc> must be used. \<xyz> must be removed

mochi-co commented 3 years ago

Just to clarify this for anyone who comes here with this problem, I was struggling with this too, and setting household didn't work for me until I noticed @moikorg 's comment and removed the value following the last . in the HouseholdControlID. For example:

If you have Sonos_xeABCDEFGHIJKA.124sdfsdfsgss, use Sonos_xeABCDEFGHIJKA as your household. value.

Sjekke commented 2 years ago

Just to clarify this for anyone who comes here with this problem, I was struggling with this too, and setting household didn't work for me until I noticed @moikorg 's comment and removed the value following the last . in the HouseholdControlID. For example:

If you have Sonos_xeABCDEFGHIJKA.124sdfsdfsgss, use Sonos_xeABCDEFGHIJKA as your household. value.

Do you run 2 configs?

killthekid commented 2 years ago

Can you please post a sample where you put in in the settings.js file?

rolfsorensen commented 6 months ago

Can you please post a sample where you put in in the settings.js file?

Here's a sample:

{ "players": [ { "roomName": "Kontorbord", "volume": 10 } ], "playMode": { "shuffle": false, "repeat": "all", "crossfade": false }, "pauseOthers": false, "household": "Sonos_SDpeoA1EXXXXXXXXtJLAa2h6D" }