electrical_components
frequenz.client.common.v1alpha8.microgrid.electrical_components ¤
Defines the electrical components that can be used in a microgrid.
Classes¤
frequenz.client.common.v1alpha8.microgrid.electrical_components.ElectricalComponentCategory ¤
Bases: Enum
Possible types of microgrid electrical component.
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
Attributes¤
BATTERY
class-attribute
instance-attribute
¤
A storage system for electrical energy, used by inverters.
BREAKER
class-attribute
instance-attribute
¤
A relay, used for switching electrical circuits on and off.
CHP
class-attribute
instance-attribute
¤
A heat and power combustion plant (CHP stands for combined heat and power).
CONVERTER
class-attribute
instance-attribute
¤
An electricity converter, e.g., a DC-DC converter.
CRYPTO_MINER
class-attribute
instance-attribute
¤
A device for mining cryptocurrencies.
ELECTROLYZER
class-attribute
instance-attribute
¤
A device for splitting water into hydrogen and oxygen using electricity.
EV_CHARGER
class-attribute
instance-attribute
¤
A station for charging electrical vehicles.
GRID_CONNECTION_POINT
class-attribute
instance-attribute
¤
The point where the local microgrid is connected to the grid.
HVAC
class-attribute
instance-attribute
¤
A heating, ventilation, and air conditioning (HVAC) system.
INVERTER
class-attribute
instance-attribute
¤
An electricity generator, with batteries or solar energy.
METER
class-attribute
instance-attribute
¤
A meter, for measuring electrical metrics, e.g., current, voltage, etc.
POWER_TRANSFORMER
class-attribute
instance-attribute
¤
A transformer, used for changing the voltage of electrical circuits.
PRECHARGER
class-attribute
instance-attribute
¤
A precharger, used for preparing electrical circuits for switching on.
UNSPECIFIED
class-attribute
instance-attribute
¤
An unknown component category.
Useful for error handling, and marking unknown components in a list of components with otherwise known categories.
Functions¤
from_proto
classmethod
¤
from_proto(
component_category: ValueType,
) -> ElectricalComponentCategory
Convert a protobuf ElectricalComponentCategory message to enum.
PARAMETER | DESCRIPTION |
---|---|
component_category
|
protobuf enum to convert
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ElectricalComponentCategory
|
Enum value corresponding to the protobuf message. |
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
to_proto ¤
Convert a ElectricalComponentCategory enum to protobuf message.
RETURNS | DESCRIPTION |
---|---|
ValueType
|
Enum value corresponding to the protobuf message. |
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
frequenz.client.common.v1alpha8.microgrid.electrical_components.ElectricalComponentDiagnosticCode ¤
Bases: Enum
All diagnostics that can occur across electrical component categories.
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 |
|
Attributes¤
BATTERY_BLOCK_ERROR
class-attribute
instance-attribute
¤
Error indicating a battery block error.
BATTERY_CALIBRATION_NEEDED
class-attribute
instance-attribute
¤
Error indicating that battery calibration is needed.
BATTERY_CONTROLLER_ERROR
class-attribute
instance-attribute
¤
Error indicating a battery controller error.
BATTERY_IMBALANCE
class-attribute
instance-attribute
¤
Error indicating a battery system imbalance.
BATTERY_LOW_SOH
class-attribute
instance-attribute
¤
Error indicating a low state of health (SOH) detected in the battery.
BATTERY_RELAY_ERROR
class-attribute
instance-attribute
¤
Error indicating a battery relay error.
CONFIG_ERROR
class-attribute
instance-attribute
¤
Error indicating a configuration error related to the component.
EV_CHARGING_CABLE_INVALID
class-attribute
instance-attribute
¤
Error indicating an invalid electric vehicle (EV) cable.
EV_CHARGING_CABLE_LOCK_FAILED
class-attribute
instance-attribute
¤
Error indicating electric vehicle (EV) cable lock failure.
EV_CHARGING_CABLE_UNPLUGGED_FROM_EV
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_UNPLUGGED_FROM_EV = ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_EV
Error indicating electric vehicle (EV) cable was abruptly unplugged from the vehicle.
EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION = ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_EV_CHARGING_CABLE_UNPLUGGED_FROM_STATION
Error indicating electric vehicle (EV) cable was abruptly unplugged from the charging station.
EV_CONSUMER_INCOMPATIBLE
class-attribute
instance-attribute
¤
Error indicating an incompatible electric vehicle (EV) plug.
EV_UNEXPECTED_PILOT_FAILURE
class-attribute
instance-attribute
¤
Error indicating unexpected pilot failure in an electric vehicle (EV) component.
FAULT_CURRENT
class-attribute
instance-attribute
¤
Error indicating fault current detected in the component.
FUSE_ERROR
class-attribute
instance-attribute
¤
Error indicating that the component's fuse has blown.
HARDWARE_INACCESSIBLE
class-attribute
instance-attribute
¤
Error indicating that the hardware of the component is inaccessible.
HIGH_HUMIDITY
class-attribute
instance-attribute
¤
Error indicating that the component is exposed to high humidity levels over the maximum rated value.
ILLEGAL_COMPONENT_STATE_CODE_REQUESTED
class-attribute
instance-attribute
¤
ILLEGAL_COMPONENT_STATE_CODE_REQUESTED = ELECTRICAL_COMPONENT_DIAGNOSTIC_CODE_ILLEGAL_COMPONENT_STATE_CODE_REQUESTED
Error indicating an illegal state requested for the component.
INTERNAL
class-attribute
instance-attribute
¤
Error indicating an internal error within the component.
OVERCURRENT
class-attribute
instance-attribute
¤
Error indicating that the component is drawing more current than the maximum rated value.
OVERCURRENT_CHARGING
class-attribute
instance-attribute
¤
Error indicating that the component's consumption current is over the maximum rated value during charging.
OVERCURRENT_DISCHARGING
class-attribute
instance-attribute
¤
Error indicating that the component's production current is over the maximum rated value during discharging.
OVERTEMPERATURE
class-attribute
instance-attribute
¤
Error indicating that the component is operating over the maximum rated temperature.
OVERVOLTAGE
class-attribute
instance-attribute
¤
Error indicating that the component is operating over the maximum rated voltage.
PLAUSIBILITY_ERROR
class-attribute
instance-attribute
¤
Error indicating plausibility issues within the system involving this component.
PRECHARGE_ERROR
class-attribute
instance-attribute
¤
Error indicating that the component's precharge unit has failed.
RELAY_CYCLE_LIMIT_REACHED
class-attribute
instance-attribute
¤
Error indicating that the relays have been cycled for the maximum number of times.
SHORT_CIRCUIT
class-attribute
instance-attribute
¤
Error indicating a short circuit detected in the component.
SWITCH_ON_FAULT
class-attribute
instance-attribute
¤
Error indicating that the component could not be switched on.
UNAUTHORIZED
class-attribute
instance-attribute
¤
Error indicating that the component is unauthorized to perform the last requested action.
UNDERTEMPERATURE
class-attribute
instance-attribute
¤
Error indicating that the component is operating under the minimum rated temperature.
UNDERVOLTAGE
class-attribute
instance-attribute
¤
Error indicating that the component is operating under the minimum rated voltage.
UNKNOWN
class-attribute
instance-attribute
¤
The component is reporting an unknown or an undefined error, and the sender cannot parse the component error to any of the variants below.
UNSPECIFIED
class-attribute
instance-attribute
¤
Default value. No specific error is specified.
Functions¤
from_proto
classmethod
¤
from_proto(
component_error_code: ValueType,
) -> ElectricalComponentDiagnosticCode
Convert a protobuf ElectricalComponentDiagnosticCode message to enum.
PARAMETER | DESCRIPTION |
---|---|
component_error_code
|
protobuf enum to convert
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ElectricalComponentDiagnosticCode
|
Enum value corresponding to the protobuf message. |
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
to_proto ¤
Convert a ElectricalComponentDiagnosticCode enum to protobuf message.
RETURNS | DESCRIPTION |
---|---|
ValueType
|
Enum value corresponding to the protobuf message. |
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
frequenz.client.common.v1alpha8.microgrid.electrical_components.ElectricalComponentId ¤
Bases: BaseId
A unique identifier for a microgrid electrical component.
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
Attributes¤
Functions¤
__eq__ ¤
Check if this instance is equal to another object.
Equality is defined as being of the exact same type and having the same underlying ID.
Source code in frequenz/core/id.py
__hash__ ¤
__hash__() -> int
Return the hash of this instance.
The hash is based on the exact type and the underlying ID to ensure that IDs of different types but with the same numeric value have different hashes.
Source code in frequenz/core/id.py
__init__ ¤
__init__(id_: int) -> None
Initialize this instance.
PARAMETER | DESCRIPTION |
---|---|
id_
|
The numeric unique identifier.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
If the ID is negative. |
Source code in frequenz/core/id.py
__init_subclass__ ¤
Initialize a subclass, set its string prefix, and perform checks.
PARAMETER | DESCRIPTION |
---|---|
str_prefix
|
The string prefix for the ID type (e.g., "MID"). Must be unique across all ID types.
TYPE:
|
allow_custom_name
|
If True, bypasses the check that the class name must end with "Id". Defaults to False.
TYPE:
|
**kwargs
|
Forwarded to the parent's init_subclass.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
TypeError
|
If |
Source code in frequenz/core/id.py
__lt__ ¤
Check if this instance is less than another object.
Comparison is only defined between instances of the exact same type.
Source code in frequenz/core/id.py
__new__ ¤
Create a new instance of the ID class, only if it is a subclass of BaseId.
frequenz.client.common.v1alpha8.microgrid.electrical_components.ElectricalComponentStateCode ¤
Bases: Enum
All possible states of a microgrid electrical component.
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
|
Attributes¤
CHARGING
class-attribute
instance-attribute
¤
State when the component is actively consuming energy.
DISCHARGING
class-attribute
instance-attribute
¤
State when the component is actively producing or releasing energy.
ERROR
class-attribute
instance-attribute
¤
State when the component is in an error state and may need attention.
EV_CHARGING_CABLE_LOCKED_AT_EV
class-attribute
instance-attribute
¤
The EV charging cable is locked at the vehicle end, indicating that charging is active.
EV_CHARGING_CABLE_LOCKED_AT_STATION
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_LOCKED_AT_STATION = ELECTRICAL_COMPONENT_STATE_CODE_EV_CHARGING_CABLE_LOCKED_AT_STATION
The EV charging cable is locked at the charging station end, indicating readiness for charging.
EV_CHARGING_CABLE_PLUGGED_AT_EV
class-attribute
instance-attribute
¤
The EV charging cable is plugged into the vehicle.
EV_CHARGING_CABLE_PLUGGED_AT_STATION
class-attribute
instance-attribute
¤
EV_CHARGING_CABLE_PLUGGED_AT_STATION = ELECTRICAL_COMPONENT_STATE_CODE_EV_CHARGING_CABLE_PLUGGED_AT_STATION
The EV charging cable is plugged into the charging station.
EV_CHARGING_CABLE_UNPLUGGED
class-attribute
instance-attribute
¤
The Electric Vehicle (EV) charging cable is unplugged from the charging station.
OFF
class-attribute
instance-attribute
¤
State when the component has successfully switched off.
PRECHARGER_CLOSED
class-attribute
instance-attribute
¤
The precharger circuit is closed, allowing full current to flow to the main circuit.
PRECHARGER_OPEN
class-attribute
instance-attribute
¤
The precharger circuit is open, meaning it's not currently active.
PRECHARGER_PRECHARGING
class-attribute
instance-attribute
¤
The precharger is in a precharging state, preparing the main circuit for activation.
READY
class-attribute
instance-attribute
¤
State when the component is fully operational and ready for use.
RELAY_CLOSED
class-attribute
instance-attribute
¤
The relay is in a closed state, allowing current to flow.
RELAY_OPEN
class-attribute
instance-attribute
¤
The relay is in an open state, meaning no current can flow through.
STANDBY
class-attribute
instance-attribute
¤
State when the component is in standby mode, and not immediately ready for operation.
SWITCHING_OFF
class-attribute
instance-attribute
¤
State when the component is in the process of switching off.
SWITCHING_ON
class-attribute
instance-attribute
¤
State when the component is in the process of switching on from an off state.
UNAVAILABLE
class-attribute
instance-attribute
¤
State when the component is not available for use.
UNKNOWN
class-attribute
instance-attribute
¤
State when the component is in an unknown or undefined condition.
This is used when the sender is unable to classify the component into any other state.
UNSPECIFIED
class-attribute
instance-attribute
¤
Default value when the component state is not explicitly set.
Functions¤
from_proto
classmethod
¤
from_proto(
component_state: ValueType,
) -> ElectricalComponentStateCode
Convert a protobuf ElectricalComponentStateCode message to enum.
PARAMETER | DESCRIPTION |
---|---|
component_state
|
protobuf enum to convert
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ElectricalComponentStateCode
|
Enum value corresponding to the protobuf message. |
Source code in frequenz/client/common/v1alpha8/microgrid/electrical_components/__init__.py
to_proto ¤
Convert a ElectricalComponentStateCode enum to protobuf message.
RETURNS | DESCRIPTION |
---|---|
ValueType
|
Enum value corresponding to the protobuf message. |