Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discover multiple Sonos systems on same network / select Sonos system to use with homebridge #153

Closed
fanfadrian opened this issue Nov 29, 2020 · 3 comments

Comments

@fanfadrian
Copy link

fanfadrian commented Nov 29, 2020

Issue

Thanks for the great plugin, I really appreciate your work!

I have two Sonos systems running on the same network. One with my main players for music listening and one with a speaker dedicated to play announcements and alarms (via node-sonos-http-api).

I didn't find a way to discover and expose both systems to Homebridge/Homekit. But this is not so important to me, because I only want to control the system with the main players. But, unfortunately again, homebridge-zp discovers and exposes the one that I don't want to control (the one used for node-sonos-http-api). Maybe this is because it discovers it first when scanning the network.

With node-sonos-http-api I can specify the Sonos HouseholdControlID to specify which system to use. Would that be possible? Or is discovering two systems on the same network the better approach? Both would solve my problem :)

Thanks in advance!

@ebaauw
Copy link
Owner

ebaauw commented Nov 29, 2020

Homebridge ZP currently doesn't handle households. That's why I implemented the trick to register Homebridge ZP twice for a split S2 vs S1 setup. It's on my to-do list to change this, and handle multiple households structurally, but it's low on the prio list. That might change if I win the lottery, but currently I don't have enough rooms to hit the 32 zone player limit.

Not sure I want to expose end users to household IDs, but maybe I could make it possible to specify the associated zone player (as RINCON_... ID, so it doesn't need a fixed IP address) in config.json.

Maybe this is because it discovers it first when scanning the network.

Yes, it's the first to respond to the UPnP search. I'm afraid the only current workaround would be disconnecting the "unwanted" zone player from the network, or powering it down, when starting Homebridge. The bastards at Sonos disabled remote shutdown/reboot of the zone players, so there's nothing I can do.

ebaauw added a commit that referenced this issue Jul 18, 2021
- Support multiple households, see #153.
- Don't ignore `AVTransPort` events after `SetAVTransPortURI`, see #173.
ebaauw added a commit that referenced this issue Jul 18, 2021
- Refactor to handle larger networks, see #180:
  - No longer call `GetZoneGroupState` on `init()`;
  - Split `init()` into `init()` vs `initTopology()`;
- Support for multiple households, see #153.
- Improved error checking and developer documentation.
ebaauw added a commit that referenced this issue Jul 18, 2021
- No longer register ZPS1 platform, see #153.
ebaauw added a commit that referenced this issue Jul 18, 2021
- Support multiple households, see #153.
@ebaauw
Copy link
Owner

ebaauw commented Jul 18, 2021

Could you please try beta v1.4.0-1. This version handles multiple households. It logs the topology per household, and maintains an associated zone player as well as Sonos Coordinator per household. Note that favourites are per household, and you can only group a zone to another zone within the same household. The inputs to the TV accessories should reflect that.

Consequently, the ZPS1 platform is no longer exposed and the forceS2 config.json keys been removed.

In my testing the beta seems to work properly, but I only have an S2 household with 11 zone players and an S1 household with a single zone player.

ebaauw added a commit that referenced this issue Jul 18, 2021
@ebaauw
Copy link
Owner

ebaauw commented Jul 31, 2021

In v1.4.0.

@ebaauw ebaauw closed this as completed Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants