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

Auto-disable smart grid / require heartbeat msg to avoid being left in "high consumption modes" if control system fails #456

Open
lougreenwood opened this issue Sep 17, 2024 · 2 comments

Comments

@lougreenwood
Copy link

lougreenwood commented Sep 17, 2024

I recently got the project working and I'm loving it - thank you to all contributors!

However I had an incident 2 days ago where the heat pump was turned on using the SG feature and then for some reason my control software which sends the SG control messages failed, so there was no message to power off when there was no solar surplus, leaving the system running in SG "forced on" during peak electricity prices.

As this incident shows, the control of SG is not robust or failure resistant enough and these failures can have financial consequences.

The idea I had was the addition of a SG mode where the control system must send a the espaltherma/sg/set message every X (30?) seconds - this will operate as a kind of "heartbeat ping" monitoring that the control system didn't go AWOL and the current SG mode is valid, functioning as a signal to ESPAltherma a signal that it should back out to it's normal running mode if the message isn't received.

If the message is not sent then it falls back to it's default state of "normal" SG mode.

This would be a breaking change, so probably wants to be a configurable option vs the current implementation.

Or maybe more generically we may just add an SG_MODE_MAX_TIME - type const, if it's undefined then there's no timeout. If a timeout is defined then the SG reverts to normal. If a new msg is received it resets the timer.

@lougreenwood
Copy link
Author

I don't know C, i'm a typescript dev, but I might see how far I can get with Claude of o1-mini creating a PR for this over the next few days...

@lougreenwood
Copy link
Author

FYI, I have a working version. Need to clean up a little (& add tests?) and will be able to publish a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant