|
6 | 6 |
|
7 | 7 | ## Upgrading |
8 | 8 |
|
9 | | -- The `ElectricalComponentStatus` enum has ben removed in favour of the `ElectricalComponentControlMode` enum. |
| 9 | +- Removed: |
| 10 | + |
| 11 | + + `microgrid.components.ComponentStatus`, use `microgrid.electrical_components.ElectricalComponentControlMode` instead |
| 12 | + + `ComponentErrorCode.UNDERVOLTAGE_SHUTDOWN`, use `ElectricalComponentDiagnosticCode.UNDERVOLTAGE` instead |
| 13 | + + `microgrid.sensors.SensorMetric`, use `metrics.Metric` instead |
| 14 | + + `microgrid.sensors.SensorMetricSample`, use `metrics.MetricSample` instead |
| 15 | + + `microgrid.sensors.SensorCategory`, since it was not useful and potentially confusing |
| 16 | + |
| 17 | + Sensors 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. |
| 18 | + |
| 19 | +- Renamed several symbols to increase consistency and clarity: |
| 20 | + |
| 21 | + + `microgrid.components`: |
| 22 | + |
| 23 | + * The whole package and all proto files, messages, field, enums were renamed to `electrical_components` |
| 24 | + * `ComponentCategoryMetadataVariant` to `ElectricalComponentCategorySpecificInfo` |
| 25 | + * `Component.category_type` to `ElectricalComponent.category_specific_info` |
| 26 | + * `ComponentCategoryMetadataVariant.metadata` to `ElectricalComponentCategorySpecificInfo.kind` |
| 27 | + * `ComponentErrorCode` to `ElectricalComponentDiagnosticCode` |
| 28 | + * `ComponentState` to `ElectricalComponentStateSnapshot` |
| 29 | + * `ComponentState.sampled_at` to `ElectricalComponentStateSnapshot.origin_time` |
| 30 | + * `ComponentData` to `ElectricalComponentTelemetry` (to better specify its purpose of encapsulating general telemetry data from electrical components) |
| 31 | + * Grid-related terms to clarify their meaning and purpose: |
| 32 | + |
| 33 | + + `COMPONENT_CATEGORY_GRID` to `ELECTRICAL_COMPONENT_CATEGORY_GRID_CONNECTION_POINT` |
| 34 | + + `ComponentCategoryMetadataVariant.metadata.grid` to `ElectricalComponentCategorySpecificInfo.kind.grid_connection_point` |
| 35 | + |
| 36 | + + `microgrid.sensors`: |
| 37 | + |
| 38 | + * `SensorErrorCode` to `SensorDiagnosticCode` |
| 39 | + * `SensorData` to `SensorTelemetry` (to better specify its purpose of encapsulating general telemetry data from sensors) |
| 40 | + * `SensorState` to `SensorStateSnapshot` |
| 41 | + * `SensorState.sampled_at` to `SensorStateSnapshot.origin_time` |
| 42 | + * `SensorStateCode.SENSOR_STATE_CODE_ON` to `SensorStateCode.SENSOR_STATE_CODE_OK` (to better indicate that we do not control on/off state of sensors) |
| 43 | + |
| 44 | + + `metrics`: |
| 45 | + |
| 46 | + * The file `metric_sample.proto` to `metrics.proto` |
| 47 | + * `MetricSample.source` to `MetricSample.connection` |
| 48 | + * `MetricSample.sampled_at` to `sample_time` |
| 49 | + |
| 50 | +- Renumbered some enum values to remove unnecessary gaps: |
| 51 | + |
| 52 | + + `microgrid.components.ComponentCategory` (`microgrid.electrical_components.ElectricalComponentCategory`) |
| 53 | + + `microgrid.components.ComponentErrorCode` (`microgrid.electrical_components.ElectricalComponentDiagnosticCode`) |
| 54 | + + `metrics.Metric` |
| 55 | + |
| 56 | +- The minimum allowed version of `protobuf` and `grpcio` has been updated to 6.31.1 and 1.72.1 respectively, you might also need to bump your dependencies accordingly. |
10 | 57 |
|
11 | 58 | ## New Features |
12 | 59 |
|
13 | | -- Renamed `components` to `electrical_components` and related messages, fields, enums. |
14 | | -- Added message linking microgrid and sensor IDs. |
15 | | -- Added new message definitions for communication components. |
16 | | -- Added new message `ElectricalComponentDiagnostic` to represent warnings and errors in microgrid electrical components. |
17 | | -- The enum `ComponentErrorCode` has now been renamed to `ElectricalComponentDiagnosticCode` to better reflect its shared usage with warnings and errors. |
18 | | -- Added new message `SensorDiagnostic` to represent warnings and errors in microgrid sensors. |
19 | | -- The enum `SensorErrorCode` has now been renamed to `SensorDiagnosticCode` to better reflect its shared usage with warnings and errors. |
20 | | -- Added warnings to sensor `SensorState`. |
21 | | -- Added a common `TimeIntervalFilter` message in `frequenz.api.common.v1.types` to standardize time interval filtering across APIs. This uses `start_time` (inclusive) and `end_time` (exclusive) fields, aligning with ISO 8601 and common programming conventions. |
22 | | -- Added new message `CommunicationComponentDiagnostic` to represent warnings and errors in microgrid communication components. |
23 | | -- Added new message `CommunicationComponentStateSnapshot` to represent the state of communication components. |
24 | | -- Added new message definitions for streaming events (Deleted, Created, Updated) |
25 | | -- Remove unnecessary gap in numbering in the `ElectricalComponentCategory` enum. |
26 | | -- Renumber variants in the `Metric` enum to remove unnecessary gaps. |
27 | | -- Renamed `metric_sample.proto` to `metrics.proto` to better reflect its content. |
28 | | -- Renamed electrical component category `COMPONENT_CATEGORY_GRID` to `ELECTRICAL_COMPONENT_CATEGORY_GRID_CONNECTION_POINT` to clarify its meaning. Note that the change in the enum change is a part of a larger refactoring of the electrical component category enum. |
29 | | -- The oneof variant `ComponentCategoryMetadataVariant.metadata.grid` has been renamed to `ElectricalComponentCategorySpecificInfo.info.grid_connection_point` to better reflect its purpose. |
30 | | -- A new inverter type `INVERTER_TYPE_WIND_TURBINE` has been added to the `InverterType` enum. |
31 | | -- Renamed `ComponentCategoryMetadataVariant` to `ElectricalComponentCategorySpecificInfo`. |
32 | | -- Renamed field `ElectricalComponent.category_type` to `ElectricalComponent.category_specific_info` to better reflect its purpose. |
33 | | -- Renamed `ElectricalComponentState` to `ElectricalComponentStateSnapshot` to better reflect its purpose. |
34 | | -- Renamed `SensorState` to `SensorStateSnapshot` to better reflect its purpose. |
35 | | -- Renamed `sampled_at` timestamps for state snapshots to `origin_time`. |
36 | | -- Renamed `sampled_at` timestamps for metric samples to `sample_time`. |
37 | | -- Remove `SensorMetricSample` in favour of using `MetricSample` for sensors. |
38 | | -- Remove `SensorMetric` enum, since it was unused and redundant. |
39 | | -- Renamed `MetricSample.source` to `MetricSample.connection` to make it more specific as to what it refers to. |
40 | | -- Rename `SensorStateCode.SENSOR_STATE_CODE_ON` to `SensorStateCode.SENSOR_STATE_CODE_OK`, to better indicate that we do not control on/off state of sensors. |
41 | | -- Rename `ComponentData` to `ElectricalComponentTelemetry` to better specify its purpose of encapsulating general telemetry data from electrical components. |
42 | | -- Rename `SensorData` to `SensorTelemetry` to better specify its purpose of encapsulating general telemetry data from sensors. |
43 | | -- The following changes have been made to the `ElectricalComponentDiagnosticCode` enum (previously `ComponentErrorCode`): |
44 | | - - The code `UNDERVOLTAGE_SHUTDOWN` has been removed in favour of `UNDERVOLTAGE`. |
45 | | - - New diagnostic codes have been added to cover more cases, especially for inverters. |
46 | | - - The codes have been renumbered. |
47 | | -- Removed `SensorCategory` enum, since it was not useful and potentially confusing. Sensors 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. We need to rethink how to categorize sensors. Until then, having it does not add any value, and therefore it has been removed. |
| 60 | +Added many new messages and enum values: |
| 61 | + |
| 62 | +- `microgrid.communication_components`: Package with message definitions for communication components |
| 63 | + |
| 64 | + + `CommunicationComponentDiagnostic`: Message to represent warnings and errors in microgrid communication components |
| 65 | + + `CommunicationComponentStateSnapshot`: Message to represent the state of communication components |
| 66 | + |
| 67 | +- `microgrid.electrical_components` (previously `microgrid.components`) |
| 68 | + |
| 69 | + + `ElectricalComponentDiagnostic`: Message to represent warnings and errors in microgrid electrical components |
| 70 | + + `ElectricalComponentDiagnosticCode` (previously `ComponentErrorCode`): New diagnostic codes to cover more cases, especially for inverters |
| 71 | + + `InverterType.INVERTER_TYPE_WIND_TURBINE`: Enum value to represent wind turbine inverters |
| 72 | + |
| 73 | +- `microgrid.sensors` |
| 74 | + |
| 75 | + + Message linking microgrid and sensor IDs |
| 76 | + + `SensorDiagnostic`: Message to represent warnings and errors in microgrid sensors |
| 77 | + + Added warnings to sensor `SensorState` |
| 78 | + |
| 79 | +- `streaming`: Package with message definitions for streaming events |
| 80 | + |
| 81 | + + `Event`: Enum to represent different types of streaming events (Created, Deleted, Updated) |
| 82 | + |
| 83 | +- `types` |
| 84 | + |
| 85 | + + `TimeIntervalFilter`: Message to standardize time interval filtering across APIs |
| 86 | + |
| 87 | + This uses `start_time` (inclusive) and `end_time` (exclusive) fields, aligning with ISO 8601 and common programming conventions. |
48 | 88 |
|
49 | 89 | ## Bug Fixes |
50 | 90 |
|
|
0 commit comments