ebaauw / homebridge-deconz

Homebridge plugin for deCONZ
Apache License 2.0
135 stars 7 forks source link

Hue Tap Dial Switch Support of Dimmer function #169

Closed waywit closed 10 months ago

waywit commented 11 months ago

Hi Erik

first of all I would like to say thank you for this great homebridge plugin :-)

I actually own a Conbee 2 USB Stick which is connected with the homebridge-deconz plugin to my Home in HomeKit. Now, I just got a "Hue Tap Dial Switch" which has 4 buttons (1-4) on the front and a wheel to dim lights up and down. This actually works in the Deconz web UI, but in homebridge the wheel is exposed as to buttons, one Button (5 & 6) for each scroll direction.

Is it possible to get the wheel working as dimmer in HomeKit or does HomeKit not support dimmer at all? I would like to configure Homekit scenes with it (like dimm all bulbs in kitchen) and not implement everything also in deconz again... if this is not possible, perhaps someone here has an idea for an automation script to get such dimmer functionality?

Thanks and best regards Jens

Hue Tap Dial Device Hue Tap Dial Switch cofig
ebaauw commented 11 months ago

HomeKit supports wired dimmers (that control dumb lights, wired to the dimmer) as Lightbulb. I don't know of any service for wireless dimmers (that control smart lights). I think the Hue bridge doesn't even expose the dial to HomeKit nor to Matter (since they don't define a wireless dimmer either). I'm open to suggestions how better to expose the Hue tap dial (and other wireless controllers with a dial, like the IKEA SYNFONISK sound controller), but please include the HomeKit service(s) and characteristic(s) to be used, or point to another Homebridge plugin that does this.

Is it possible to get the wheel working as dimmer in HomeKit or does HomeKit not support dimmer at all?

Yes, that's why I expose the Brightness Change characteristic on lights, to set relative brightness. Simply create a HomeKit scene (in Eve, or another decent HomeKit app, as Brightness Change is a custom characteristic), for Dim Up, and one for Dim Down. Then select these scenes from the button action for the dial buttons.

I would like to configure Homekit scenes with it (like dimm all bulbs in kitchen) and not implement everything also in deconz again

Technically feasible, but I wouldn't recommend it. deCONZ rules are far more reliable and responsive. If you insist on going the HomeKit route, you might want to expose the deCONZ group for all bulbs in the kitchen and use that in the HomeKit scene, instead of the individual lights. Recalling a HomeKit scene is like a denial-of-service on deCONZ and the Zigbee network.

waywit commented 11 months ago

Thank you for your quick and detailed reply.... i was afraid that the problem is in HomeKit and not in Homebridge/deconz :-(

Just to clarify... the "brightness Change" way is not recommend to be used with scenes in HomeKit... so I will stay on using decent for dimming the kitchen group and will do the rest with HomeKit. It is very funny, that I can say Siri to turn the brightness in the kitchen down, but HomeKit not support any hardware doing the same ;-)

Thanks you very much for your help :-)

ebaauw commented 11 months ago

I use HomeKit automations to control my (Zigbee) devices from non-Zigbee controllers, and my non-Zigbee devices from Zigbee controllers. To control Zigbee devices from Zigbee controllers, I use deCONZ rules. I have just shy of 400 deCONZ rules, and slightly over 50 HomeKit rules, ~30 automations and ~20 button actions.

The Brightess Change is useful for controlling ZIgbee devices from HomeKit automations. It's just not recommended to create a HomeKit scene with up to 50 (Brightness Change or other) characteristics for up to 50 different lights. Homebridge deCONZ will need to send a separate API call to deCONZ for each light, and deCONZ will need to send a separate Zigbee message to each light. WIth Zigbee networks "rated" for about 20 (unicast) messages per second, this is stretching the network. Homebridge deCONZ does throttlie the API calls, not sending them all at once, but this will cause the lights to react at visibly different moments.

Using a Zigbee group, or ZIgbee scene, from a deCONZ rule results in one (broadcast) Zigbee message, causing all devices to react simultaneously. Exposing the Zigbee group to HomeKit, Homebridge deCONZ sends a single API call to deCONZ (for that group), and deCONZ sends a single broadcast message. Note that ZIgbee is "rated" for one broadcast message per second, so best avoid HomeKit scenes containing multiple group accessories.