Comments (10)
Cool. I'll bring out a non-beta release with this shortly.
from homebridge-zp.
You can accomplish this already using HomeKit scenes. Simply create a scene switching on the Speaker services of the zones you want to group. In the Home app, you can turn off the scene and the zones are ungrouped again.
from homebridge-zp.
I have found that using scenes in this way is quite cumbersome if you want to manage multiple groups, even if only one is active at a time. My suggestion would enable support for multiple groups with ease.
For example - my current use case:
- During my morning routine, I'd like my bedroom and bathroom speakers to be grouped so my alarm plays in both rooms synchronized.
- Once the alarm is finished, I'd like to un-group these two speakers so that they are separate again, for seperate use later in the day.
- I have another set of speakers in my kitchen that are always grouped.
With homebridge-zp right now, I have to create multiple automations that fire minutes apart to first un-group everything, then re-group the desired speakers, i.e:
- Before alarm - Un-group all
- Before alarm - group bedroom + bathroom
- After alarm - Un-group all
- After alarm - group kitchen speakers
With this described automation-flow, I'm still running into the issue described in #40, where the platform coordinator speaker ends up joining the first group created after un-grouping all speakers.
I believe that a switch to perform pre-defined grouping would allow for more robust grouping, and would remove the need to un-group everything before creating a new group, and think such a feature is worth considering.
from homebridge-zp.
I have found that using scenes in this way is quite cumbersome if you want to manage multiple groups
Yes. In its current setup, homebridge-zp effectively handles only one group. I understand your use case, and would like to support multiple groups through homebridge-zp. I don't think having pre-defined groups is the answer, though. I want homebridge-zp to mimic, as much as possible, the functionality of the Sonos app in HomeKit. Defining pre-defined groups (in config.json?) is beyond that scope.
It's been quite challenging to match the Sonos functionality to HomeKit. Sonos uses hypermedia controls, where the zoneplayer informs the app what actions are possible at this moment. HomeKit requires a fixed configuration, that is only supposed to change with firmware upgrades. That's why I came up with the current implementation: use each zoneplayer as fixed group (coordinator), and, through the Speaker service, allow another zoneplayer to join this group.
Instead of using the opaque concept of a "platform coordinator" (which I never really liked anyway, because it's not transparent to the user), I could probably list the possible groups (or rather: coordinators) per zoneplayer, and allow the user to pick the coordinator to join. That would probably forego the functionality for a coordinator to leave the group to a new coordinator. To leave the group, simply select the zoneplayer itself as new coordinator.
I'm not sure how best to expose this to HomeKit. If I were to expose each potential group (per zoneplayer) as a switch, Apple's Home app would support this. However, for n zoneplayers, you would see n² extra tiles. I could use a custom characteristic instead, but then you would need to use another HomeKit app (like Eve) to join or leave a group, or to define a HomeKit scene to do so. Instead of using switches, maybe I could create a dropdown list (i.e. a string characteristic with a fixed list of values), but I'm not sure if that can be used in scenes.
Alternatively, I could list the potential members per zoneplayer (or rather: coordinator). This would result in "only" n(n - 1) extra tiles. When selecting a zoneplayer, it would join the group, potentially stealing it from another group (when it was already a member of another group) or leaving its group to a new coordinator (when it was the coordinator of its own group). When deselecting a zoneplayer, it would become a standalone group. Using a dropdown list would not be possible here, since you want to be able to select multiple members.
from homebridge-zp.
Did some testing: it would seem that a string characteristic cannot be included in a HomeKit scene, so using a drop-down list is a no go.
I had another idea this morning. Maybe expose the platform coordinator explicitly (as a switch on each Sonos service) and allow users to set it. That way, in the morning, you could assign the bedroom as platform coordinator, and group the bathroom to it, while leaving the kitchen group intact. Not sure if HomeKit scenes keep order (you want to set the coordinator first), so you might need two schedules (one to set the platform coordinator, one to join the bathroom).
from homebridge-zp.
Could you try v0.3.6-0 (install through sudo npm -g i homebridge-zp@beta
)? It provides a new characteristic, Sonos Coordinator in each Sonos service. This allows you to set the platform coordinator, so zoneplayers will join this group when setting the Speaker service On characteristic.
from homebridge-zp.
I'm now running homebridge-zp v0.3.6-0, however I do not see a Sonos Coordinator characteristic in any of the Sonos services. I restarted both of my Homebridge instances after updating. Should I be doing something else to show the new characteristic?
from homebridge-zp.
I had to stop and restart Eve before it showed. HomeKit doesn’t like configuration changes.
from homebridge-zp.
I've force quit and relaunched both the Eve and Controller apps, but neither are showing the new characteristic. I'll try restarting my Apple TVs when I get home to see if that helps.
from homebridge-zp.
This is working now. Turns out I had conflicting local and global versions - whoops.
Repeated testing by manually triggering the following scenes is working very well indeed! The Kitchen group remains unaffected and intact during the grouping and ungrouping of the Bedroom + Bathroom speakers.
I'll continue testing with daily automation and report any issues I encounter.
Thank you very much for solving my problem!
from homebridge-zp.
Related Issues (20)
- Siri thinks the speakers are lights HOT 4
- Allow settings-only mode HOT 1
- Warning errors HOT 1
- Remaining Duration error messages HOT 1
- Homebridge -zp HOT 5
- HomeBridge Login Issues
- Input Enhancement HOT 1
- Ghost Sonos speakers appearing - advise please HOT 12
- Enhancement: Only allow TV input in supported rooms HOT 12
- Speakers show as Not Supported HOT 1
- Smart Speaker service
- TypeError: Cannot read properties of undefined (reading 'zoneGroupShortName') HOT 5
- Feature Request: Implementation of a TV Level to adjust surround sound level HOT 18
- SyntaxError: init() not yet called HOT 2
- Sonos Speakers Not Supported HOT 1
- How to start with Radio xyz? HOT 3
- Problem Sonos S1 HOT 1
- Use mDNS announcements
- Using homebridge-zp with Node 21 and Homebridge 18 - warnings and no zones detected HOT 2
- http status 412 Precondition Failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-zp.