Open handfreezer opened 4 years ago
Could you restart daemon in debug mode ans provide the Zigate log ?
Here is debug of plugin Zigate 1.5.0 for one click on button:
[2019-12-15 23:34:58][DEBUG] : Array ( [attribute] => Array ( [type] => bool [cluster] => 6 [endpoint] => 1 [addr] => 41f3 [value] => 1 [data] => [attribute] => 0 [inverse] => 1 [name] => onoff ) [action] => ZIGATE_ATTRIBUTE_UPDATED [device] => Array ( [endpoints] => Array ( [0] => Array ( [in_clusters] => Array ( [0] => 0 [1] => 65535 [2] => 6 ) [out_clusters] => Array ( [0] => 0 [1] => 4 [2] => 65535 ) [profile] => 260 [clusters] => Array ( [0] => Array ( [attributes] => Array ( [0] => Array ( [value] => 3 [data] => 3 [attribute] => 1 [name] => application_version ) [1] => Array ( [value] => LUMI [data] => LUMI [attribute] => 4 [name] => manufacturer ) [2] => Array ( [type] => str [value] => lumi.sensor_switch.aq2 [data] => lumi.sensor_switch.aq2 [attribute] => 5 [name] => type ) [3] => Array ( [type] => float [value] => 3.035 [data] => 0121db0b0328180421a81305211900062401000000000a210000 [attribute] => 65281 [unit] => V [name] => battery_voltage ) ) [cluster] => 0 ) [1] => Array ( [attributes] => Array ( [0] => Array ( [type] => bool [value] => [data] => 1 [attribute] => 0 [inverse] => 1 [name] => onoff ) [1] => Array ( [type] => int [value] => 0 [data] => 0 [attribute] => 32768 [expire] => 2 [name] => multiclick ) ) [cluster] => 6 ) ) [endpoint] => 1 [device] => 24321 ) ) [discovery] => templated [addr] => 41f3 [generictype] => sensor [info] => Array ( [lqi] => 177 [ieee] => 00158d000233365a [power_type] => 0 [addr] => 41f3 [mac_capability] => 10000000 [id] => 1 [descriptor_capability] => 00000000 [manufacturer_code] => 1037 [bit_field] => 0100000000000010 [server_mask] => 0 [last_seen] => 2019-12-15 23:34:58 ) ) )
[2019-12-15 23:34:58][DEBUG] : create command 1.6.0
[2019-12-15 23:34:58][DEBUG] : Array ( [attribute] => Array ( [type] => bool [cluster] => 6 [endpoint] => 1 [addr] => 41f3 [value] => [data] => 1 [attribute] => 0 [inverse] => 1 [name] => onoff ) [action] => ZIGATE_ATTRIBUTE_UPDATED [device] => Array ( [endpoints] => Array ( [0] => Array ( [in_clusters] => Array ( [0] => 0 [1] => 65535 [2] => 6 ) [out_clusters] => Array ( [0] => 0 [1] => 4 [2] => 65535 ) [profile] => 260 [clusters] => Array ( [0] => Array ( [attributes] => Array ( [0] => Array ( [value] => 3 [data] => 3 [attribute] => 1 [name] => application_version ) [1] => Array ( [value] => LUMI [data] => LUMI [attribute] => 4 [name] => manufacturer ) [2] => Array ( [type] => str [value] => lumi.sensor_switch.aq2 [data] => lumi.sensor_switch.aq2 [attribute] => 5 [name] => type ) [3] => Array ( [type] => float [value] => 3.035 [data] => 0121db0b0328180421a81305211900062401000000000a210000 [attribute] => 65281 [unit] => V [name] => battery_voltage ) ) [cluster] => 0 ) [1] => Array ( [attributes] => Array ( [0] => Array ( [type] => bool [value] => [data] => 1 [attribute] => 0 [inverse] => 1 [name] => onoff ) [1] => Array ( [type] => int [value] => 0 [data] => 0 [attribute] => 32768 [expire] => 2 [name] => multiclick ) ) [cluster] => 6 ) ) [endpoint] => 1 [device] => 24321 ) ) [discovery] => templated [addr] => 41f3 [generictype] => sensor [info] => Array ( [lqi] => 177 [ieee] => 00158d000233365a [power_type] => 0 [addr] => 41f3 [mac_capability] => 10000000 [id] => 1 [descriptor_capability] => 00000000 [manufacturer_code] => 1037 [bit_field] => 0100000000000010 [server_mask] => 0 [last_seen] => 2019-12-15 23:34:58 ) ) )
[2019-12-15 23:34:58][DEBUG] : create command 1.6.0
Below screenshot of the scene used for test
and the log of the scene:
------------------------------------
[2019-12-15 23:37:46][SCENARIO] Start : Scenario execute automatiquement sur evenement venant de : [Racine][Bouton CC][onoff].
[2019-12-15 23:37:46][SCENARIO] Exécution du sous-élément de type [action] : action
[2019-12-15 23:37:46][SCENARIO] Log : Bouton CC trigger : MultiClick : 0 et ON/OFF : 1
[2019-12-15 23:37:46][SCENARIO] Log : Bouton CC value : MultiClick : [4] et ON/OFF : [0]
[2019-12-15 23:37:46][SCENARIO] Fin correcte du scénario
------------------------------------
[2019-12-15 23:37:47][SCENARIO] Start : Scenario execute automatiquement sur evenement venant de : [Racine][Bouton CC][onoff].
[2019-12-15 23:37:47][SCENARIO] Exécution du sous-élément de type [action] : action
[2019-12-15 23:37:47][SCENARIO] Log : Bouton CC trigger : MultiClick : 0 et ON/OFF : 1
[2019-12-15 23:37:47][SCENARIO] Log : Bouton CC value : MultiClick : [4] et ON/OFF : [0]
[2019-12-15 23:37:47][SCENARIO] Fin correcte du scénario
I'm also facing a strange point : when doing a 4-click twice, the second time is not notified to the scene, below the log of the Zigate plugin:
[2019-12-15 23:40:25][DEBUG] : Array ( [attribute] => Array ( [type] => int [cluster] => 6 [endpoint] => 1 [addr] => 41f3 [value] => 4 [data] => 4 [attribute] => 32768 [expire] => 2 [name] => multiclick ) [action] => ZIGATE_ATTRIBUTE_UPDATED [device] => Array ( [endpoints] => Array ( [0] => Array ( [in_clusters] => Array ( [0] => 0 [1] => 65535 [2] => 6 ) [out_clusters] => Array ( [0] => 0 [1] => 4 [2] => 65535 ) [profile] => 260 [clusters] => Array ( [0] => Array ( [attributes] => Array ( [0] => Array ( [value] => 3 [data] => 3 [attribute] => 1 [name] => application_version ) [1] => Array ( [value] => LUMI [data] => LUMI [attribute] => 4 [name] => manufacturer ) [2] => Array ( [type] => str [value] => lumi.sensor_switch.aq2 [data] => lumi.sensor_switch.aq2 [attribute] => 5 [name] => type ) [3] => Array ( [type] => float [value] => 3.035 [data] => 0121db0b0328180421a81305211900062401000000000a210000 [attribute] => 65281 [unit] => V [name] => battery_voltage ) ) [cluster] => 0 ) [1] => Array ( [attributes] => Array ( [0] => Array ( [type] => bool [value] => [data] => 1 [attribute] => 0 [inverse] => 1 [name] => onoff ) [1] => Array ( [type] => int [value] => 4 [data] => 4 [attribute] => 32768 [expire] => 2 [name] => multiclick ) ) [cluster] => 6 ) ) [endpoint] => 1 [device] => 24321 ) ) [discovery] => templated [addr] => 41f3 [generictype] => sensor [info] => Array ( [lqi] => 177 [ieee] => 00158d000233365a [power_type] => 0 [addr] => 41f3 [mac_capability] => 10000000 [id] => 1 [descriptor_capability] => 00000000 [manufacturer_code] => 1037 [bit_field] => 0100000000000010 [server_mask] => 0 [last_seen] => 2019-12-15 23:40:25 ) ) )
[2019-12-15 23:40:25][DEBUG] : create command 1.6.32768
[2019-12-15 23:40:27][DEBUG] : Array ( [attribute] => Array ( [type] => int [cluster] => 6 [endpoint] => 1 [addr] => 41f3 [value] => 0 [data] => 0 [attribute] => 32768 [expire] => 2 [name] => multiclick ) [action] => ZIGATE_ATTRIBUTE_UPDATED [device] => Array ( [endpoints] => Array ( [0] => Array ( [in_clusters] => Array ( [0] => 0 [1] => 65535 [2] => 6 ) [out_clusters] => Array ( [0] => 0 [1] => 4 [2] => 65535 ) [profile] => 260 [clusters] => Array ( [0] => Array ( [attributes] => Array ( [0] => Array ( [value] => 3 [data] => 3 [attribute] => 1 [name] => application_version ) [1] => Array ( [value] => LUMI [data] => LUMI [attribute] => 4 [name] => manufacturer ) [2] => Array ( [type] => str [value] => lumi.sensor_switch.aq2 [data] => lumi.sensor_switch.aq2 [attribute] => 5 [name] => type ) [3] => Array ( [type] => float [value] => 3.035 [data] => 0121db0b0328180421a81305211900062401000000000a210000 [attribute] => 65281 [unit] => V [name] => battery_voltage ) ) [cluster] => 0 ) [1] => Array ( [attributes] => Array ( [0] => Array ( [type] => bool [value] => [data] => 1 [attribute] => 0 [inverse] => 1 [name] => onoff ) [1] => Array ( [type] => int [value] => 0 [data] => 0 [attribute] => 32768 [expire] => 2 [name] => multiclick ) ) [cluster] => 6 ) ) [endpoint] => 1 [device] => 24321 ) ) [discovery] => templated [addr] => 41f3 [generictype] => sensor [info] => Array ( [lqi] => 174 [ieee] => 00158d000233365a [power_type] => 0 [addr] => 41f3 [mac_capability] => 10000000 [id] => 1 [descriptor_capability] => 00000000 [manufacturer_code] => 1037 [bit_field] => 0100000000000010 [server_mask] => 0 [last_seen] => 2019-12-15 23:40:25 ) ) )
[2019-12-15 23:40:27][DEBUG] : create command 1.6.32768
Looking in the log, everything is fine, there's no double events So I suspect a problem with Scenario trigger or in Jeedom itself
[2019-12-14 13:23:22][SCENARIO] Start : Scenario execute automatiquement sur evenement venant de : [Racine][Bouton CC][onoff]. [2019-12-14 13:23:22][SCENARIO] Exécution du sous-élément de type [action] : action [2019-12-14 13:23:22][SCENARIO] Log : Bouton CC détecté : MultiClick : [4] et ON/OFF : [0] [2019-12-14 13:23:22][SCENARIO] Log : Bouton CC détecté trigger : MultiClick : 0 et ON/OFF : 1 [2019-12-14 13:23:22][SCENARIO] Fin correcte du scénario ------------------------------------ [2019-12-14 13:23:23][SCENARIO] Start : Scenario execute automatiquement sur evenement venant de : [Racine][Bouton CC][onoff]. [2019-12-14 13:23:23][SCENARIO] Exécution du sous-élément de type [action] : action [2019-12-14 13:23:23][SCENARIO] Log : Bouton CC détecté : MultiClick : [4] et ON/OFF : [0] [2019-12-14 13:23:23][SCENARIO] Log : Bouton CC détecté trigger : MultiClick : 0 et ON/OFF : 1 [2019-12-14 13:23:23][SCENARIO] Fin correcte du scénario
I think you misunderstood the log, the scenario is triggered 2 times because first time when attribute change from off to on and second time when it change from on to off
I suspect that the event is so fast (off=>on then on=>off) that when Jeedom finally starts the scenario the value is off
I don't know if it's possible in Jeedom, but you have to check the trigger value instead of the attribute value. Trigger value is the value that cause scenario triggering Attribute value is the current (last known) value of the attribute
Look in jeedom and scene, when I log it, the trigger value is 1 event when the button is going from onoff value from on to off... it is like the state is not updated when switching to on.
I redo the test with last update and here is the log of the zigate plugin:
[2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Listen) : Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\xc2QA\xf3\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x10\xba\x03\x01\x81\x02\x12\x02\x10\x02\x1e\xc3QA\xf3\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x11\xba\x03' [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Event Loop) : Dispatch ZIGATE_PACKET_RECEIVED [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Received response 0x8102: b'5141f301000600000010000100' [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : RESPONSE 0x8102 - Individual Attribute Report : sequence:81, addr:41f3, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:False, lqi:186 [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Acquire Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Release Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Acquire Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Release Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Acquire Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Release Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Dispatch ZIGATE_ATTRIBUTE_UPDATED [2019-12-22 16:01:21][DEBUG][root](ZiGate-Decode data) : External command ZIGATE_ATTRIBUTE_UPDATED : {'zigate': <zigate.core.ZiGate object at 0x7fc4139234e0>, 'attribute': {'addr': '41f3', 'type': <class 'bool'>, 'attribute': 0, 'endpoint': 1, 'name': 'onoff', 'data': False, 'cluster': 6, 'inverse': True, 'value': True}, 'device': LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a} [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Dispatch ZIGATE_RESPONSE_RECEIVED [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Event Loop) : Dispatch ZIGATE_PACKET_RECEIVED [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Received response 0x8102: b'5141f301000600000010000101' [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : RESPONSE 0x8102 - Individual Attribute Report : sequence:81, addr:41f3, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:True, lqi:186 [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Acquire Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Release Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Acquire Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Release Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Acquire Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Release Lock on device LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Dispatch ZIGATE_ATTRIBUTE_UPDATED [2019-12-22 16:01:21][DEBUG][root](ZiGate-Decode data) : External command ZIGATE_ATTRIBUTE_UPDATED : {'zigate': <zigate.core.ZiGate object at 0x7fc4139234e0>, 'attribute': {'addr': '41f3', 'type': <class 'bool'>, 'attribute': 0, 'endpoint': 1, 'name': 'onoff', 'data': True, 'cluster': 6, 'inverse': True, 'value': False}, 'device': LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a} [2019-12-22 16:01:21][DEBUG][zigate](ZiGate-Decode data) : Dispatch ZIGATE_RESPONSE_RECEIVED [2019-12-22 16:01:22][DEBUG][root](Thread-1) : Send to jeedom : {'action': 'ZIGATE_ATTRIBUTE_UPDATED', 'attribute': {'addr': '41f3', 'type': <class 'bool'>, 'attribute': 0, 'endpoint': 1, 'name': 'onoff', 'data': False, 'cluster': 6, 'inverse': True, 'value': True}, 'device': LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a} [2019-12-22 16:01:22][DEBUG][requests.packages.urllib3.connectionpool](Thread-1) : Starting new HTTP connection (1): 127.0.0.1 [2019-12-22 16:01:22][DEBUG] : Array ( [action] => ZIGATE_ATTRIBUTE_UPDATED [attribute] => Array ( [addr] => 41f3 [type] => bool [attribute] => 0 [endpoint] => 1 [name] => onoff [data] => [cluster] => 6 [inverse] => 1 [value] => 1 ) [device] => Array ( [addr] => 41f3 [endpoints] => Array ( [0] => Array ( [in_clusters] => Array ( [0] => 0 [1] => 65535 [2] => 6 ) [clusters] => Array ( [0] => Array ( [cluster] => 0 [attributes] => Array ( [0] => Array ( [name] => application_version [attribute] => 1 [data] => 3 [value] => 3 ) [1] => Array ( [name] => manufacturer [attribute] => 4 [data] => LUMI [value] => LUMI ) [2] => Array ( [type] => str [attribute] => 5 [name] => type [data] => lumi.sensor_switch.aq2 [value] => lumi.sensor_switch.aq2 ) [3] => Array ( [name] => battery_voltage [type] => float [attribute] => 65281 [data] => 0121d10b0328190421a81305211900062401000000000a210000 [unit] => V [value] => 3.025 ) ) ) [1] => Array ( [cluster] => 6 [attributes] => Array ( [0] => Array ( [name] => onoff [type] => bool [attribute] => 0 [data] => 1 [inverse] => 1 [value] => ) [1] => Array ( [name] => multiclick [type] => int [attribute] => 32768 [data] => 0 [expire] => 2 [value] => 0 ) ) ) ) [out_clusters] => Array ( [0] => 0 [1] => 4 [2] => 65535 ) [device] => 24321 [endpoint] => 1 [profile] => 260 ) ) [discovery] => templated [info] => Array ( [addr] => 41f3 [bit_field] => 0100000000000010 [manufacturer_code] => 1037 [server_mask] => 0 [power_type] => 0 [ieee] => 00158d000233365a [lqi] => 186 [descriptor_capability] => 00000000 [last_seen] => 2019-12-22 16:01:21 [mac_capability] => 10000000 [id] => 1 ) [generictype] => sensor ) ) [2019-12-22 16:01:22][DEBUG] : create command 1.6.0 [2019-12-22 16:01:22][DEBUG][requests.packages.urllib3.connectionpool](Thread-1) : http://127.0.0.1:9080 "POST /plugins/zigate/core/php/jeeZiGate.php?apikey=HTTP/1.1" 200 16 [2019-12-22 16:01:22][DEBUG][root](Thread-1) : Jeedom reply : {'success': True} [2019-12-22 16:01:22][DEBUG][root](Thread-1) : Send to jeedom : {'action': 'ZIGATE_ATTRIBUTE_UPDATED', 'attribute': {'addr': '41f3', 'type': <class 'bool'>, 'attribute': 0, 'endpoint': 1, 'name': 'onoff', 'data': True, 'cluster': 6, 'inverse': True, 'value': False}, 'device': LUMI lumi.sensor_switch.aq2 (41f3) 00158d000233365a} [2019-12-22 16:01:22][DEBUG][requests.packages.urllib3.connectionpool](Thread-1) : Starting new HTTP connection (1): 127.0.0.1 [2019-12-22 16:01:22][DEBUG] : Array ( [action] => ZIGATE_ATTRIBUTE_UPDATED [attribute] => Array ( [addr] => 41f3 [type] => bool [attribute] => 0 [endpoint] => 1 [name] => onoff [data] => 1 [cluster] => 6 [inverse] => 1 [value] => ) [device] => Array ( [addr] => 41f3 [endpoints] => Array ( [0] => Array ( [in_clusters] => Array ( [0] => 0 [1] => 65535 [2] => 6 ) [clusters] => Array ( [0] => Array ( [cluster] => 0 [attributes] => Array ( [0] => Array ( [name] => application_version [attribute] => 1 [data] => 3 [value] => 3 ) [1] => Array ( [name] => manufacturer [attribute] => 4 [data] => LUMI [value] => LUMI ) [2] => Array ( [type] => str [attribute] => 5 [name] => type [data] => lumi.sensor_switch.aq2 [value] => lumi.sensor_switch.aq2 ) [3] => Array ( [name] => battery_voltage [type] => float [attribute] => 65281 [data] => 0121d10b0328190421a81305211900062401000000000a210000 [unit] => V [value] => 3.025 ) ) ) [1] => Array ( [cluster] => 6 [attributes] => Array ( [0] => Array ( [name] => onoff [type] => bool [attribute] => 0 [data] => 1 [inverse] => 1 [value] => ) [1] => Array ( [name] => multiclick [type] => int [attribute] => 32768 [data] => 0 [expire] => 2 [value] => 0 ) ) ) ) [out_clusters] => Array ( [0] => 0 [1] => 4 [2] => 65535 ) [device] => 24321 [endpoint] => 1 [profile] => 260 ) ) [discovery] => templated [info] => Array ( [addr] => 41f3 [bit_field] => 0100000000000010 [manufacturer_code] => 1037 [server_mask] => 0 [power_type] => 0 [ieee] => 00158d000233365a [lqi] => 186 [descriptor_capability] => 00000000 [last_seen] => 2019-12-22 16:01:21 [mac_capability] => 10000000 [id] => 1 ) [generictype] => sensor ) ) [2019-12-22 16:01:22][DEBUG] : create command 1.6.0 [2019-12-22 16:01:23][DEBUG][requests.packages.urllib3.connectionpool](Thread-1) : http://127.0.0.1:9080 "POST /plugins/zigate/core/php/jeeZiGate.php?apikey=HTTP/1.1" 200 16 [2019-12-22 16:01:23][DEBUG][root](Thread-1) : Jeedom reply : {'success': True}
What I see is the data field which is first to False then is True.
but the info seems not copied to onoff info on the object.
I really think the event is too fast for Jeedom There should be a way to catch it, but I'm not a Jeedom guru
Hello,
I'm under Jeedom 4, plugin zigate 1.5.0, and a ziaget 3.1a with a xiaomi button multiclick (lumi.sensor_switch.aq2). When I press only one time the button, I trigger the info onoff of the object, but the event appeared twice, and both have the value 0 (I was waiting something like the first with 1 and the second with 0).
Did I miss something?
Here a little log:
Best regards