zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Problems with QBKG04LM

Open jasimancas opened this issue 8 years ago • 77 comments

When I push the button to turn on the QBKG04LM, this is the log:

2018-8-6 12:59:11 DEBUG Check online 0x00158d0001f4e65f 2018-8-6 12:59:11 DEBUG Check online 0x00158d00016d94bf 2018-8-6 12:59:11 DEBUG Check online 0x00158d0001b89324 2018-8-6 12:59:11 DEBUG Check online 0x00158d000200c16b 2018-8-6 12:59:11 DEBUG Check online 0x00158d000159a8b3 2018-8-6 12:59:11 DEBUG Check online 0x00158d0001b8939e 2018-8-6 12:59:11 DEBUG Check online 0x00158d000119911c 2018-8-6 12:59:39 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/interruptor_entrada/set' with data 'ON' 2018-8-6 12:59:39 INFO Zigbee publish to '0x00158d00016d94bf', genOnOff - on - {} - 2 2018-8-6 13:00:11 DEBUG Check online 0x00158d0001f4e65f 2018-8-6 13:00:11 DEBUG Check online 0x00158d00016d94bf 2018-8-6 13:00:11 DEBUG Check online 0x00158d0001b89324 2018-8-6 13:00:11 DEBUG Check online 0x00158d000200c16b 2018-8-6 13:00:11 DEBUG Check online 0x00158d000159a8b3 2018-8-6 13:00:11 DEBUG Check online 0x00158d0001b8939e 2018-8-6 13:00:11 DEBUG Check online 0x00158d000119911c

And dont turn on. Is random, sometimes it works well, sometimes it fails, any idea why? I have two QBKG04LM and same troubles.

jasimancas avatar Aug 06 '18 11:08 jasimancas

Could this be a range/interference issue?

Koenkk avatar Aug 07 '18 04:08 Koenkk

I doubt it, because when I push the switch the status changes to ON immediately and Zigbee2Mqtt reads the change of status, if it were interference I wouldn't read the change. And the same thing happens to both of us, it's random.

jasimancas avatar Aug 07 '18 06:08 jasimancas

I've added additional logging when a command fails, can you checkout the dev branch and reproduce the error?

Koenkk avatar Aug 07 '18 19:08 Koenkk

OK, although the problem is random, I install and test a few days to see if the problem repeats again.

jasimancas avatar Aug 07 '18 19:08 jasimancas

`2018-8-8 16:06:09 INFO MQTT publish, topic: 'zigbee2mqtt/pulsador_estudio', payload: '{"battery":"100.00","voltage":3062,"linkquality":23,"click":"single"}' 2018-8-8 16:06:09 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-8-8 16:06:09 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/interruptor_luz_estudio/set' with data 'OFF' 2018-8-8 16:06:09 INFO Zigbee publish to '0x00158d000159a8b3', genOnOff - off - {} - 2

SEND MESSAGE TO TURN OFF BUT DONT TURN OFF

2018-8-8 16:06:12 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0.10000000149011612}} 2018-8-8 16:06:12 INFO MQTT publish, topic: 'zigbee2mqtt/enchufe_dormitorio_ja', payload: '{"power":0.1,"linkquality":84,"state":"ON","voltage":null,"consumption":82.12,"temperature":39}' 2018-8-8 16:06:12 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0.10000000149011612}} 2018-8-8 16:06:15 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/interruptor_luz_estudio/set' with data 'OFF' 2018-8-8 16:06:15 INFO Zigbee publish to '0x00158d000159a8b3', genOnOff - off - {} - 2

AGAIN

2018-8-8 16:06:25 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":0}} 2018-8-8 16:06:25 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":0}} 2018-8-8 16:06:26 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-8-8 16:06:26 INFO MQTT publish, topic: 'zigbee2mqtt/pulsador_estudio', payload: '{"battery":"100.00","voltage":3062,"linkquality":2,"click":"single"}' 2018-8-8 16:06:26 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-8-8 16:06:26 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/interruptor_luz_estudio/set' with data 'OFF' 2018-8-8 16:06:26 INFO Zigbee publish to '0x00158d000159a8b3', genOnOff - off - {} - 2

AGAIN

2018-8-8 16:06:27 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":0}} 2018-8-8 16:06:27 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":0}} 2018-8-8 16:06:27 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":231.8300018310547}} 2018-8-8 16:06:27 INFO MQTT publish, topic: 'zigbee2mqtt/enchufe_pc', payload: '{"power":231.83,"linkquality":15,"state":"ON","voltage":null,"consumption":142.32,"temperature":37}' 2018-8-8 16:06:27 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":231.8300018310547}} 2018-8-8 16:06:28 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-8-8 16:06:28 INFO MQTT publish, topic: 'zigbee2mqtt/pulsador_estudio', payload: '{"battery":"100.00","voltage":3062,"linkquality":13,"click":"single"}' 2018-8-8 16:06:28 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-8-8 16:06:28 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/interruptor_luz_estudio/set' with data 'OFF' 2018-8-8 16:06:28 INFO Zigbee publish to '0x00158d000159a8b3', genOnOff - off - {} - 2

AGAIN

2018-8-8 16:06:28 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0}} 2018-8-8 16:06:28 INFO MQTT publish, topic: 'zigbee2mqtt/enchufe_dormitorio_ja', payload: '{"power":0,"linkquality":84,"state":"ON","voltage":null,"consumption":82.12,"temperature":39}' 2018-8-8 16:06:28 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0}} 2018-8-8 16:06:30 DEBUG Check online 0x00158d0001f4e65f 2018-8-8 16:06:30 DEBUG Check online 0x00158d00016d94bf 2018-8-8 16:06:30 DEBUG Check online 0x00158d0001b89324 2018-8-8 16:06:30 DEBUG Check online 0x00158d000200c16b 2018-8-8 16:06:30 DEBUG Check online 0x00158d000159a8b3 2018-8-8 16:06:30 DEBUG Check online 0x00158d0001b8939e 2018-8-8 16:06:30 DEBUG Check online 0x00158d000119911c 2018-8-8 16:06:47 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":210.32000732421875}} 2018-8-8 16:06:47 INFO MQTT publish, topic: 'zigbee2mqtt/enchufe_pc', payload: '{"power":210.32,"linkquality":84,"state":"ON","voltage":null,"consumption":142.32,"temperature":37}' 2018-8-8 16:06:47 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":210.32000732421875}} 2018-8-8 16:06:53 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":0}} 2018-8-8 16:06:53 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":0}} 2018-8-8 16:06:53 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-8-8 16:06:53 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-8-8 16:06:53 INFO MQTT publish, topic: 'zigbee2mqtt/pulsador_estudio', payload: '{"battery":"100.00","voltage":3062,"linkquality":5,"click":"single"}' 2018-8-8 16:06:53 DEBUG Recieved mqtt message on topic 'zigbee2mqtt/interruptor_luz_estudio/set' with data 'OFF'

SEND MESSAGE

2018-8-8 16:06:53 INFO Zigbee publish to '0x00158d000159a8b3', genOnOff - off - {} - 2 2018-8-8 16:06:54 INFO MQTT publish, topic: 'zigbee2mqtt/interruptor_luz_estudio', payload: '{"state":"OFF","linkquality":92}'

NOW YES !!!! (MAYBE AFTER CHECK IF IS ONLINE?)

2018-8-8 16:06:54 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"61440":117440697,"onOff":0}} 2018-8-8 16:06:54 INFO MQTT publish, topic: 'zigbee2mqtt/interruptor_luz_estudio', payload: '{"state":"OFF","linkquality":84}' 2018-8-8 16:06:54 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"61440":117440697,"onOff":0}} 2018-8-8 16:06:54 DEBUG Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":0}}`

The devide is: zigbee2mqtt/interruptor_luz_estudio (0x00158d000159a8b3)

jasimancas avatar Aug 08 '18 14:08 jasimancas

I don't see any error which should appear once a device request fails https://github.com/Koenkk/zigbee2mqtt/blob/dev/lib/zigbee.js#L190.

Can you provide the start of your log?

Koenkk avatar Aug 08 '18 16:08 Koenkk

log.txt

This is the log, Addons restarted and complete log, several tries but the device does not turn on

jasimancas avatar Aug 08 '18 19:08 jasimancas

log.txt The continuation of the log, I have turned it on manually (by clicking physically) and when you turn it off the problem is repeated.

jasimancas avatar Aug 08 '18 19:08 jasimancas

log.txt And now, randomly, it works

jasimancas avatar Aug 08 '18 19:08 jasimancas

I still don't see the error messages of the failed request, can you update to the latest dev branch?

Koenkk avatar Aug 09 '18 16:08 Koenkk

OK, i install in docker, the DEV version, and see that!

2018-8-9 22:38:44 ERROR Zigbee publish to '0x00158d00016d94bf', genOnOff - on - {} - 2 failed with error Error: AF data request fails, status code: 183. APS no ack. ,2018-8-9 22:38:53 INFO MQTT publish, topic: 'zigbee2mqtt/enchufe_dormitorio_ja', payload: '{"power":0,"linkquality":76,"state":"ON","voltage":null,"consumption":82.13,"temperature":39}' ,2018-8-9 22:38:53 DEBUG Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0}} ,2018-8-9 22:38:46 DEBUG Check online 0x00158d0001f4e65f ,2018-8-9 22:38:46 DEBUG Check online 0x00158d00016d94bf ,2018-8-9 22:38:46 DEBUG Check online 0x00158d0001b89324 ,2018-8-9 22:38:46 DEBUG Check online 0x00158d000200c16b ,2018-8-9 22:38:46 DEBUG Check online 0x00158d000159a8b3 ,2018-8-9 22:38:46 DEBUG Check online 0x00158d0001b8939e ,2018-8-9 22:38:47 ERROR Zigbee publish to '0x00158d00016d94bf', genOnOff - on - {} - 2 failed with error Error: AF data request fails, status code: 183. APS no ack. ,2018-8-9 22:38:46 DEBUG Check online 0x00158d000119911c

Is this? log.txt

jasimancas avatar Aug 09 '18 20:08 jasimancas

Great that it!

138 = 0Xb7 -> ZApsNoAck (aka no acknowledge received from device). This looks like a connection issue to me.

Koenkk avatar Aug 10 '18 12:08 Koenkk

In both devices? this issue only do in two QBKG04LM

jasimancas avatar Aug 10 '18 15:08 jasimancas

At least for 0x00158d00016d94bf

Koenkk avatar Aug 10 '18 17:08 Koenkk

Delete and repair?

jasimancas avatar Aug 10 '18 17:08 jasimancas

You can try but I don't think that will fix the problem, you should improve the stability of your network by adding routers.

Koenkk avatar Aug 10 '18 17:08 Koenkk

Currently 21 devices are joined: (0x00158d0001b91f59): WSDCGQ11LM - Xiaomi Aqara temperature, humidity and pressure sensor (EndDevice) (0x00158d0001f4124f): WXKG01LM - Xiaomi MiJia wireless switch (EndDevice) (0x00158d00013ff5f8): WXKG03LM - Xiaomi Aqara single key wireless wall switch (EndDevice) (0x00158d0001f4e65f): QBCZ11LM - Xiaomi Aqara socket Zigbee (Router) (0x00158d000183b81a): WXKG03LM - Xiaomi Aqara single key wireless wall switch (EndDevice) (0x00158d00015f2443): WXKG03LM - Xiaomi Aqara single key wireless wall switch (EndDevice) (0x00158d0001b91f39): WSDCGQ11LM - Xiaomi Aqara temperature, humidity and pressure sensor (EndDevice) (0x00158d0001b89324): QBCZ11LM - Xiaomi Aqara socket Zigbee (Router) (0x00158d00013fe2dc): WXKG03LM - Xiaomi Aqara single key wireless wall switch (EndDevice) (0x00158d00017102ad): WXKG03LM - Xiaomi Aqara single key wireless wall switch (EndDevice) (0x00158d0001b95e19): WSDCGQ11LM - Xiaomi Aqara temperature, humidity and pressure sensor (EndDevice) (0x00158d000186f722): WSDCGQ01LM - Xiaomi MiJia temperature & humidity sensor (EndDevice) (0x00158d000152e953): WXKG01LM - Xiaomi MiJia wireless switch (EndDevice) (0x00158d000200c16b): QBCZ11LM - Xiaomi Aqara socket Zigbee (Router) (0x00158d0001e119ae): WXKG02LM - Xiaomi Aqara double key wireless wall switch (EndDevice) (0x00158d000159a8b3): QBKG04LM - Xiaomi Aqara single key wired wall switch (Router) (0x00158d0001b8939e): QBCZ11LM - Xiaomi Aqara socket Zigbee (Router) (0x00158d000119911c): ZNCZ02LM - Xiaomi Mi power plug ZigBee (Router) (0x00158d00015f2692): RTCGQ01LM - Xiaomi MiJia human body movement sensor (EndDevice) (0x00158d0001838725): MCCGQ01LM - Xiaomi MiJia door & window contact sensor (EndDevice) (0x00158d00016d94bf): QBKG04LM - Xiaomi Aqara single key wired wall switch (Router)

More? Its a stability problem then?

jasimancas avatar Aug 10 '18 17:08 jasimancas

How is this device positioned in the network, is it further away than other devices?

Koenkk avatar Aug 10 '18 17:08 Koenkk

(0x00158d0001f4e65f): QBCZ11LM - Xiaomi Aqara socket Zigbee (Router) and (0x00158d00016d94bf): QBKG04LM - Xiaomi Aqara single key wired wall switch (Router) are in the same wall, in the same room, side by side.

jasimancas avatar Aug 10 '18 17:08 jasimancas

Does controlling of the QBCZ11LM always work?

Koenkk avatar Aug 10 '18 17:08 Koenkk