diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d9b205baa..584fce253 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,32 +2,16 @@ ## Summary -This release provides an experimental, opt-in, time-jumps resilient resampler, that can be enabled by using the new `ResamplerConfig2` class. + ## Upgrading -* The resampling function now takes plain `float`s as values instead of `Quantity` objects. -* `frequenz.sdk.timeseries.UNIX_EPOCH` was removed, use [`frequenz.core.datetime.UNIX_EPOCH`](https://frequenz-floss.github.io/frequenz-core-python/latest/reference/frequenz/core/datetime/#frequenz.core.datetime.UNIX_EPOCH) instead. + ## New Features -- A new configuration mode was added to the resampler (and thus the resampling actor and microgrid high-level interface). When passing a new `ResamplerConfig2` instance to the resampler, it will use a wall clock timer instead of a monotonic clock timer. This timer adjustes sleeps to account for drifts in the monotonic clock, and thus allows for more accurate resampling in cases where the monotonic clock drifts away from the wall clock. The monotonic clock timer option will be deprecated in the future, as it is not really suitable for resampling. The new `ResamplerConfig2` class accepts a `WallClockTimerConfig` to fine-tune the wall clock timer behavior, if necessary. - - Example usage: - - ```python - from frequenz.sdk import microgrid - from frequenz.sdk.timeseries import ResamplerConfig2 - - await microgrid.initialize( - MICROGRID_API_URL, - # Just replace the old `ResamplerConfig` with the new `ResamplerConfig2` - resampler_config=ResamplerConfig2(resampling_period=timedelta(seconds=1.0)), - ) - ``` + ## Bug Fixes -- When using the new wall clock timer in the resampmler, it will now resync to the system time if it drifts away for more than a resample period, and do dynamic adjustments to the timer if the monotonic clock has a small drift compared to the wall clock. - -- A power distributor logging issue is fixed, that was causing the power for multiple batteries connected to the same inverter to be reported incorrectly. +- The log level for when components are transitioning to a `WORKING` state is lowered to `INFO`, and the log message has been improved. diff --git a/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_ev_charger_status_tracker.py b/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_ev_charger_status_tracker.py index 56d3b3c1f..4b5de5f47 100644 --- a/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_ev_charger_status_tracker.py +++ b/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_ev_charger_status_tracker.py @@ -115,8 +115,8 @@ def _handle_ev_data(self, ev_data: EVChargerData) -> ComponentStatusEnum: if self._is_working(ev_data): if self._last_status == ComponentStatusEnum.NOT_WORKING: - _logger.warning( - "EV charger %s is in WORKING state.", + _logger.info( + "EV charger %s: state changed to WORKING.", self._component_id, ) return ComponentStatusEnum.WORKING diff --git a/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_pv_inverter_status_tracker.py b/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_pv_inverter_status_tracker.py index 467da6dc8..b464564a3 100644 --- a/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_pv_inverter_status_tracker.py +++ b/src/frequenz/sdk/microgrid/_power_distributing/_component_status/_pv_inverter_status_tracker.py @@ -125,8 +125,8 @@ def _handle_pv_inverter_data(self, pv_data: InverterData) -> ComponentStatusEnum if self._is_working(pv_data): if self._last_status == ComponentStatusEnum.NOT_WORKING: - _logger.warning( - "PV inverter %s is in WORKING state.", + _logger.info( + "PV inverter %s: state changed to WORKING.", self._component_id, ) return ComponentStatusEnum.WORKING