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

Energy measurement reset on a schedule / from MQTT #770

Closed
hyteoo opened this issue Apr 8, 2018 · 10 comments
Closed

Energy measurement reset on a schedule / from MQTT #770

hyteoo opened this issue Apr 8, 2018 · 10 comments
Labels
enhancement New feature or request sensors

Comments

@hyteoo
Copy link
Contributor

hyteoo commented Apr 8, 2018

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.

@hyteoo hyteoo changed the title Energy measurement on a schedule / frmo MQTT Energy measurement on a schedule / from MQTT Apr 8, 2018
@hyteoo hyteoo changed the title Energy measurement on a schedule / from MQTT Energy measurement reset on a schedule / from MQTT Apr 8, 2018
@xoseperez xoseperez added enhancement New feature or request sensors labels Apr 12, 2018
@bignooz
Copy link

bignooz commented Jan 19, 2019

MQTT reset would be a Great PLUS. As i use ony mqtt in my home automation system.

Thank you !

@xoseperez xoseperez added this to the 1.13.5 milestone Jan 20, 2019
@xoseperez xoseperez removed this from the 1.13.5 milestone Feb 24, 2019
@bignooz
Copy link

bignooz commented Mar 6, 2019

"@xoseperez xoseperez removed this from the 1.13.5 milestone 10 days ago"

Is this modification cancelled ?

@bignooz
Copy link

bignooz commented Jun 8, 2019

Hi!
Has this enhancement been totally cancelled?

@CoolID2
Copy link

CoolID2 commented Feb 11, 2020

Hi,
what's the status of fhis feature request?
That would be a cool additional function that I could use.

@Jessendelft
Copy link

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)

@mcspr
Copy link
Collaborator

mcspr commented Dec 11, 2020

RE: above, both MQTT (through a .../set topic) and HTTP API should already work with dev builds
Scheduling part is something to add though

@sjevtic
Copy link

sjevtic commented Feb 22, 2021

Can you elaborate on how to reset the energy counter through the HTTP API?

@mcspr
Copy link
Collaborator

mcspr commented Feb 24, 2021

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)

@Jessendelft
Copy link

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

@mcspr
Copy link
Collaborator

mcspr commented Aug 19, 2022

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 7f15da5

@mcspr mcspr closed this as completed Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sensors
Projects
None yet
Development

No branches or pull requests

7 participants