awahlig / homebridge-casambi

Homebridge Casambi Plugin
Apache License 2.0
18 stars 3 forks source link

Implementation for fixture 8616 (bDW (PWM/2ch/Dim)) #25

Open murksel opened 2 years ago

murksel commented 2 years ago

Hi Arkadiusz, I´ve a led stripe with a mix of warm and cold white leds which is controlled by a 2 ch tridonic dimmer. I configured it as a "bDW (PWM/2ch/Dim)" to get the maximum level of brightness from it.

The fuxture structure is like this: `

  {
"id": 8616,
"type": "Luminaire",
"vendor": "Tridonic GmbH & Co KG",
"model": "bDW (PWM/2ch/Dim)",
"isLuminaire": true, "isSwitch": false,
"isLightSensor": false,
"isPresenceSensor": false,
"translations": {},
"controls": [
{ "type": "dimmer", "id": 0, "readonly": false },
{ "type": "dimmer", "id": 8, "readonly": false } ] }

`

As you can see there are two dimmers. This can´t be handled by your code actually. I like to extend the code to handle this fixture.

I see two possibilities: 1) Create an extra service for the second dimmer and let homekit do the mix by scenes.

What do you think about this?

best regards, Michael

awahlig commented 2 years ago

Hi Michael,

Having a generic support for multi-channel dimmers would be useful for other use cases as well.

In this case though, letting the accessory do the calculation would definitely be more user-friendly.

Maybe the way to go is to implement both and let the user choose in the settings?

As for HomeKit compatibility, all you need is a way to convert between brightness+temperature provided by HomeKit and the two channels from the dimmer (in both ways). The first step would be to figure out that conversion. If you can do that then it will work.

Best, Arek