OpenDTU
OpenDTU copied to clipboard
Dynamic Limit API
Is your feature request related to a problem? Please describe.
I want to implement dynamic power limits using Web API of OpenDTU to ensure we do not dump more than 600w to the network as required in most countries in EU.
The problem is that, if the WIFI or the controller dies, the limit may be left unmanaged at a value that is too high.
Describe the solution you'd like
The easiest solution I can envision is a new dynamic limit WebAPI that receives a temporal limit in Watts and a timeout in seconds. This API will cancel any previous scheduled reset that may be pending, apply the new temporal limit as non-persistant and schedule a limit reset in the given amount of seconds.
This way, if no new limit is received in X seconds, we revert to the persistent limit. This will reduce the chances of uncompliant energy dumps greatly.
Describe alternatives you've considered
No response
Additional context
No response