question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

energy measurement broken in latest dev version with MTS0121_plug (poll)

See original GitHub issue

Hi,

I’m runing the latest dev version (this to be specific) and the energy reporting doesn’t seems to work consistent.

I have 5 BlitzWolf SHP13 energy plugs in my zigbee network which support energy measurement via poll and the measurment worked fine until a few days(?) ago. It looks like that only a single device gets updated correctly now. All other 4 devices doesn’t seem to get updated energy measurements?

I saw the commit that changed the default poll interval to 60 seconds so I configured it back to 30 seconds (later to 15 sec for faster debugging).

This is my current devices config:

devices:
  '0x842e14fffe359b2e':
    friendly_name: niklas/plug/pc
    measurement_poll_interval: 15
  '0x842e14fffe3665fb':
    friendly_name: niklas/plug/monitor
    measurement_poll_interval: 15
  '0x842e14fffe3665eb':
    friendly_name: bathroom/plug/prusa_light
    measurement_poll_interval: 15

To quickly debug I switched back to the latest stable version 1.16.2 and everything worked again. Here is how it looks in Home Assistant: image

After that I switched back to the latest dev version and now only a single device (niklas/plug/pc) gets updated every 15 seconds:

image

I did enable the debug log but I can only see log entries for the niklas/plug/pc device. So there was not even an attempt to update the energy metrics from the other devices.

I don’t know how the internals work in zigbee2mqtt but my guess would be that the poll event loop is buggy and only checks the first device in the device config list?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Koenkkcommented, Dec 28, 2020

Found the bug, fixed now.

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

0reactions
elgergcommented, Jun 8, 2022

I’m pretty sure it only started working with the new poll rate after I restarted mine…

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found