Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Plugin 102 (PZEM) Energy reset will reset energy one time and at each board reboot #5145

Open
iz8mbw opened this issue Oct 22, 2024 · 4 comments
Labels
Category: Plugin Related to supported sensors Category: UX Related to operating ESP-easy Type: Enhancement Improve something already present

Comments

@iz8mbw
Copy link
Contributor

iz8mbw commented Oct 22, 2024

Hello.
I noticed that if I reset the Energy of the PZEM:
image

it works OK since it reset the Energy value.
But if I reboot the board it will go reset the Energy value (again), if reboot again it will reset the Energy value again and so on.

To avoid it, after the first Energy reset, I must click on "Submit" to force again the "PZEM Mode" to Read_value.
image

In other words, when you reset the Energy value
image
and click "Submit" the Energy value is resetted and the web page ruterned (after the reset) is automatically changed to "Read_value." but if you reboot the board the Energy value is resetted again and resetted at every board reboot.

@TD-er
Copy link
Member

TD-er commented Oct 22, 2024

Isn't there a command to reset the value?

To be honest, I do think this is a design oversight as it makes no sense to reset it each time the plugin is started.

@TD-er TD-er added Type: Enhancement Improve something already present Category: Plugin Related to supported sensors Category: UX Related to operating ESP-easy labels Oct 22, 2024
@iz8mbw
Copy link
Contributor Author

iz8mbw commented Oct 22, 2024

Isn't there a command to reset the value?

Yes, you can reset via editing the Device (so from the Web page like I did and disovered the issue) or you can reset via HTTP GET to http://espeasyip/control?cmd=resetenergy,PZEM address

To be honest, I do think this is a design oversight as it makes no sense to reset it each time the plugin is started.

Indeed, this is the bug.

@tonhuisman
Copy link
Contributor

Feels like a bug, looking at the code, as during PLUGIN_INIT the mode is reset to Reading mode after executing the Reset, but it's never saved...
But there are other things to observe(fix?) there, as the 'multi-instance' implementation isn't very multi-instance, AFAICS.

@TD-er
Copy link
Member

TD-er commented Oct 22, 2024

But there are other things to observe(fix?) there, as the 'multi-instance' implementation isn't very multi-instance, AFAICS.

That's because it is planned for a huge overhaul when I implement the Modbus handler/manager to share all modbus calls from all modbus plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Plugin Related to supported sensors Category: UX Related to operating ESP-easy Type: Enhancement Improve something already present
Projects
None yet
Development

No branches or pull requests

3 participants