metrics
frequenz.client.microgrid.metrics ¤
Metrics definitions.
Classes¤
frequenz.client.microgrid.metrics.AggregatedMetricValue
dataclass
¤
Encapsulates derived statistical summaries of a single metric.
The message allows for the reporting of statistical summaries — minimum, maximum, and average values - as well as the complete list of individual samples if available.
This message represents derived metrics and contains fields for statistical summaries—minimum, maximum, and average values. Individual measurements are are optional, accommodating scenarios where only subsets of this information are available.
Source code in frequenz/client/microgrid/metrics/_sample.py
Attributes¤
raw_values
instance-attribute
¤
All the raw individual values (it might be empty if not provided by the component).
Functions¤
__str__ ¤
__str__() -> str
Return the short string representation of this instance.
Source code in frequenz/client/microgrid/metrics/_sample.py
frequenz.client.microgrid.metrics.AggregationMethod ¤
Bases: Enum
The type of the aggregated value.
Source code in frequenz/client/microgrid/metrics/_sample.py
frequenz.client.microgrid.metrics.Bounds
dataclass
¤
A set of lower and upper bounds for any metric.
The lower bound must be less than or equal to the upper bound.
The units of the bounds are always the same as the related metric.
Source code in frequenz/client/microgrid/metrics/_bounds.py
Attributes¤
lower
class-attribute
instance-attribute
¤
lower: float | None = None
The lower bound.
If None, there is no lower bound.
upper
class-attribute
instance-attribute
¤
upper: float | None = None
The upper bound.
If None, there is no upper bound.
Functions¤
__post_init__ ¤
Validate these bounds.
Source code in frequenz/client/microgrid/metrics/_bounds.py
frequenz.client.microgrid.metrics.Metric ¤
Bases: Enum
List of supported metrics.
AC energy metrics information
-
This energy metric is reported directly from the component, and not a result of aggregations in our systems. If a component does not have this metric, this field cannot be populated.
-
Components that provide energy metrics reset this metric from time to time. This behaviour is specific to each component model. E.g., some components reset it on UTC 00:00:00.
-
This energy metric does not specify the start time of the accumulation period,and therefore can be inconsistent.
Source code in frequenz/client/microgrid/metrics/_metric.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 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 243 244 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 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | |
Attributes¤
AC_ACTIVE_ENERGY
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY = deprecated_member(
METRIC_AC_ENERGY_ACTIVE,
"AC_ACTIVE_ENERGY is deprecated, use AC_ENERGY_ACTIVE instead",
)
The alternating current active energy (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE
instead.
AC_ACTIVE_ENERGY_CONSUMED
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_CONSUMED = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_CONSUMED,
"AC_ACTIVE_ENERGY_CONSUMED is deprecated, use AC_ENERGY_ACTIVE_CONSUMED instead",
)
The alternating current active energy consumed (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_CONSUMED
instead.
AC_ACTIVE_ENERGY_CONSUMED_PHASE_1
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_CONSUMED_PHASE_1 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_1,
"AC_ACTIVE_ENERGY_CONSUMED_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_1 instead",
)
The alternating current active energy consumed in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_CONSUMED_PHASE_1
instead.
AC_ACTIVE_ENERGY_CONSUMED_PHASE_2
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_CONSUMED_PHASE_2 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_2,
"AC_ACTIVE_ENERGY_CONSUMED_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_2 instead",
)
The alternating current active energy consumed in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_CONSUMED_PHASE_2
instead.
AC_ACTIVE_ENERGY_CONSUMED_PHASE_3
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_CONSUMED_PHASE_3 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_CONSUMED_PHASE_3,
"AC_ACTIVE_ENERGY_CONSUMED_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_CONSUMED_PHASE_3 instead",
)
The alternating current active energy consumed in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_CONSUMED_PHASE_3
instead.
AC_ACTIVE_ENERGY_DELIVERED
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_DELIVERED = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_DELIVERED,
"AC_ACTIVE_ENERGY_DELIVERED is deprecated, use AC_ENERGY_ACTIVE_DELIVERED instead",
)
The alternating current active energy delivered (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_DELIVERED
instead.
AC_ACTIVE_ENERGY_DELIVERED_PHASE_1
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_DELIVERED_PHASE_1 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_1,
"AC_ACTIVE_ENERGY_DELIVERED_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_1 instead",
)
The alternating current active energy delivered in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_DELIVERED_PHASE_1
instead.
AC_ACTIVE_ENERGY_DELIVERED_PHASE_2
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_DELIVERED_PHASE_2 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_2,
"AC_ACTIVE_ENERGY_DELIVERED_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_2 instead",
)
The alternating current active energy delivered in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_DELIVERED_PHASE_2
instead.
AC_ACTIVE_ENERGY_DELIVERED_PHASE_3
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_DELIVERED_PHASE_3 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_DELIVERED_PHASE_3,
"AC_ACTIVE_ENERGY_DELIVERED_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_DELIVERED_PHASE_3 instead",
)
The alternating current active energy delivered in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_DELIVERED_PHASE_3
instead.
AC_ACTIVE_ENERGY_PHASE_1
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_PHASE_1 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_PHASE_1,
"AC_ACTIVE_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_ACTIVE_PHASE_1 instead",
)
The alternating current active energy in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_PHASE_1
instead.
AC_ACTIVE_ENERGY_PHASE_2
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_PHASE_2 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_PHASE_2,
"AC_ACTIVE_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_ACTIVE_PHASE_2 instead",
)
The alternating current active energy in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_PHASE_2
instead.
AC_ACTIVE_ENERGY_PHASE_3
class-attribute
instance-attribute
¤
AC_ACTIVE_ENERGY_PHASE_3 = deprecated_member(
METRIC_AC_ENERGY_ACTIVE_PHASE_3,
"AC_ACTIVE_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_ACTIVE_PHASE_3 instead",
)
The alternating current active energy in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_ACTIVE_PHASE_3
instead.
AC_ACTIVE_POWER
class-attribute
instance-attribute
¤
AC_ACTIVE_POWER = deprecated_member(
METRIC_AC_POWER_ACTIVE,
"AC_ACTIVE_POWER is deprecated, use AC_POWER_ACTIVE instead",
)
The alternating current active power (deprecated).
Deprecated in v0.18.0
Use AC_POWER_ACTIVE
instead.
AC_ACTIVE_POWER_PHASE_1
class-attribute
instance-attribute
¤
AC_ACTIVE_POWER_PHASE_1 = deprecated_member(
METRIC_AC_POWER_ACTIVE_PHASE_1,
"AC_ACTIVE_POWER_PHASE_1 is deprecated, use AC_POWER_ACTIVE_PHASE_1 instead",
)
The alternating current active power in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_ACTIVE_PHASE_1
instead.
AC_ACTIVE_POWER_PHASE_2
class-attribute
instance-attribute
¤
AC_ACTIVE_POWER_PHASE_2 = deprecated_member(
METRIC_AC_POWER_ACTIVE_PHASE_2,
"AC_ACTIVE_POWER_PHASE_2 is deprecated, use AC_POWER_ACTIVE_PHASE_2 instead",
)
The alternating current active power in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_ACTIVE_PHASE_2
instead.
AC_ACTIVE_POWER_PHASE_3
class-attribute
instance-attribute
¤
AC_ACTIVE_POWER_PHASE_3 = deprecated_member(
METRIC_AC_POWER_ACTIVE_PHASE_3,
"AC_ACTIVE_POWER_PHASE_3 is deprecated, use AC_POWER_ACTIVE_PHASE_3 instead",
)
The alternating current active power in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_ACTIVE_PHASE_3
instead.
AC_APPARENT_ENERGY
class-attribute
instance-attribute
¤
AC_APPARENT_ENERGY = deprecated_member(
METRIC_AC_ENERGY_APPARENT,
"AC_APPARENT_ENERGY is deprecated, use AC_ENERGY_APPARENT instead",
)
The alternating current apparent energy (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_APPARENT
instead.
AC_APPARENT_ENERGY_PHASE_1
class-attribute
instance-attribute
¤
AC_APPARENT_ENERGY_PHASE_1 = deprecated_member(
METRIC_AC_ENERGY_APPARENT_PHASE_1,
"AC_APPARENT_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_APPARENT_PHASE_1 instead",
)
The alternating current apparent energy in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_APPARENT_PHASE_1
instead.
AC_APPARENT_ENERGY_PHASE_2
class-attribute
instance-attribute
¤
AC_APPARENT_ENERGY_PHASE_2 = deprecated_member(
METRIC_AC_ENERGY_APPARENT_PHASE_2,
"AC_APPARENT_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_APPARENT_PHASE_2 instead",
)
The alternating current apparent energy in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_APPARENT_PHASE_2
instead.
AC_APPARENT_ENERGY_PHASE_3
class-attribute
instance-attribute
¤
AC_APPARENT_ENERGY_PHASE_3 = deprecated_member(
METRIC_AC_ENERGY_APPARENT_PHASE_3,
"AC_APPARENT_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_APPARENT_PHASE_3 instead",
)
The alternating current apparent energy in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_APPARENT_PHASE_3
instead.
AC_APPARENT_POWER
class-attribute
instance-attribute
¤
AC_APPARENT_POWER = deprecated_member(
METRIC_AC_POWER_APPARENT,
"AC_APPARENT_POWER is deprecated, use AC_POWER_APPARENT instead",
)
The alternating current apparent power (deprecated).
Deprecated in v0.18.0
Use AC_POWER_APPARENT
instead.
AC_APPARENT_POWER_PHASE_1
class-attribute
instance-attribute
¤
AC_APPARENT_POWER_PHASE_1 = deprecated_member(
METRIC_AC_POWER_APPARENT_PHASE_1,
"AC_APPARENT_POWER_PHASE_1 is deprecated, use AC_POWER_APPARENT_PHASE_1 instead",
)
The alternating current apparent power in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_APPARENT_PHASE_1
instead.
AC_APPARENT_POWER_PHASE_2
class-attribute
instance-attribute
¤
AC_APPARENT_POWER_PHASE_2 = deprecated_member(
METRIC_AC_POWER_APPARENT_PHASE_2,
"AC_APPARENT_POWER_PHASE_2 is deprecated, use AC_POWER_APPARENT_PHASE_2 instead",
)
The alternating current apparent power in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_APPARENT_PHASE_2
instead.
AC_APPARENT_POWER_PHASE_3
class-attribute
instance-attribute
¤
AC_APPARENT_POWER_PHASE_3 = deprecated_member(
METRIC_AC_POWER_APPARENT_PHASE_3,
"AC_APPARENT_POWER_PHASE_3 is deprecated, use AC_POWER_APPARENT_PHASE_3 instead",
)
The alternating current apparent power in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_APPARENT_PHASE_3
instead.
AC_CURRENT
class-attribute
instance-attribute
¤
The alternating current current.
AC_CURRENT_PHASE_1
class-attribute
instance-attribute
¤
The alternating current current in phase 1.
AC_CURRENT_PHASE_2
class-attribute
instance-attribute
¤
The alternating current current in phase 2.
AC_CURRENT_PHASE_3
class-attribute
instance-attribute
¤
The alternating current current in phase 3.
AC_ENERGY_ACTIVE
class-attribute
instance-attribute
¤
The alternating current active energy.
AC_ENERGY_ACTIVE_CONSUMED
class-attribute
instance-attribute
¤
The alternating current active energy consumed.
AC_ENERGY_ACTIVE_CONSUMED_PHASE_1
class-attribute
instance-attribute
¤
The alternating current active energy consumed in phase 1.
AC_ENERGY_ACTIVE_CONSUMED_PHASE_2
class-attribute
instance-attribute
¤
The alternating current active energy consumed in phase 2.
AC_ENERGY_ACTIVE_CONSUMED_PHASE_3
class-attribute
instance-attribute
¤
The alternating current active energy consumed in phase 3.
AC_ENERGY_ACTIVE_DELIVERED
class-attribute
instance-attribute
¤
The alternating current active energy delivered.
AC_ENERGY_ACTIVE_DELIVERED_PHASE_1
class-attribute
instance-attribute
¤
The alternating current active energy delivered in phase 1.
AC_ENERGY_ACTIVE_DELIVERED_PHASE_2
class-attribute
instance-attribute
¤
The alternating current active energy delivered in phase 2.
AC_ENERGY_ACTIVE_DELIVERED_PHASE_3
class-attribute
instance-attribute
¤
The alternating current active energy delivered in phase 3.
AC_ENERGY_ACTIVE_PHASE_1
class-attribute
instance-attribute
¤
The alternating current active energy in phase 1.
AC_ENERGY_ACTIVE_PHASE_2
class-attribute
instance-attribute
¤
The alternating current active energy in phase 2.
AC_ENERGY_ACTIVE_PHASE_3
class-attribute
instance-attribute
¤
The alternating current active energy in phase 3.
AC_ENERGY_APPARENT
class-attribute
instance-attribute
¤
The alternating current apparent energy.
AC_ENERGY_APPARENT_PHASE_1
class-attribute
instance-attribute
¤
The alternating current apparent energy in phase 1.
AC_ENERGY_APPARENT_PHASE_2
class-attribute
instance-attribute
¤
The alternating current apparent energy in phase 2.
AC_ENERGY_APPARENT_PHASE_3
class-attribute
instance-attribute
¤
The alternating current apparent energy in phase 3.
AC_ENERGY_REACTIVE
class-attribute
instance-attribute
¤
The alternating current reactive energy.
AC_ENERGY_REACTIVE_PHASE_1
class-attribute
instance-attribute
¤
The alternating current reactive energy in phase 1.
AC_ENERGY_REACTIVE_PHASE_2
class-attribute
instance-attribute
¤
The alternating current reactive energy in phase 2.
AC_ENERGY_REACTIVE_PHASE_3
class-attribute
instance-attribute
¤
The alternating current reactive energy in phase 3.
AC_FREQUENCY
class-attribute
instance-attribute
¤
The alternating current frequency.
AC_POWER_ACTIVE
class-attribute
instance-attribute
¤
The alternating current active power.
AC_POWER_ACTIVE_PHASE_1
class-attribute
instance-attribute
¤
The alternating current active power in phase 1.
AC_POWER_ACTIVE_PHASE_2
class-attribute
instance-attribute
¤
The alternating current active power in phase 2.
AC_POWER_ACTIVE_PHASE_3
class-attribute
instance-attribute
¤
The alternating current active power in phase 3.
AC_POWER_APPARENT
class-attribute
instance-attribute
¤
The alternating current apparent power.
AC_POWER_APPARENT_PHASE_1
class-attribute
instance-attribute
¤
The alternating current apparent power in phase 1.
AC_POWER_APPARENT_PHASE_2
class-attribute
instance-attribute
¤
The alternating current apparent power in phase 2.
AC_POWER_APPARENT_PHASE_3
class-attribute
instance-attribute
¤
The alternating current apparent power in phase 3.
AC_POWER_FACTOR
class-attribute
instance-attribute
¤
The alternating current power factor.
AC_POWER_FACTOR_PHASE_1
class-attribute
instance-attribute
¤
The alternating current power factor in phase 1.
AC_POWER_FACTOR_PHASE_2
class-attribute
instance-attribute
¤
The alternating current power factor in phase 2.
AC_POWER_FACTOR_PHASE_3
class-attribute
instance-attribute
¤
The alternating current power factor in phase 3.
AC_POWER_REACTIVE
class-attribute
instance-attribute
¤
The alternating current reactive power.
AC_POWER_REACTIVE_PHASE_1
class-attribute
instance-attribute
¤
The alternating current reactive power in phase 1.
AC_POWER_REACTIVE_PHASE_2
class-attribute
instance-attribute
¤
The alternating current reactive power in phase 2.
AC_POWER_REACTIVE_PHASE_3
class-attribute
instance-attribute
¤
The alternating current reactive power in phase 3.
AC_REACTIVE_ENERGY
class-attribute
instance-attribute
¤
AC_REACTIVE_ENERGY = deprecated_member(
METRIC_AC_ENERGY_REACTIVE,
"AC_REACTIVE_ENERGY is deprecated, use AC_ENERGY_REACTIVE instead",
)
The alternating current reactive energy (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_REACTIVE
instead.
AC_REACTIVE_ENERGY_PHASE_1
class-attribute
instance-attribute
¤
AC_REACTIVE_ENERGY_PHASE_1 = deprecated_member(
METRIC_AC_ENERGY_REACTIVE_PHASE_1,
"AC_REACTIVE_ENERGY_PHASE_1 is deprecated, use AC_ENERGY_REACTIVE_PHASE_1 instead",
)
The alternating current reactive energy in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_REACTIVE_PHASE_1
instead.
AC_REACTIVE_ENERGY_PHASE_2
class-attribute
instance-attribute
¤
AC_REACTIVE_ENERGY_PHASE_2 = deprecated_member(
METRIC_AC_ENERGY_REACTIVE_PHASE_2,
"AC_REACTIVE_ENERGY_PHASE_2 is deprecated, use AC_ENERGY_REACTIVE_PHASE_2 instead",
)
The alternating current reactive energy in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_REACTIVE_PHASE_2
instead.
AC_REACTIVE_ENERGY_PHASE_3
class-attribute
instance-attribute
¤
AC_REACTIVE_ENERGY_PHASE_3 = deprecated_member(
METRIC_AC_ENERGY_REACTIVE_PHASE_3,
"AC_REACTIVE_ENERGY_PHASE_3 is deprecated, use AC_ENERGY_REACTIVE_PHASE_3 instead",
)
The alternating current reactive energy in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_ENERGY_REACTIVE_PHASE_3
instead.
AC_REACTIVE_POWER
class-attribute
instance-attribute
¤
AC_REACTIVE_POWER = deprecated_member(
METRIC_AC_POWER_REACTIVE,
"AC_REACTIVE_POWER is deprecated, use AC_POWER_REACTIVE instead",
)
The alternating current reactive power (deprecated).
Deprecated in v0.18.0
Use AC_POWER_REACTIVE
instead.
AC_REACTIVE_POWER_PHASE_1
class-attribute
instance-attribute
¤
AC_REACTIVE_POWER_PHASE_1 = deprecated_member(
METRIC_AC_POWER_REACTIVE_PHASE_1,
"AC_REACTIVE_POWER_PHASE_1 is deprecated, use AC_POWER_REACTIVE_PHASE_1 instead",
)
The alternating current reactive power in phase 1 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_REACTIVE_PHASE_1
instead.
AC_REACTIVE_POWER_PHASE_2
class-attribute
instance-attribute
¤
AC_REACTIVE_POWER_PHASE_2 = deprecated_member(
METRIC_AC_POWER_REACTIVE_PHASE_2,
"AC_REACTIVE_POWER_PHASE_2 is deprecated, use AC_POWER_REACTIVE_PHASE_2 instead",
)
The alternating current reactive power in phase 2 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_REACTIVE_PHASE_2
instead.
AC_REACTIVE_POWER_PHASE_3
class-attribute
instance-attribute
¤
AC_REACTIVE_POWER_PHASE_3 = deprecated_member(
METRIC_AC_POWER_REACTIVE_PHASE_3,
"AC_REACTIVE_POWER_PHASE_3 is deprecated, use AC_POWER_REACTIVE_PHASE_3 instead",
)
The alternating current reactive power in phase 3 (deprecated).
Deprecated in v0.18.0
Use AC_POWER_REACTIVE_PHASE_3
instead.
AC_TOTAL_HARMONIC_DISTORTION_CURRENT
class-attribute
instance-attribute
¤
The alternating current total harmonic distortion current.
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1
class-attribute
instance-attribute
¤
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1 = (
METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1
)
The alternating current total harmonic distortion current in phase 1.
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2
class-attribute
instance-attribute
¤
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2 = (
METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2
)
The alternating current total harmonic distortion current in phase 2.
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3
class-attribute
instance-attribute
¤
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3 = (
METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3
)
The alternating current total harmonic distortion current in phase 3.
AC_VOLTAGE
class-attribute
instance-attribute
¤
The alternating current electric potential difference.
AC_VOLTAGE_PHASE_1_N
class-attribute
instance-attribute
¤
The alternating current electric potential difference between phase 1 and neutral.
AC_VOLTAGE_PHASE_1_PHASE_2
class-attribute
instance-attribute
¤
The alternating current electric potential difference between phase 1 and phase 2.
AC_VOLTAGE_PHASE_2_N
class-attribute
instance-attribute
¤
The alternating current electric potential difference between phase 2 and neutral.
AC_VOLTAGE_PHASE_2_PHASE_3
class-attribute
instance-attribute
¤
The alternating current electric potential difference between phase 2 and phase 3.
AC_VOLTAGE_PHASE_3_N
class-attribute
instance-attribute
¤
The alternating current electric potential difference between phase 3 and neutral.
AC_VOLTAGE_PHASE_3_PHASE_1
class-attribute
instance-attribute
¤
The alternating current electric potential difference between phase 3 and phase 1.
BATTERY_CAPACITY
class-attribute
instance-attribute
¤
The capacity of the battery.
BATTERY_SOC_PCT
class-attribute
instance-attribute
¤
The state of charge of the battery as a percentage.
BATTERY_TEMPERATURE
class-attribute
instance-attribute
¤
The temperature of the battery.
DC_CURRENT
class-attribute
instance-attribute
¤
The direct current current.
DC_VOLTAGE
class-attribute
instance-attribute
¤
The direct current voltage.
EV_CHARGER_TEMPERATURE
class-attribute
instance-attribute
¤
The temperature of the EV charger.
INVERTER_TEMPERATURE
class-attribute
instance-attribute
¤
The temperature of the inverter.
INVERTER_TEMPERATURE_CABINET
class-attribute
instance-attribute
¤
The temperature of the inverter cabinet.
INVERTER_TEMPERATURE_HEATSINK
class-attribute
instance-attribute
¤
The temperature of the inverter heatsink.
INVERTER_TEMPERATURE_TRANSFORMER
class-attribute
instance-attribute
¤
The temperature of the inverter transformer.
SENSOR_AIR_PRESSURE
class-attribute
instance-attribute
¤
The air pressure measured.
SENSOR_DEW_POINT
class-attribute
instance-attribute
¤
The dew point measured.
SENSOR_IRRADIANCE
class-attribute
instance-attribute
¤
The irradiance measured.
SENSOR_RELATIVE_HUMIDITY
class-attribute
instance-attribute
¤
The relative humidity measured.
SENSOR_TEMPERATURE
class-attribute
instance-attribute
¤
The temperature measured.
SENSOR_WIND_DIRECTION
class-attribute
instance-attribute
¤
The direction of the wind measured.
SENSOR_WIND_SPEED
class-attribute
instance-attribute
¤
The speed of the wind measured.
UNSPECIFIED
class-attribute
instance-attribute
¤
The metric is unspecified (this should not be used).
frequenz.client.microgrid.metrics.MetricSample
dataclass
¤
A sampled metric.
This represents a single sample of a specific metric, the value of which is either measured at a particular time. The real-time system-defined bounds are optional and may not always be present or set.
Relationship Between Bounds and Metric Samples
Suppose a metric sample for active power has a lower-bound of -10,000 W, and an upper-bound of 10,000 W. For the system to accept a charge command, clients need to request current values within the bounds.
Source code in frequenz/client/microgrid/metrics/_sample.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 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 | |
Attributes¤
bounds
instance-attribute
¤
The bounds that apply to the metric sample.
These bounds adapt in real-time to reflect the operating conditions at the time of aggregation or derivation.
In the case of certain components like batteries, multiple bounds might exist. These multiple bounds collectively extend the range of allowable values, effectively forming a union of all given bounds. In such cases, the value of the metric must be within at least one of the bounds.
In accordance with the passive sign convention, bounds that limit discharge would have negative numbers, while those limiting charge, such as for the State of Power (SoP) metric, would be positive. Hence bounds can have positive and negative values depending on the metric they represent.
Example
The diagram below illustrates the relationship between the bounds.
connection
class-attribute
instance-attribute
¤
connection: str | None = None
The electrical connection within the component from which the metric was sampled.
This will be present when the same Metric can be obtained from multiple
electrical connections within the component. Knowing the connection can help in
certain control and monitoring applications.
In cases where the component has just one connection for a metric, then the
connection is None.
Example
A hybrid inverter can have a DC string for a battery and another DC string for a
PV array. The connection names could resemble, say, dc_battery_0 and
`dc_pv_0. A metric like DC voltage can be obtained from both connections. For
an application to determine the SoC of the battery using the battery voltage,
which connection the voltage metric was sampled from is important.
value
instance-attribute
¤
value: float | AggregatedMetricValue | None
The value of the sampled metric.
Functions¤
as_single_value ¤
as_single_value(
*, aggregation_method: AggregationMethod = AVG
) -> float | None
Return the value of this sample as a single value.
if value is a float,
it is returned as is. If value is an
AggregatedMetricValue,
the value is aggregated using the provided aggregation_method.
| PARAMETER | DESCRIPTION |
|---|---|
aggregation_method
|
The method to use to aggregate the value when
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float | None
|
The value of the sample as a single value, or |