XiaomiGateway3
XiaomiGateway3 copied to clipboard
Mesh wireless button XMWXKG01YL cannot be used
I have some Xiaomi's newest mesh wireless buttons XMWXKG01YL, and I tried to write converter in devices.py, but I found that the bluetooth spec is different to the former zigbee ones. This mesh one uses values of property to identify which button is clicked. I tried MapConv but cannot figure out how to use it. Could you please add support for it? Thanks.
You need to log data from this sensor: https://github.com/AlexxIT/XiaomiGateway3#debug-mode
You need to log data from this sensor: https://github.com/AlexxIT/XiaomiGateway3#debug-mode
Hi, I tried the first method but didn't see any logs in the notification center🤣
You need to log data from this sensor: https://github.com/AlexxIT/XiaomiGateway3#debug-mode
I have got the logs now, and here they are:
2022-08-26 19:21:10,608 192.168.0.103 [BASE] ccb5d199963e (6473) setup ble (6473): battery 2022-08-26 19:23:27,989 192.168.0.131 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":18435,"edata":"64","pdid":6473,"seq":175}' 2022-08-26 19:23:27,997 192.168.0.131 [BLEF] ccb5d199963e (6473) recv {'battery': 100} 2022-08-26 19:23:28,000 192.168.0.126 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":18435,"edata":"64","pdid":6473,"seq":175}' 2022-08-26 19:23:28,107 192.168.0.131 [MQTT] log/miio b'\x1b[0;32m2022:08:26:19:23:27.058 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":18435,"edata":"64"}],"frmCnt":175,"gwts":1661513007},"id":1087} length:190 bytes\x1b[0m' 2022-08-26 19:23:28,114 192.168.0.103 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":18435,"edata":"64","pdid":6473,"seq":175}' 2022-08-26 19:23:28,293 192.168.0.126 [MQTT] log/miio b'\x1b[0;32m2022:08:26:19:23:27.260 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":18435,"edata":"64"}],"frmCnt":175,"gwts":1661513007},"id":1206} length:190 bytes\x1b[0m' 2022-08-26 19:23:28,632 192.168.0.103 [MQTT] log/miio b'\x1b[0;32m2022:08:26:19:23:27.897 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":18435,"edata":"64"}],"frmCnt":175,"gwts":1661513006},"id":1125} length:190 bytes\x1b[0m' 2022-08-26 20:13:27,972 192.168.0.126 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":18435,"edata":"64","pdid":6473,"seq":176}' 2022-08-26 20:13:27,974 192.168.0.126 [BLEF] ccb5d199963e (6473) recv {'battery': 100} 2022-08-26 20:13:27,980 192.168.0.131 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":18435,"edata":"64","pdid":6473,"seq":176}' 2022-08-26 20:13:28,113 192.168.0.103 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":18435,"edata":"64","pdid":6473,"seq":176}' 2022-08-26 20:13:28,148 192.168.0.126 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:13:27.090 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":18435,"edata":"64"}],"frmCnt":176,"gwts":1661516007},"id":1936} length:190 bytes\x1b[0m' 2022-08-26 20:13:28,163 192.168.0.131 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:13:27.088 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":18435,"edata":"64"}],"frmCnt":176,"gwts":1661516007},"id":1739} length:190 bytes\x1b[0m' 2022-08-26 20:13:28,536 192.168.0.103 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:13:27.727 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":18435,"edata":"64"}],"frmCnt":176,"gwts":1661516006},"id":1815} length:190 bytes\x1b[0m' 2022-08-26 20:58:43,532 192.168.0.131 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":19980,"edata":"01","pdid":6473,"seq":177}' 2022-08-26 20:58:43,534 192.168.0.131 [BLEF] ccb5d199963e (6473) recv 2022-08-26 20:58:43,674 192.168.0.103 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":19980,"edata":"01","pdid":6473,"seq":177}' 2022-08-26 20:58:43,786 192.168.0.103 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:58:43.917 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":19980,"edata":"01"}],"frmCnt":177,"gwts":1661518723},"id":2384} length:190 bytes\x1b[0m' 2022-08-26 20:58:43,817 192.168.0.126 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":19980,"edata":"01","pdid":6473,"seq":177}' 2022-08-26 20:58:43,826 192.168.0.126 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:58:43.740 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":19980,"edata":"01"}],"frmCnt":177,"gwts":1661518723},"id":2523} length:190 bytes\x1b[0m' 2022-08-26 20:58:43,839 192.168.0.131 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:58:42.728 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":19980,"edata":"01"}],"frmCnt":177,"gwts":1661518722},"id":2301} length:190 bytes\x1b[0m' 2022-08-26 20:58:45,753 192.168.0.103 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":19980,"edata":"01","pdid":6473,"seq":178}' 2022-08-26 20:58:45,755 192.168.0.103 [BLEF] ccb5d199963e (6473) recv 2022-08-26 20:58:45,757 192.168.0.126 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":19980,"edata":"01","pdid":6473,"seq":178}' 2022-08-26 20:58:45,760 192.168.0.131 [MQTT] log/ble b'{"did":"blt.3.19uq54q3k5c01","eid":19980,"edata":"01","pdid":6473,"seq":178}' 2022-08-26 20:58:45,863 192.168.0.126 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:58:45.780 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":19980,"edata":"01"}],"frmCnt":178,"gwts":1661518725},"id":2527} length:190 bytes\x1b[0m' 2022-08-26 20:58:45,869 192.168.0.131 [MQTT] log/miio b'\x1b[0;32m2022:08:26:20:58:45.768 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"_async.ble_event","params":{"dev":{"did":"blt.3.19uq54q3k5c01","mac":"CC:B5:D1:99:96:3E","pdid":6473},"evt":[{"eid":19980,"edata":"01"}],"frmCnt":178,"gwts":1661518724},"id":2303} length:190 bytes\x1b[0m'
After checking the log, I have this correspondence of the ble data and real click. Hope this will help your work :) eid edata click 19980 01 left single 19980 02 right single 19980 03 both single 19981 01 left double 19981 02 right double 19982 01 left hold 19982 02 right hold