espurna
espurna copied to clipboard
Energy measurement reset on a schedule / from MQTT
Coming from issue #671 I think in order to complete this functionality would be to implement an auto reset.
I'm thinking of a real world situation where the kWh would be recorded every month, so a reset at the 1st of any month would make sense.
An elegant way to do this would be to tie into the already existing scheduling engine, however I haven't gone into the code there so I'm not sure how hard that would be.
Another feature would be to reset via a MQTT command. I'm thinking of having the reset time/day coordinated from a central point for several devices.
MQTT reset would be a Great PLUS. As i use ony mqtt in my home automation system.
Thank you !
"@xoseperez xoseperez removed this from the 1.13.5 milestone 10 days ago"
Is this modification cancelled ?
Hi! Has this enhancement been totally cancelled?
Hi, what's the status of fhis feature request? That would be a cool additional function that I could use.
I'd like to vote for this feature as well. And to add that it should also be possible to do this via the RESTapi (PUT api/energy value=0.0)
RE: above, both MQTT (through a .../set topic) and HTTP API should already work with dev builds Scheduling part is something to add though
Can you elaborate on how to reset the energy counter through the HTTP API?
See the /api/list
output, if you are running latest versions from the dev branch for all available endpoints. There should be /api/energy
returning current value on GET. Sending value=0
will reset the energy to 0 (but, only if the sensor supports it)
Did this feature break in more recent versions?
On version 2021-01-22 I can send an MQTT command as follow:
ESPURNA/energy/0/set
with a payload 0, and it resets the energy to 0.
On more recent versions, including 2022-06-13 and 2022-05-24, sending this same MQTT command does absolutely nothing
Did this feature break in more recent versions? On version 2021-01-22 I can send an MQTT command as follow:
ESPURNA/energy/0/set
with a payload 0, and it resets the energy to 0. On more recent versions, including 2022-06-13 and 2022-05-24, sending this same MQTT command does absolutely nothing
See #2530 and Releases page in this repo for .bin if you meant nightly release date, MQTT actually causes a crash edit: specific fix is https://github.com/xoseperez/espurna/commit/7f15da59ee6cae65664f6e5f9b7d6748fe09d91d