dxdc / homebridge-blinds

:sunrise: Homebridge Plugin to control my blinds over HTTP
https://www.npmjs.com/package/homebridge-blinds
ISC License
54 stars 25 forks source link

Related blinds together in groups #37

Closed mikeknoop closed 4 years ago

mikeknoop commented 4 years ago

Awesome plugin, works great with Bond Bridge to control my Somfy shades!

One small UX quirk I ran into -- consider a Somfy controller set up:

The group (4) above does not track state correctly in homebridge-blinds because AFAIK Somfy/Bond do not report position. If you close 1, 2, and 3 then 4 will still say "open".

We could extend the config to support shaded groupings. Perhaps something like:

[
  ...
  {
     "name": "Shade 1",
     "up_url": "http://...",
     "group": "All Shades"
  },
  {
     "name": "Shade 2",
     "up_url": "http://...",
     "group": "All Shades"
  },
  {
     "name": "Shade 3",
     "up_url": "http://...",
     "group": "All Shades"
  },
  {
     "name": "All Shades",
     "up_url": "http://..."
  }
  ...
]

When shades 1, 2, or 3 are interacted with they'd check to see if group is defined and if so, update some internal state tracking which gets pushed to HomeKit.

Would need to consider what the expected behavior is for partial open/close. Perhaps could take the max() of all shades in the group as the value. Or just force any partial value to 0% or 100% in the slider control if the user chooses a middle option.

dxdc commented 4 years ago

@mikeknoop

Thanks for the suggestion. Actually, it's partially related to #36.

Would need to consider what the expected behavior is for partial open/close. This is a huge issue, of course, and not trivial to think about. I think it only makes sense to really have this as a stateless button, where there would be an "All open" and "All closed". Otherwise, it really doesn't make sense.

That all being said, you may not be aware (?) HomeKit actually has "grouping" features built in. You're not supposed to set up an accessory that you also want to have independent control of -- i.e. -- there should be no "all shades" in your list. Remove that, and use HomeKit Scenes (built in) to control multiple devices simultaneously. If that isn't powerful enough for you (too many if/then type statements), you can try Eve or Node-RED.

Does this solve your problem? On my setup, Bond works perfectly using Scenes.

Let me know if there was another reason for your request though and we can consider it. I'd much rather rely on the native grouping functions within HomeKit for this purpose since really all you're wanting to do is send multiple requests at once.

dxdc commented 4 years ago

Here's a simple walkthrough of Scenes, by the way:

https://www.macrumors.com/how-to/create-a-homekit-scene/

mikeknoop commented 4 years ago

I like that the opinionated approach to rely on native HomeKit functionality. Will give that a go, thanks! Without position reporting I think using a scene for the grouping is probably the best overall UX.

dxdc commented 4 years ago

You're welcome @mikeknoop .. and note, you can (in Scenes) define any position you like. So, you can define scene 1 with Blind 1: 100, Blind 2: 50, etc. and it will keep track of everything properly. Just use Scenes and omit your accessory 4 and you should be set.