feature request: support multiple dimmers
Opened this issue · 2 comments
My luminaires have multiple dimmers:
Unit(
_typeId=22133, deviceId=1, uuid='x', address='x', name='CURVED ',
firmwareVersion='9472', unitType=UnitType(id=22133, model='CURVED ',
manufacturer='OLIGO', mode='PWM/4ch/Dim,Dim,TW', stateLength=3, controls=[
UnitControl(type=<UnitControlType.DIMMER: 0>, offset=0, length=8, default=128, readonly=False),
UnitControl(type=<UnitControlType.DIMMER: 0>, offset=8, length=8, default=128, readonly=False),
UnitControl(type=<UnitControlType.UNKOWN: 99>, offset=16, length=8, default=46, readonly=False)
]), _state=None, _on=False, _online=True)
This is also my case:
Unit(_typeId=5614, deviceId=x, uuid='x', address='x', name='bDW (2ch/Dim,Dim)', firmwareVersion='9729',
unitType=UnitType(id=5614, model='bDW (2ch/Dim,Dim)', manufacturer='Tridonic GmbH & Co KG',
mode='DALI/2ch/Dim,Dim', stateLength=2, controls=
[UnitControl(type=<UnitControlType.DIMMER: 0>, offset=0, length=8, default=255, readonly=False, min=None, max=None),
UnitControl(type=<UnitControlType.DIMMER: 0>, offset=8, length=8, default=255, readonly=False, min=None, max=None)]),
_state=None, _on=False, _online=False)
Do you know @lkempf how could I add this feature?
Do you know where is the documentation of the BLE protocol used by Casambi? Or it needs to be applied some reverse engineering?
I am not totally sure if it needs to be changed the opCode
from the _send() function or perhaps add some extra flags next to the payload generated with prepareOperation() function
I wish I could help with the implementation but I can not find documentation about the bt protocol :/
I don't think the SetLevel
operation supports individually setting multiple dimmers (this would be the only point where the details of the protocol are relevant) so this needs to be done using SetState
. There it's just an issue with my current implementation of state parsing. I've already discussed this a bit in lkempf/casambi-bt-hass#10.