zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Data from Xiaomi WXKG01LM devices not published to queue immediately

Open plaes opened this issue 5 years ago • 12 comments

What happened

After upgrade to Zigbee2MQTT version 1.21.0 (from 1.17), I noticed that data based on Xiaomi WXKG01LM action is not sent immediately, but instead seems to sit in some kind of queue (until any other non-WXKG01LM device publishes data).

How to reproduce it (minimal and precise)

  1. Start following the logfile..
  2. Press the Xiaomi WXKG01LM button
  3. Observe for ~30 seconds that nothing is happening in the zigbee topics
  4. Publish something else on the zigbee2mqtt/xxx topics
  5. Data from Xiaomi WXKG01LM event is published

For example (first column is seconds):

T=00.0 - Push button on WSDCGQ01LM device
T+0.5s - Push Xiaomi WXKG01LM immediately after that
T+1.0s (notice that its data gets published)
... wait...
T+15.0s - Push button on WSDCGQ01LM
... data arrives from both WSDCGQ01LM and WXKG01LM

Debug info

Zigbee2MQTT version:1.21.0 / Adapter hardware: CC2652P (dongle from https://smartlight.me/smart-home-devices/zigbee-devices/zigbee-coordinator-v4-cc2652p ) Adapter firmware version: 20210708 (and 20210319)

plaes avatar Aug 28 '21 18:08 plaes

Can confirm I'm also seeing the same behaviour after upgrading Zigbee2MQTT from 1.20.0 to 1.21.1 and HA from 2021.8.8 to 2021.9.0 on RPI4.

Zigbee2MQTT version: 1.21.1 Coordinator firmware: 20200805 Home Assistant: 2021.9.0

IctBtx avatar Sep 02 '21 10:09 IctBtx

Could you provide the herdsman debug log of this?

See https://www.zigbee2mqtt.io/information/debug.html#zigbee-herdsman-debug-logging on how to enable the herdsman debug logging. Note that this is only logged to STDOUT and not to log files.

Koenkk avatar Sep 02 '21 15:09 Koenkk

@pedrolamas sounds the same as your problem (https://github.com/Koenkk/zigbee2mqtt/issues/8271)

Koenkk avatar Sep 02 '21 15:09 Koenkk

Agreed, it does sound similar!

pedrolamas avatar Sep 02 '21 15:09 pedrolamas

@IctBtx does downgrading z2m solve the problem?

Koenkk avatar Sep 02 '21 16:09 Koenkk

@Koenkk I did try reverting to my 1.20.0 backup earlier but still got the same behaviour.

I've also since upgraded the coordinator firmware to 20210708 but no change.

I'll get the herdsman debug log to you when I'm back at home but there might be a small delay before that happens.

(BTW Thanks for z2m - it's very rare I've ever had a problem with it!)

IctBtx avatar Sep 02 '21 16:09 IctBtx

@Koenkk Herdsman debug log attached. I single clicked "xiaomi_switch_4" roughly once every second, and you can see all the events grouped together at the end of the file. Hope this helps.

herdsman-debug.log

IctBtx avatar Sep 03 '21 12:09 IctBtx

Can you check if updating to the latest-dev solves the issue? (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

Koenkk avatar Sep 03 '21 19:09 Koenkk

Just updated to dev and no change I'm afraid.

IctBtx avatar Sep 03 '21 20:09 IctBtx

Same here :( 1.21.1 and HA core 2021.9.3. Response takes minutes from Xiaomi button and motion sensor..

bossgos avatar Sep 05 '21 13:09 bossgos

Seems the same as https://github.com/Koenkk/zigbee2mqtt/issues/8623 , looks to be related to the kernel

Koenkk avatar Sep 05 '21 17:09 Koenkk

Yup, confirmed it being a kernel issue.

plaes avatar Sep 07 '21 06:09 plaes