Page 1 of 1

How to configure electricity meter with ESP easy pulse counter?

Posted: Wednesday 29 September 2021 14:32
by Nautilus
I have setup a pulse counter with ESP easy to read the blinks from my electricity meter. After a week this seems to work realiably and I get the same total consumption as the electricity provider is reporting. However, I have a somes challenges.

There was a short blackout on Monday and I guess the pulse counter starts from zero at that point. So I got a huge negative reading to my device in Domoticz for this time. How should I set it up (a setting in Domoticz or device type, or a setting in ESP easy) so that it would only report the increment pulses to previous reading? I would like to use the device type in Domoticz that shows both current consumption and the used power. Must I use an incremental counter (which cannot show both values?) or is there a workaround
Capture.PNG
Capture.PNG (66.96 KiB) Viewed 4284 times
The other thing is that I have now set the reporting to every ten seconds. This seems to result in a situation that the reported power is quite often zero (although for sure the consumption is something, but the pulses come 1000/kWh so if it is low enough I get it there is no pulses). What I do not understand in why Domoticz shows it as zero even on the 5min graph:
Capture2.PNG
Capture2.PNG (99.07 KiB) Viewed 4284 times
Is there any other option than to increase the interval so that I would capture at least one pulse for every time ESP easy reports it forward?

And as a bonus, shift+click does not seem to work for energy usage in the short log to remove incorrect value. Domoticz will ask if I really want to remove it and I click "yes" but it stays there. Shift+click works fine on daily on monthly graphs for energy use.

Re: How to configure electricity meter with ESP easy pulse counter?

Posted: Wednesday 29 September 2021 17:14
by waltervl
You could try to let the ESPEasy first read the total current value from domoticz, add the pulse and send the new total.

Re: How to configure electricity meter with ESP easy pulse counter?

Posted: Saturday 02 October 2021 20:00
by marcojpolet
Hi,

Not 100% sure, but if you edit the counter in Domoticz, you can change the way it calculates; you can choose From device, which I think you have now. But you can set it to 'Compute' that way, Domoticz will take care of the totals.

Regards
Marco

Re: How to configure electricity meter with ESP easy pulse counter?

Posted: Wednesday 06 October 2021 22:22
by Nautilus
Thanks for the suggestions. I don't know any easy way to read the domoticz current value so I was thinking if I would just move to reporting the delta - should it then work (with delta instead of cumulative reporting) if I change the configuration on the device "from device" to "compute"?

Re: How to configure electricity meter with ESP easy pulse counter?

Posted: Wednesday 06 October 2021 23:29
by waltervl
For delta you need another type of device, the counter increment.
With your current device you could send only the current power (in Watt), with compute option the device will calculate the total Wh values

Re: How to configure electricity meter with ESP easy pulse counter?

Posted: Thursday 07 October 2021 0:01
by Nautilus
Ok, sounds good - will give that a try :)

Re: How to configure electricity meter with ESP easy pulse counter?

Posted: Thursday 12 September 2024 20:08
by dwmw2
I had a similar problem a few years ago and solved it with a LUA script:
https://www.domoticz.com/wiki/Lua_-_Ele ... se_counter

More recently I'm using ESPHome, so I've just submitted a PR which fixes the handling of `total_increasing` devices with MQTT AutoDiscovery: https://github.com/domoticz/domoticz/pull/6163