niceboygithub / AqaraGateway

Aqara Gateway/Hub integration for Home Assistant
518 stars 66 forks source link

Contact sensor does not report battery state #65

Closed mrammal closed 8 months ago

mrammal commented 2 years ago

lumi.magnet.acn001 MCCGQ14LM by Aqara Connected via Aqara Hub E1 Firmware: 4

HA: core-2021.12.4

Reports unknown battery state. Water leak sensor and temperature sensor report battery state just fine.

niceboygithub commented 2 years ago

Can you help to provide the mqtt logs?

kagwind commented 2 years ago

I have similar issues with various types of devices. The log is attached at the end of this comment.

~~The log shows that while the temperature sensor (lumi.weather) usually reports the battery level (with one exception at the end of the log), the door sensor (lumi.sensor_magnet.aq2) and the motion sensor (lumi.sensor_motion.aq2) do not. I also have a water leak sensor (lumi.sensor_wleak.aq1), which doesn't show the battery level either.~~ The comment above is no longer correct. Please see the next part.

PS: The battery level is correctly reported in other integrations, e.g. homekit controller.

The partial log is the following: ------------beginning of log 1-------------------

2022-01-27 18:50:35 DEBUG main SysInfo: {'installation_type': 'Home Assistant OS', 'version': '2021.12.10', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.9.7', 'docker': True, 'arch': 'aarch64', 'os_name': 'Linux', 'os_version': '5.10.63-v8', 'user': 'root', 'supervisor': '2021.12.2', 'host_os': 'Home Assistant OS 7.2', 'docker_version': '20.10.9', 'chassis': 'embedded'} 2022-01-27 18:50:35 DEBUG gateway 192.168.31.201: mosquitto is not running as public! 2022-01-27 18:53:42 DEBUG gateway 192.168.31.201: lumi.158d00073a41d1 lumi.weather <= {'voltage': 72, 'battery': 67, 'pre_state': 4, 'cur_state': 3, 'power_tx': 10, 'CCA': 1, 'reset_cnt': 9, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, '8.0.2033': 0, 'temperature': 21.19, 'humidity': 79.08, 'pressure': 1006.21, 'parent': '', 'fw_ver': 0, 'hw_ver': 0, 'lqi': 104} [1643280822.0388258] 2022-01-27 19:01:41 DEBUG gateway 192.168.31.201: lumi.158d0007dfac26 lumi.sensor_magnet.aq2 <= {'contact': 1} [1643281301.397679] 2022-01-27 19:01:45 DEBUG gateway 192.168.31.201: lumi.158d0007dfac26 lumi.sensor_magnet.aq2 <= {'contact': 0} [1643281305.4166055] 2022-01-27 19:09:06 DEBUG gateway 192.168.31.201: lumi.158d00073a41d1 lumi.weather <= {'temperature': 21.24} [1643281746.5293417] 2022-01-27 19:09:06 DEBUG gateway 192.168.31.201: lumi.158d00073a41d1 lumi.weather <= {'humidity': 79.13} [1643281746.5316823] 2022-01-27 19:09:06 DEBUG gateway 192.168.31.201: lumi.158d00073a41d1 lumi.weather <= {'pressure': 1006.5} [1643281746.5340075]

---------------end of log 1-----------------------------

It seems that the battery level of some sensors is reported with a separate message and with a very low rate. Therefore, it may take a while for the battery level becomes available after a reboot.

-----------beginning of log 2-------------------

2022-01-27 19:20:39 DEBUG gateway 192.168.31.201: lumi.158d0006fe4a4a lumi.sensor_wleak.aq1 <= {'voltage': 81, 'battery': 77, 'chip_temperature': 24, 'pre_state': 1, 'cur_state': 3, 'power_tx': 10, 'CCA': 1, 'reset_cnt': 8, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, '8.0.2033': 0, 'fw_ver': 6, 'hw_ver': 2, 'parent': '', 'moisture': 0, 'lqi': 60} [1643282439.112999] 2022-01-27 19:28:37 DEBUG gateway 192.168.31.201: lumi.158d000774f786 lumi.sensor_motion.aq2 <= {'voltage': 76, 'battery': 72, 'chip_temperature': 25, 'pre_state': 4, 'cur_state': 3, 'power_tx': 10, 'CCA': 1, 'reset_cnt': 11, 'send_all_cnt': 35, 'send_fail_cnt': 0, 'send_retry_cnt': 0, '8.0.2033': 0, 'parent': '', 'illuminance_lux': 20, 'fw_ver': 0, 'hw_ver': 0, 'lqi': 98} [1643282917.6918705]

-----------end of log 2-------------------

terenceng81 commented 2 years ago

I have exactly the the same issue...

image

I read two articles below, seems it is fixed with iobroker by exposed status and battery, what about AqaraGateway component for HA :-)

{ zigbeeModel: ['lumi.magnet.acn001'], model: 'MCCGQ14LM', vendor: 'Xiaomi', description: 'Aqara E1 door & window contact sensor', fromZigbee: [fz.ias_contact_alarm_1, fz.aqara_opple_report], toZigbee: [], exposes: [e.contact(), e.battery(), e.battery_voltage()], configure: async (device, coordinatorEndpoint, logger) => { await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['ssIasZone']); },

https://github.com/ioBroker/ioBroker.zigbee/issues/1245 https://github.com/zigpy/zha-device-handlers/issues/1088

Hope it can be fixed in the next release :-)

terenceng81 commented 2 years ago

Really appreciate if anyone could look into this, thanks!

terenceng81 commented 2 years ago

@niceboygithub sorry to tag u but i really wish it can be resolved. :-)

niceboygithub commented 2 years ago

I didn’t have door sensor E1. Need someone provide me more logs of door sensor E1.

terenceng81 commented 2 years ago

I didn’t have door sensor E1. Need someone provide me more logs of door sensor E1.

Sure niceboy, may I know which logs u need? I can collect and paste it here.

terenceng81 commented 2 years ago

sorry as i could not find any useful info..

2022-02-04 18:34:46 DEBUG main SysInfo: {'installation_type': 'Home Assistant OS', 'version': '2022.2.0', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.9.7', 'docker': True, 'arch': 'x86_64', 'os_name': 'Linux', 'os_version': '5.10.91', 'user': 'root', 'supervisor': '2022.01.1', 'host_os': 'Home Assistant OS 7.2', 'docker_version': '20.10.9', 'chassis': 'vm'} 2022-02-04 18:34:47 DEBUG gateway 192.168.5.4: mosquitto is not running as public! 2022-02-04 18:35:20 DEBUG gateway 192.168.5.4: mosquitto is not running as public! 2022-02-04 18:35:21 DEBUG gateway 192.168.5.4: gateway <= [{'res_name': '8.0.2021', 'value': 'time:2022-2-4 18:35:20.785,channel 0x0b, pan 0xdea2, mac 0x54ef441000225e42, version 5.26 noUartMsgCount:1'}] 2022-02-04 18:35:21 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015287,"did":"lumi.0","dev_src":"0","time":1643970920785,"rssi":-31,"params":[{"res_name":"8.0.2021","value":"time:2022-2-4 18:35:20.785,channel 0x0b, pan 0xdea2, mac 0x54ef441000225e42, version 5.26 noUartMsgCount:1"}]} 2022-02-04 18:35:21 DEBUG gateway 192.168.5.4: gateway <= [{'res_name': '8.0.2021', 'value': 'time:2022-2-4 18:35:20.785,channel 0x0b, pan 0xdea2, mac 0x54ef441000225e42, version 5.26 noUartMsgCount:1'}] 2022-02-04 18:35:22 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015288,"did":"lumi.0","time":1643970921610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:23 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015289,"did":"lumi.0","time":1643970922610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:24 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015290,"did":"lumi.0","time":1643970923610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:39 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015291,"did":"lumi.0","time":1643970938610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:41 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015292,"did":"lumi.0","time":1643970940610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:44 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015293,"did":"lumi.0","time":1643970943610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:47 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015294,"did":"lumi.0","time":1643970946610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:54 DEBUG gateway 192.168.5.4: mosquitto is not running as public! 2022-02-04 18:35:55 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015295,"did":"lumi.0","time":1643970954610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:55 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015295,"did":"lumi.0","time":1643970954610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:56 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015296,"did":"lumi.0","time":1643970955610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:35:56 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015296,"did":"lumi.0","time":1643970955610,"rssi":-31,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015297,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970982782,"rssi":-31,"mi_spec":[{"siid":4,"piid":1,"value":1}]} 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'tvoc_level': 1} [1643970983.4039466] 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015297,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970982782,"rssi":-31,"mi_spec":[{"siid":4,"piid":1,"value":1}]} 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'tvoc_level': 1} [1643970983.40445] 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015298,"did":"lumi.54ef44100009057c","time":1643970982789,"rssi":-24,"zseq":196,"params":[{"res_name":"8.0.2041","value":417}],"dev_src":"0"} 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'model': 417} [1643970983.4971642] 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015298,"did":"lumi.54ef44100009057c","time":1643970982789,"rssi":-24,"zseq":196,"params":[{"res_name":"8.0.2041","value":417}],"dev_src":"0"} 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'model': 417} [1643970983.497757] 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":41991,"type":"rgb","ver":1} 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":46087,"type":"rgb","ver":1} 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"behave","data":{"blue":77,"duration":-1,"green":77,"off_period":200,"on_period":100,"persist":false,"post_delay":200,"pre_delay":200,"red":0,"repeat":3},"id":50183,"type":"rgb","ver":1} 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":41991,"type":"rgb","ver":1} 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":46087,"type":"rgb","ver":1} 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"behave","data":{"blue":77,"duration":-1,"green":77,"off_period":200,"on_period":100,"persist":false,"post_delay":200,"pre_delay":200,"red":0,"repeat":3},"id":50183,"type":"rgb","ver":1} 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'tvoc_level': 1} [1643970983.6989276] 2022-02-04 18:36:23 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'model': 417} [1643970983.6993864] 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:24 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015299,"did":"lumi.0","time":1643970983610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:24 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015299,"did":"lumi.0","time":1643970983610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/send {"ver":1,"type":"rgb","cmd":"behaved","id":50183} 2022-02-04 18:36:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/send {"ver":1,"type":"rgb","cmd":"behaved","id":50183} 2022-02-04 18:36:25 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015300,"did":"lumi.0","time":1643970984711,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:25 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015300,"did":"lumi.0","time":1643970984711,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":54529,"type":"rgb","ver":1} 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":54529,"type":"rgb","ver":1} 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":58625,"type":"rgb","ver":1} 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:25 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":58625,"type":"rgb","ver":1} 2022-02-04 18:36:25 WARNING gateway Unsupported cmd: %s 2022-02-04 18:36:30 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015301,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970990336,"rssi":-24,"mi_spec":[{"siid":3,"piid":1,"value":28.49}]} 2022-02-04 18:36:30 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'temperature': 28.49} [1643970990.9597485] 2022-02-04 18:36:30 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'temperature': 28.49} [1643970990.9599817] 2022-02-04 18:36:30 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015301,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970990336,"rssi":-24,"mi_spec":[{"siid":3,"piid":1,"value":28.49}]} 2022-02-04 18:36:30 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'temperature': 28.49} [1643970990.961383] 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015302,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970990354,"rssi":-24,"mi_spec":[{"siid":3,"piid":2,"value":61.13}]} 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'humidity': 61.13} [1643970991.0049798] 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015302,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970990354,"rssi":-24,"mi_spec":[{"siid":3,"piid":2,"value":61.13}]} 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'humidity': 61.13} [1643970991.00636] 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'humidity': 61.13} [1643970991.0081751] 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015303,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970990373,"rssi":-24,"mi_spec":[{"siid":3,"piid":3,"value":188}]} 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'tvoc': 188} [1643970991.1133459] 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015303,"did":"lumi.54ef44100009057c","dev_src":"0","time":1643970990373,"rssi":-24,"mi_spec":[{"siid":3,"piid":3,"value":188}]} 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'tvoc': 188} [1643970991.1140435] 2022-02-04 18:36:31 DEBUG gateway 192.168.5.4: lumi.54ef44100009057c lumi.airmonitor.acn01 <= {'tvoc': 188} [1643970991.1143842] 2022-02-04 18:36:55 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015304,"did":"lumi.0","time":1643971014610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:55 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015304,"did":"lumi.0","time":1643971014610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:56 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015305,"did":"lumi.0","time":1643971015610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:56 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015305,"did":"lumi.0","time":1643971015610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:57 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015306,"did":"lumi.0","time":1643971016610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:57 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015306,"did":"lumi.0","time":1643971016610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:59 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015307,"did":"lumi.0","time":1643971018610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:36:59 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015307,"did":"lumi.0","time":1643971018610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:00 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015308,"did":"lumi.0","time":1643971019610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":1}],"dev_src":"0"} 2022-02-04 18:37:00 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015308,"did":"lumi.0","time":1643971019610,"rssi":-24,"zseq":0,"params":[{"res_name":"0.3.85","value":1}],"dev_src":"0"} 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015309,"did":"lumi.54ef441000250727","time":1643971042431,"rssi":-32,"zseq":110,"params":[{"res_name":"8.0.2041","value":450}],"mi_spec":[{"siid":1,"piid":2,"value":""}],"dev_src":"0"} 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'model': 450} [1643971043.0493326] 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015309,"did":"lumi.54ef441000250727","time":1643971042431,"rssi":-32,"zseq":110,"params":[{"res_name":"8.0.2041","value":450}],"mi_spec":[{"siid":1,"piid":2,"value":""}],"dev_src":"0"} 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'model': 450} [1643971043.0500567] 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'model': 450} [1643971043.050756] 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":62471,"type":"rgb","ver":1} 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":62471,"type":"rgb","ver":1} 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":1031,"type":"rgb","ver":1} 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"behave","data":{"blue":77,"duration":-1,"green":77,"off_period":200,"on_period":100,"persist":false,"post_delay":200,"pre_delay":200,"red":0,"repeat":3},"id":5127,"type":"rgb","ver":1} 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":1031,"type":"rgb","ver":1} 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:23 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"behave","data":{"blue":77,"duration":-1,"green":77,"off_period":200,"on_period":100,"persist":false,"post_delay":200,"pre_delay":200,"red":0,"repeat":3},"id":5127,"type":"rgb","ver":1} 2022-02-04 18:37:23 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/send {"ver":1,"type":"rgb","cmd":"behaved","id":5127} 2022-02-04 18:37:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/send {"ver":1,"type":"rgb","cmd":"behaved","id":5127} 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":9473,"type":"rgb","ver":1} 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":9473,"type":"rgb","ver":1} 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":13569,"type":"rgb","ver":1} 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:24 DEBUG gateway 192.168.5.4: MQTT on_message: ioctl/recv {"cmd":"control","data":{"blue":0,"breath":500,"green":0,"red":0},"id":13569,"type":"rgb","ver":1} 2022-02-04 18:37:24 WARNING gateway Unsupported cmd: %s 2022-02-04 18:37:26 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015310,"did":"lumi.0","time":1643971045633,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:26 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015310,"did":"lumi.0","time":1643971045633,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:27 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015311,"did":"lumi.0","time":1643971046633,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:27 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015311,"did":"lumi.0","time":1643971046633,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:28 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015312,"did":"lumi.54ef441000250727","dev_src":"0","time":1643971047447,"rssi":-32,"mi_spec":[{"siid":3,"piid":2,"value":2987},{"siid":3,"piid":1,"value":1}]} 2022-02-04 18:37:28 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'voltage': 70, '3.1': 1} [1643971048.0668561] 2022-02-04 18:37:28 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015312,"did":"lumi.54ef441000250727","dev_src":"0","time":1643971047447,"rssi":-32,"mi_spec":[{"siid":3,"piid":2,"value":2987},{"siid":3,"piid":1,"value":1}]} 2022-02-04 18:37:28 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'voltage': 70, '3.1': 1} [1643971048.0673149] 2022-02-04 18:37:28 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'voltage': 70, '3.1': 1} [1643971048.0682602] 2022-02-04 18:37:28 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015313,"did":"lumi.0","time":1643971047648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:28 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015313,"did":"lumi.0","time":1643971047648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:29 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015314,"did":"lumi.0","time":1643971048648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":1}],"dev_src":"0"} 2022-02-04 18:37:29 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015314,"did":"lumi.0","time":1643971048648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":1}],"dev_src":"0"} 2022-02-04 18:37:30 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015315,"did":"lumi.0","time":1643971049648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":1}],"dev_src":"0"} 2022-02-04 18:37:30 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015315,"did":"lumi.0","time":1643971049648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":1}],"dev_src":"0"} 2022-02-04 18:37:31 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015316,"did":"lumi.0","time":1643971050648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:31 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015316,"did":"lumi.0","time":1643971050648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:32 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015317,"did":"lumi.0","time":1643971051648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:32 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015317,"did":"lumi.0","time":1643971051648,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:48 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015318,"did":"lumi.54ef441000250727","dev_src":"0","time":1643971067982,"rssi":-32,"mi_spec":[{"siid":2,"piid":1,"value":false}]} 2022-02-04 18:37:48 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'contact': False} [1643971068.5914626] 2022-02-04 18:37:48 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'contact': False} [1643971068.5921366] 2022-02-04 18:37:48 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015318,"did":"lumi.54ef441000250727","dev_src":"0","time":1643971067982,"rssi":-32,"mi_spec":[{"siid":2,"piid":1,"value":false}]} 2022-02-04 18:37:48 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'contact': False} [1643971068.5926392] 2022-02-04 18:37:52 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015319,"did":"lumi.0","time":1643971071658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:37:52 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015319,"did":"lumi.0","time":1643971071658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:38:09 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'contact': True} [1643971089.7554092] 2022-02-04 18:38:09 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015320,"did":"lumi.54ef441000250727","dev_src":"0","time":1643971089147,"rssi":-32,"mi_spec":[{"siid":2,"piid":1,"value":true}]} 2022-02-04 18:38:09 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'contact': True} [1643971089.756245] 2022-02-04 18:38:09 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015320,"did":"lumi.54ef441000250727","dev_src":"0","time":1643971089147,"rssi":-32,"mi_spec":[{"siid":2,"piid":1,"value":true}]} 2022-02-04 18:38:09 DEBUG gateway 192.168.5.4: lumi.54ef441000250727 lumi.magnet.acn001 <= {'contact': True} [1643971089.7567728] 2022-02-04 18:38:27 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015321,"did":"lumi.0","time":1643971106658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:38:27 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015321,"did":"lumi.0","time":1643971106658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:38:28 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015322,"did":"lumi.0","time":1643971107658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:38:28 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015322,"did":"lumi.0","time":1643971107658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:38:55 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015323,"did":"lumi.0","time":1643971134658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"} 2022-02-04 18:38:55 DEBUG gateway 192.168.5.4: MQTT on_message: zigbee/send {"cmd":"report","id":2000015323,"did":"lumi.0","time":1643971134658,"rssi":-32,"zseq":0,"params":[{"res_name":"0.3.85","value":0}],"dev_src":"0"}

terenceng81 commented 2 years ago

let me know what to do next @niceboygithub thanks!

niceboygithub commented 2 years ago

Which mode you use? Mi mode or Aqara mode?

terenceng81 commented 2 years ago

Which mode you use? Mi mode or Aqara mode?

Sorry niceboy i am not sure which mode I am using.

What I did is that I extracted the token via token_extractor.exe for my Aqara Gateway M1S. It has been added via my Mi Home App so I assume I should be using Mi mode.

terenceng81 commented 2 years ago

Thanks for marking it as a bug