esp32 zigbee onLightChange unwanted results #11495
Replies: 3 comments
-
Hi @ilker-aktuna, if I get it correctly when setting to OFF you receive those 2 commands: when setting to ON you receive this: Is that correct? |
Beta Was this translation helpful? Give feedback.
-
yes, exactly. |
Beta Was this translation helpful? Give feedback.
-
That's how Zigbee communication works. It's always sending level + state. And as its 2 separate messages its triggering twice the onLightChanged. So you need to check both state and level. If state is 0 keep light off whatever level is. If state is 1, check the level. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Arduino zigbee library and ZigbeeDimmableLight profile for a simple device which requires level and on/off commands.
The device is configured as:
ZigbeeDimmableLight zbDimmableLight = ZigbeeDimmableLight(ZIGBEE_LIGHT_ENDPOINT);
And for the level/on/off devices I use the following method:
I use Hubitat as my Zigbee controller and I send zigbee on / off commands as:
the device id is 0A and the hub sends 00 or 01 commands to the 0x0006 cluster.
That's the only command it sends. It does not send any level command.
However, on serial monitor , I see the following output for on and off commads:
off:
state : 1
level: 0
state: 0
level: 0
on:
state : 1
level: 0
state: 1
level: 255
So the esp32 zigbee library adds unwanted commands.
When there is no level command sent from the hub, it changes the levels. And additionally it sends unwanted state commands (2 instead of 1) so I can't act according to the received command.
Why is this happening ?
@P-R-O-C-H-Y , maybe you can comment...
thanks.
Beta Was this translation helpful? Give feedback.
All reactions