forked from helgeerbe/OpenDTU-OnBattery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DPL: update inverter state continuously
we previously only called commitPowerLimit() if the desired limit changed such that the change was bigger than the hysteresis. we found that if the limit update was not received and the desired limit would not change much, the limit of the inverter was wrong for a long time. to mitigate this, we introduced re-sending the limit update every 60 seconds, regardless of what the limit reported by the inverter was at that time. if the powe-up command was not received, we also would repeat it only once every 60 seconds. this new approach calls commitPowerLimit unconditionally, and commitPowerLimit itself compares the desired inverter state to the reported state and sends an update (limit update or power on state) every time the inverter state is not as expected. this should make sure that the inverter is in the desired state even if conditions change slowly and commands were not received as expected.
- Loading branch information
1 parent
6aa9dfb
commit 110526b
Showing
2 changed files
with
53 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters