Open poggenpower opened 2 years ago
That's mostly an oversight / TODO, as my inverter is online all the time unless the BMS fails I had not really a driver to implement it yet, sorry.
The plan is to either add a reset()
-function to the dataclasses or re-instantiate them at the appropriate time, this would automatically make the metrics output empty as all values would be at the default None
.
I guess the best way to do this is by making the DeviceManager
go through its own startup sequence (again), which triggers (re)building its inventory so it knows what to query for. I thought about two triggers:
SIGHUP
is received, so if a firmware update is too fast one can trigger this without having to restart the whole thing. Though that's very low prio.Rebuilding the inventory is important anyway, because changes to the setup such as (physically) changing the battery or solar generator configuration need to be detected, and they happen when the device is offline. So this is the perfect time to cause this.
When the power switch went off at night, because of solar power outage, rtcmon is responding with the last read values. See screenshot. Is this by intention? Is there a way to reset the values when offline?