rdmtc / RedMatic-HomeKit

HAP-Nodejs based Node-RED nodes to create (bridged) HomeKit Accessories
Apache License 2.0
61 stars 22 forks source link

Tradfri CWS bulb again #266

Open kneip68 opened 4 years ago

kneip68 commented 4 years ago

Hi hobbyquaker

Due to corona lock down I can again try to spend a little time on my home automation, so I was taking a look at the issue described in #189 again. The problem obviously is that the TRADRFI Color bulbs do not implement hue and saturation, I can not set either of both with any of the related commands in cluster lightingColorCtrl in zigbee2mqtt nor node-red-contrib-zigbee, nor via redmatic-homekit (tried programming that in my own fork). My goal is to support the bulbs including the HK color picker via redmatic-homekit directly, but obviously for that some programming including Hue/Saturation to colorXY and vice versa is needed. in any case (at least if I go by the input of the Universal Node) I will need to read back the current values of Level and currentX and currentY from the device so that I can recalculate the other 2 values from current state as HK seems to give only 1 of the 3 value at a time. I see 3 possible approaches:

  1. Implement in the zigbee devices of homekit own class colorXY as in my fork (see pull request)
  2. Implement in node-red-contrib-zigbee, also with it's own class calling different converters then now
  3. implementing in kkoenks herdsmann-converters, where actually I think you have already implemented the special routines for RGB handling

Could you give advice which path to follow? Quick and Dirty would be in homekit, I think, but then reading back the device values might be a breaking point (timing problems?)

Advice appreciated.

KR

Kneip

bohtho commented 4 years ago

Would like to help with this effort! I love the redmatic-HomeKit zigbee node, but neither colortemperature or setting color works with these ikea color bulbs.

@kneip68 Can't see your pull request though ?

kneip68 commented 4 years ago

No pull request yet, I did mock up implementations but wasn't too successful in any of it. Then I had issues with the stick loosing it's configuration when deploying, so I finally moved away from using node-red-contrib-zigbee and therefore currently I can not work on the issue anymore.