v0.7.0
Frequenz Common API Release Notes
Summary
This release introduces several breaking changes, new features, and improvements to the existing API. The most significant changes include renaming and restructuring of the components package to electrical_components, the introduction of new diagnostic codes, and the addition of new messages for communication components and streaming events.
Upgrading
-
Removed:
-
microgrid.components.ComponentStatus. -
ComponentErrorCode.UNDERVOLTAGE_SHUTDOWN, useElectricalComponentDiagnosticCode.UNDERVOLTAGEinstead -
microgrid.sensors.SensorMetric, usemetrics.Metricinstead -
microgrid.sensors.SensorMetricSample, usemetrics.MetricSampleinstead -
microgrid.sensors.SensorCategory, since it was not useful and potentially confusingSensors can report different sensor metrics, and they could belong to several of these categories simultaneously. This defeats the purpose of having singular categories for sensors. Some more useful categorization may be introduced again in the future.
-
-
Renamed several symbols to increase consistency and clarity:
-
microgrid.components:-
The whole package and all proto files, messages, field, enums were renamed to
electrical_components -
ComponentCategoryMetadataVarianttoElectricalComponentCategorySpecificInfo -
ComponentCategorytoElectricalComponentCategory -
Component.category_typetoElectricalComponent.category_specific_info -
ComponentCategoryMetadataVariant.metadatatoElectricalComponentCategorySpecificInfo.kind -
ComponentErrorCodetoElectricalComponentDiagnosticCode -
ComponentStatetoElectricalComponentStateSnapshot -
ComponentState.sampled_attoElectricalComponentStateSnapshot.origin_time -
ComponentDatatoElectricalComponentTelemetry(to better specify its purpose of encapsulating general telemetry data from electrical components) -
ComponentData.statestoElectricalComponentTelemetry.state_snapshots -
Grid-related terms to clarify their meaning and purpose:
COMPONENT_CATEGORY_GRIDtoELECTRICAL_COMPONENT_CATEGORY_GRID_CONNECTION_POINTComponentCategoryMetadataVariant.metadata.gridtoElectricalComponentCategorySpecificInfo.kind.grid_connection_point
-
InverterType.INVERTER_TYPE_SOLARtoInverterType.INVERTER_TYPE_PV(to align with the more colloquial term "PV inverter") -
ComponentCategory.COMPONENT_CATEGORY_RELAYtoElectricalComponentCategory.ELECTRICAL_COMPONENT_CATEGORY_BREAKER(to better align with the common terminology used in electrical engineering). -
All contents of all the files in the
electrical_componentsdirectory (previouslycomponents) are now moved into theelectrical_components.protofile.
-
-
microgrid.sensors:SensorErrorCodetoSensorDiagnosticCodeSensorDatatoSensorTelemetry(to better specify its purpose of encapsulating general telemetry data from sensors)SensorStatetoSensorStateSnapshotSensorData.statestoSensorTelemetry.state_snapshotsSensorState.sampled_attoSensorStateSnapshot.origin_timeSensorStateCode.SENSOR_STATE_CODE_ONtoSensorStateCode.SENSOR_STATE_CODE_OK(to better indicate that we do not control on/off state of sensors)
-
metrics:- The file
metric_sample.prototometrics.proto MetricSample.sourcetoMetricSample.connectionMetricSample.sampled_attosample_time
- The file
-
metrics.Metric:- The enum variants to follow a more consistent naming scheme of core-concept to modifier.
METRIC_AC_APPARENT_POWER*toMETRIC_AC_POWER_APPARENT*METRIC_AC_ACTIVE_POWER*toMETRIC_AC_POWER_ACTIVE*METRIC_AC_REACTIVE_POWER*toMETRIC_AC_POWER_REACTIVE*METRIC_AC_APPARENT_ENERGY*toMETRIC_AC_ENERGY_APPARENT*METRIC_AC_ACTIVE_ENERGY*toMETRIC_AC_ENERGY_ACTIVE*METRIC_AC_REACTIVE_ENERGY*toMETRIC_AC_ENERGY_REACTIVE*
-
types:- The whole package has been renamed to
type.
- The whole package has been renamed to
-
-
Renumbered some enum values to remove unnecessary gaps:
microgrid.components.ComponentCategory(microgrid.electrical_components.ElectricalComponentCategory)microgrid.components.ComponentErrorCode(microgrid.electrical_components.ElectricalComponentDiagnosticCode)metrics.Metric
-
The minimum allowed version of
protobufandgrpciohas been updated to 6.31.1 and 1.72.1 respectively, you might also need to bump your dependencies accordingly. -
The file
location.protohas been moved to thetypespackage, moving the messageLocationtotypes.Location. -
The type of the field
metrics.MetricSample.connectionhas been changed fromstringtometrics.MetricConnection. The latter is a newly added message that provides a better categorization of the connection type. -
The
v1package has been renamed tov1alpha7. The currentv1package now consists of the contents the same directory from the v0.6.x branch, which is the latest stable version of the API. -
The enum
ComponentCategory(nowElectricalComponentCategory) has been extended with new variants.
New Features
Added many new messages and enum values:
-
microgrid.communication_components: Package with message definitions for communication componentsCommunicationComponentDiagnostic: Message to represent warnings and errors in microgrid communication componentsCommunicationComponentStateSnapshot: Message to represent the state of communication components
-
microgrid.electrical_components(previouslymicrogrid.components)ElectricalComponentDiagnostic: Message to represent warnings and errors in microgrid electrical componentsElectricalComponentDiagnosticCode(previouslyComponentErrorCode): New diagnostic codes to cover more cases, especially for invertersInverterType.INVERTER_TYPE_WIND_TURBINE: Enum value to represent wind turbine inverters
-
microgrid.ElectricalComponentCategory(previouslymicrogrid.ComponentCategory) has been extended with new enum values:ELECTRICAL_COMPONENT_CATEGORY_PLCELECTRICAL_COMPONENT_CATEGORY_STATIC_TRANSFER_SWITCHELECTRICAL_COMPONENT_CATEGORY_UNINTERRUPTIBLE_POWER_SUPPLYELECTRICAL_COMPONENT_CATEGORY_CAPACITOR_BANKELECTRICAL_COMPONENT_CATEGORY_WIND_TURBINE
-
microgrid.sensors- Message linking microgrid and sensor IDs
SensorDiagnostic: Message to represent warnings and errors in microgrid sensors- Added warnings to sensor
SensorState
-
streaming: Package with message definitions for streaming eventsEvent: Enum to represent different types of streaming events (Created, Deleted, Updated)
-
types-
Interval: Message to standardize time interval filtering across APIsThis uses
start_time(inclusive) andend_time(exclusive) fields, aligning with ISO 8601 and common programming conventions.
-
What's Changed
- Reset Release Notes after release v0.6.3 by @camille-bouvy-frequenz in #269
- Bump the required group with 5 updates by @dependabot in #271
- Bump setuptools-scm[toml] from 7.1.0 to 8.1.0 by @dependabot in #276
- Bump the required group across 1 directory with 9 updates by @dependabot in #277
- Bump setuptools from 68.1.0 to 75.6.0 by @dependabot in #275
- Bump the required group with 5 updates by @dependabot in #278
- Bump black from 24.10.0 to 25.1.0 by @dependabot in #282
- Add message linking microgrid and sensor IDs by @stefan-brus-frequenz in #283
- Bump the required group with 7 updates by @dependabot in #280
- Bump isort from 5.13.2 to 6.0.0 by @dependabot in #281
- Bump nox from 2024.10.9 to 2025.2.9 by @dependabot in #289
- Rename microgrid.components -> microgrid.electrical_components by @tar-viturawong-frequenz in #291
- Add protobuf definition for communication components by @tar-viturawong-frequenz in #292
- Update repo-conf by @Marenz in #295
- Bump pydoclint from 0.6.0 to 0.6.5 by @dependabot in #301
- Bump mkdocstrings[python] from 0.28.3 to 0.29.1 in the mkdocstrings group by @dependabot in #300
- Bump the minor group with 3 updates by @dependabot in #298
- Bump actions/checkout from 3 to 4 by @dependabot in #296
- Fix: Forgot to update repo-conf dependency to 0.13.1 by @Marenz in #304
- Bump the patch group across 1 directory with 7 updates by @dependabot in #305
- Bump setuptools from 75.8.0 to 78.1.0 by @dependabot in #303
- Remove dependabot for submodules by @llucax in #306
- Add an
ElectricalComponentErrormessage by @tiyash-basu-frequenz in #308 - Rename
ElectricalComponentErrortoElectricalComponentDiagnosticby @tiyash-basu-frequenz in #309 - Update sensor error representation by @tiyash-basu-frequenz in #310
- Add TimeIntervalFilter definition by @Marenz in #313
- Add communication component diagnostic message by @tiyash-basu-frequenz in #315
- Bump pydoclint from 0.6.5 to 0.6.6 by @dependabot in #319
- Bump grpc-stubs from 1.53.0.5 to 1.53.0.6 by @dependabot in #320
- Bump setuptools-scm[toml] from 8.2.0 to 8.3.1 in the minor group by @dependabot in #318
- Bump the patch group across 1 directory with 4 updates by @dependabot in #322
- Add new message definitions for streaming events by @Marenz in #294
- Rename vendor error code and update documentation by @tiyash-basu-frequenz in #316
- Add communication component state codes and snapshot message by @tiyash-basu-frequenz in #329
- Reorganize the contents of a few proto files by @tiyash-basu-frequenz in #331
- Fix outdated documentation by @tiyash-basu-frequenz in #332
- Improve numbering in enums
ElectricalComponentCategoryandMetricby @tiyash-basu-frequenz in #336 - Add enum
ElectricalComponentControlModeby @tiyash-basu-frequenz in #307 - Rename
metric_sample.prototometrics.protoby @tiyash-basu-frequenz in #338 - Rename grid to grid_connection_point in electrical_components.proto by @tiyash-basu-frequenz in #335
- Fix typo in field name in
CommunicationComponentDiagnosticby @tiyash-basu-frequenz in #340 - Add inverter type
INVERTER_TYPE_WIND_TURBINEby @tiyash-basu-frequenz in #337 - Rename category type field in ElectricalComponent by @tiyash-basu-frequenz in #333
- Add
Snapshotprefix to sensor and electrical component states by @tiyash-basu-frequenz in #341 - Bump the patch group with 3 updates by @dependabot in #342
- Bump setuptools from 78.1.0 to 80.8.0 by @dependabot in #344
- Bump nox from 2025.2.9 to 2025.5.1 in the minor group by @dependabot in #343
- Renamed
sampled_attimestamps toorigin_timeby @tiyash-basu-frequenz in #345 - Remove
SensorMetricSamplein favour ofMetricSampleby @tiyash-basu-frequenz in #346 - Rename
MetricSample.sourcetoMetricSample.connectionby @tiyash-basu-frequenz in #347 - Rename
SensorStateCodevariantONtoOKin sensors.proto by @tiyash-basu-frequenz in #350 - Rename
*Datamessages to*Telemetryby @tiyash-basu-frequenz in #351 - Add new codes to
ElectricalComponentDiagnosticCodeenum by @tiyash-basu-frequenz in #353 - Remove
SensorCategoryenum by @tiyash-basu-frequenz in #352 - Bump the minor group with 2 updates by @dependabot in #354
- fix: remove electrical component control mode by @tar-viturawong-frequenz in #359
- Bump protobuf and grpcio versions by @llucax in #356
- Avoid warnings about protobuf gencode version by @llucax in #355
- Change vendor diagnostic codes to string type by @tiyash-basu-frequenz in #362
- Reorganize releases notes on upgrading and new features by @llucax in #361
- Rename metric variants to follow a consistent naming scheme by @tiyash-basu-frequenz in #367
- Move
location.protototypes/location.protoby @tiyash-basu-frequenz in #368 - Rename
TimeIntervalFiltertoIntervalby @tiyash-basu-frequenz in #369 - Rename package
typestotypeby @tiyash-basu-frequenz in #370 - Rename sensor and electrical component telemetry states by @tiyash-basu-frequenz in #371
- Change type of
metrics.MetricSample.connectionfield by @tiyash-basu-frequenz in #372 - Rename
INVERTER_TYPE_SOLARtoINVERTER_TYPE_PHOTOVOLTAICby @tiyash-basu-frequenz in #373 - Override the default include path when generating protobuf files by @llucax in #375
- Change
PHOTOVOLTAICtoPVby @tiyash-basu-frequenz in #376 - Rename
v1tov1alpha7, and usev1from v0.6.x by @tiyash-basu-frequenz in #374 - Extend the
ElectricalComponentCategoryenum with new variants by @tiyash-basu-frequenz in #378 - Move all electrical component types to a single file by @tiyash-basu-frequenz in #380
- Update release notes by @tiyash-basu-frequenz in #381
New Contributors
- @tar-viturawong-frequenz made their first contribution in #291
Full Changelog: v0.6.3...v0.7.0