frequenz-floss / frequenz-sdk-python

Frequenz Python Software Development Kit (SDK)
https://frequenz-floss.github.io/frequenz-sdk-python/
MIT License
13 stars 17 forks source link

BatteryPool should log when outages end #547

Open shsms opened 1 year ago

shsms commented 1 year ago

When a battery/inverter pair is marked as NOT_WORKING, there is a component-level log like indicating that some downtime is starting. Like Inverter 248 stopped sending data. There should be a corresponding log message when the device starts sending data again. This needs to be done for other types of outages as well, and for other components. For example, a battery or inverter went into an error/unhealthy state. When that changes, there should be a log.

Marenz commented 1 year ago

I am not sure that's true. I see the WORKING status as well

2023-07-28 08:32:34,027,27 WARNING  [_battery_status.py:274] Inverter 248 stopped sending data, last timestamp: 2023-07-28 08:32:33.007461+00:00
2023-07-28 08:32:34,027,27 INFO     [_battery_status.py:284] battery 23 changed status Status.NOT_WORKING
2023-07-28 08:32:34,031,31 INFO     [_battery_status.py:284] battery 23 changed status Status.WORKING
2023-07-28 08:32:34,032,32 WARNING  [fcr_balancing_actor.py:272] Ignoring battery Capacity value of None.
2023-07-28 08:32:34,032,32 WARNING  [fcr_balancing_actor.py:259] Ignoring battery SoC value of None.
shsms commented 1 year ago

Oh right, I wrote it incorrectly. I guess I was thinking of inverter stopped sending data -> inverter started sending data, not just the state machine changes.

Because both inverter and battery could go into error state, and if one of them recover, there won't be a log.