Xiaomi Cube buttonevent
Posted: Tuesday 04 August 2020 19:40
Hi!
I want to fit dzVents rules to rotate the cube (90 degrees from one side to the other), it would be important to know in the rule from which side the cube turns to which side.
This is listed in the log.
'buttonevent': 2001,
I use Conbee 2 stick with deconz.
https://github.com/dresden-elektronik/d ... issues/138
Here is the buttonevent codes:
x000 for push, so 1000, 2000, 3000, 4000, 5000, 6000;
x00x for double tap, so 1001, 2002, 3003, 4004, 5005, 6006;
x00o for 180° flip (where o = 7 - x), so 1006, 2005, 3004, 4003, 5002, 6001;
x00y for 90° flip (where y ≠ x and y ≠ 7 - x), so 1002, 1003, 1004, 1005, 2001, 2003, 2004, 2006, 3001, 3002, 3005, 3006, 4001, 4002, 4005, 4006, 5001, 5003, 5004, 5006, 6002, 6003, 6004, 6005;
7007 for shake;
7008 for drop (EDITED);
7000 for wakeup (the cube sends raw value 2 when I just tap it after a while).
In the websocket section, "buttonevent" specifies the direction and side of rotation.
How can this be applied in dzvents ( buttonevent)?
I want to fit dzVents rules to rotate the cube (90 degrees from one side to the other), it would be important to know in the rule from which side the cube turns to which side.
This is listed in the log.
'buttonevent': 2001,
I use Conbee 2 stick with deconz.
https://github.com/dresden-elektronik/d ... issues/138
Here is the buttonevent codes:
x000 for push, so 1000, 2000, 3000, 4000, 5000, 6000;
x00x for double tap, so 1001, 2002, 3003, 4004, 5005, 6006;
x00o for 180° flip (where o = 7 - x), so 1006, 2005, 3004, 4003, 5002, 6001;
x00y for 90° flip (where y ≠ x and y ≠ 7 - x), so 1002, 1003, 1004, 1005, 2001, 2003, 2004, 2006, 3001, 3002, 3005, 3006, 4001, 4002, 4005, 4006, 5001, 5003, 5004, 5006, 6002, 6003, 6004, 6005;
7007 for shake;
7008 for drop (EDITED);
7000 for wakeup (the cube sends raw value 2 when I just tap it after a while).
Code: Select all
2020-08-04 19:20:09.830 (deCONZ-Zigbee) ### WebSocket Data : {'e': 'changed', 'id': '20', 'r': 'sensors', 'state': {'buttonevent': 2001, 'gesture': 3, 'lastupdated': '2020-08-04T17:20:09.814'}, 't': 'event', 'uniqueid': '00:15:8d:00:04:2f:1f:9f-02-0012'}
2020-08-04 19:20:09.831 (deCONZ-Zigbee) ### Update device (deCONZ-Zigbee - lumi.sensor_cube.aqgl01 20) : {'nValue': 40, 'sValue': '40'}
2020-08-04 19:20:09.831 (deCONZ-Zigbee - lumi.sensor_cube.aqgl01 20) Updating device from 0:'Off' to have values 40:'40'.
2020-08-04 19:20:10.127 (deCONZ-Zigbee) Pushing 'onCommandCallback' on to queue
2020-08-04 19:20:10.172 (deCONZ-Zigbee) Processing 'onCommandCallback' message
2020-08-04 19:20:10.173 (deCONZ-Zigbee) Calling message handler 'onCommand'.
2020-08-04 19:20:10.173 (deCONZ-Zigbee) onCommand called for Unit 18: Parameter 'Set Level', Level: 100, Hue:
2020-08-04 19:20:10.173 (deCONZ-Zigbee) Send Command /api/C94AB24840/lights/5/state with {'on': True, 'bri': 254} (0 in buffer)
2020-08-04 19:20:10.174 (deCONZ-Zigbee) Making Request : http://127.0.0.1:8088/api/C94AB24840/lights/5/state with params {'on': True, 'bri': 254}
2020-08-04 19:20:10.196 (deCONZ-Zigbee) Request Return : [{"success":{"/lights/5/state/on":true}},{"success":{"/lights/5/state/bri":254}}]
2020-08-04 19:20:10.196 (deCONZ-Zigbee) Classic Data : [{'success': {'/lights/5/state/on': True}}, {'success': {'/lights/5/state/bri': 254}}]
2020-08-04 19:20:10.098 Status: dzVents: Info: Handling events for: "deCONZ-Zigbee - lumi.sensor_cube.aqgl01 20", value: "90°"How can this be applied in dzvents ( buttonevent)?