microgrid_pb2_grpc
frequenz.api.microgrid.microgrid_pb2_grpc
¤
Client and server classes corresponding to protobuf-defined services.
Classes¤
frequenz.api.microgrid.microgrid_pb2_grpc.Microgrid
¤
Bases: object
Missing associated documentation comment in .proto file.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
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 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 |
|
frequenz.api.microgrid.microgrid_pb2_grpc.MicrogridAsyncStub
¤
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
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 614 615 |
|
Attributes¤
AddExclusionBounds: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetBoundsParam, google.protobuf.timestamp_pb2.Timestamp]
instance-attribute
¤
Adds exclusion bounds for a given metric of a given component, and returns the UTC timestamp until which the given exclusion bounds will stay in effect.
Exclusion bounds refer to the range of values that are disallowed for the
metric. If these bounds for a metric are [lower
, upper
], then this
metric's value
needs to comply with the constraints
value <= lower
OR upper <= value
.
Exclusion bounds are a useful tool for enhancing the performance of a system. They can be used to restrict the acceptance of commands that fall below a certain threshold, which can help ensure the smooth functioning of the system. E.g., exclusion bounds can be set to limit the minimum charging power to a sufficiently high level, preventing a peak-shaver client from sending charge powers that are too low when a DC heater client is executing a charge pulse. This can significantly improve the overall performance of the DC heating mechanism.
If multiple exclusion bounds have been provided bor a metric, then the aggregated lower and upper exclusion bounds are calculated as follows: lower: the minimum of all lower exclusion bounds upper: the maximum of all upper exclusion bounds
It is important to note that these bounds work together with
system_inclusion_bounds
.
E.g., for the system to accept a charge command,
clients need to request power values within the bounds
[system_inclusion_bounds.lower, system_exclusion_bounds.lower]
.
This means that clients can only request charge commands with values that
are within the system_inclusion_bounds
, but not within
system_exclusion_bounds
.
Similarly, for the system to accept a discharge command,
clients need to request power values within the bounds
[system_exclusion_bounds.upper, system_inclusion_bounds.upper]
.
The following diagram illustrates the relationship between the bounds.
---- values here are disallowed and wil be rejected ==== vales here are allowed and will be accepted
AddInclusionBounds: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetBoundsParam, google.protobuf.timestamp_pb2.Timestamp]
instance-attribute
¤
Adds inclusion bounds for a given metric of a given component, and returns the UTC timestamp until which the given inclusion bounds will stay in effect.
Inclusion bounds refer to the range of values that are allowed for the
metric. If these bounds for a metric are [lower
, upper
], then this
metric's value
needs to comply with the constraint
lower <= value <= upper
.
If multiple inclusion bounds have been provided bor a metric, then the aggregated lower and upper inclusion bounds are calculated as follows: lower: the maximum of all lower inclusion bounds upper: the minimum of all upper inclusion bounds
It is important to note that these bounds work together with
system_exclusion_bounds
.
E.g., for the system to accept a charge command,
clients need to request power values within the bounds
[system_inclusion_bounds.lower, system_exclusion_bounds.lower]
.
This means that clients can only request charge commands with values that
are within the system_inclusion_bounds
, but not within
system_exclusion_bounds
.
Similarly, for the system to accept a discharge command,
clients need to request power values within the bounds
[system_exclusion_bounds.upper, system_inclusion_bounds.upper]
.
The following diagram illustrates the relationship between the bounds.
---- values here are disallowed and wil be rejected ==== vales here are allowed and will be accepted
CanStreamData: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.wrappers_pb2.BoolValue]
instance-attribute
¤
Returns whether the component with given ID can stream data.
ColdStandby: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty]
instance-attribute
¤
Sets the given component into a cold-standby state, from which it can return into an operational state within at most 2 minutes.
Performs the following sequence actions for the following component categories:
- Inverter: Checks if AC and DC relays are closed, then
- sets power to 0, and
- opens AC relays
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call efffectively skips that action.
ErrorAck: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty]
instance-attribute
¤
Acknowledges any recoverable error reported by the component, and brings it back to the stopped or cold-standby state.
GetMicrogridMetadata: grpc.aio.UnaryUnaryMultiCallable[google.protobuf.empty_pb2.Empty, frequenz.api.microgrid.microgrid_pb2.MicrogridMetadata]
instance-attribute
¤
/ Returns the microgrid metadata / The metadata consists of information that describes the overall / microgrid, as opposed to its components, / e.g., the microgrid ID, location.
HotStandby: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty]
instance-attribute
¤
Sets the given component into a hot-standby state, from which it can return into an operational state within at most 5 seconds.
Performs the following sequence actions for the following component categories:
- Inverter: Checks if AC and DC relays are closed, then
- sets power to 0
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
ListComponents: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentFilter, frequenz.api.microgrid.microgrid_pb2.ComponentList]
instance-attribute
¤
List components in the local microgrid, optionally filtered by a given list of component IDs and component categories.
If provided, the filters for component IDs and categories have an AND
relationship with one another, meaning that they are applied serially,
but the elements within a single filter list have an OR
relationship with
each other.
E.g., if ids
= [1, 2, 3], and categories
= [
ComponentCategory::COMPONENT_CATEGORY_INVERTER
,
ComponentCategory::COMPONENT_CATEGORY_BATTERY
],
then the results will consist of elements that
have the IDs 1, OR 2, OR 3,
AND
are of the categories ComponentCategory::COMPONENT_CATEGORY_INVERTER
OR
ComponentCategory::COMPONENT_CATEGORY_BATTERY
.
If a filter list is empty, then that filter is not applied.
ListConnections: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ConnectionFilter, frequenz.api.microgrid.microgrid_pb2.ConnectionList]
instance-attribute
¤
Returns a list of the connections between components as (start, end)
pairs of connection IDs, where the direction of individual connections
is always away from the grid endpoint, i.e. aligned with the direction
of positive current according to the passive sign convention:
https://en.wikipedia.org/wiki/Passive_sign_convention
The request may be filtered by start
/end
component(s) of individual
connections. If provided, the start
and end
filters have an AND
relationship between each other, meaning that they are applied serially,
but an OR
relationship with other elements in the same list.
For example, if start
= [1, 2, 3]
, and end
= [4, 5, 6]
, then the
result should have all the connections where
* each start
component ID is either 1
, 2
, OR 3
,
AND
* each end
component ID is either 4
, 5
, OR 6
.
SetPowerActive: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetPowerActiveParam, google.protobuf.empty_pb2.Empty]
instance-attribute
¤
Sets the active power output of a component with a given ID, provided the component supports it.
Note that the target component may have a resolution of more than 1 W. E.g., an inverter may have a resolution of 88 W. In such cases, the magnitude of power will be floored to the nearest multiple of the resolution.
Performs the following sequence actions for the following component categories:
- Inverter: Sends the discharge command to the inverter, making it deliver AC power.
SetPowerReactive: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetPowerReactiveParam, google.protobuf.empty_pb2.Empty]
instance-attribute
¤
Sets the reactive power output of a component with a given ID, provided the component supports it.
Note that the target component may have a resolution of more than 1 VAr. E.g., an inverter may have a resolution of 88 VAr. In such cases, the magnitude of power will be floored to the nearest multiple of the resolution.
Start: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty]
instance-attribute
¤
Starts the component, and brings it into a state where it is immediately operational.
Performs the following sequence of actions for the following component categories:
- Inverter:
- closes DC relays, if the feature is available
- closes AC relays
-
sets power output to 0
-
Battery: Checks if DC relays are open, then
- closes DC relays
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
If a feature required to perform an action is missing, then that action is skipped.
Stop: grpc.aio.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty]
instance-attribute
¤
Stops the component completely, potentially disengaging its power electronics controller(s).
Performs the following sequence actions for the following component categories:
- Inverter:
- Brings component to the cold-standby state
-
opens DC relays
-
Battery: Checks if the power output is 0, then
- opens DC relays
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
If a feature required to perform an action is missing, then that action is skipped.
StreamComponentData: grpc.aio.UnaryStreamMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, frequenz.api.microgrid.microgrid_pb2.ComponentData]
instance-attribute
¤
Returns a stream containing data from a component with a given ID.
frequenz.api.microgrid.microgrid_pb2_grpc.MicrogridServicer
¤
Bases: object
Missing associated documentation comment in .proto file.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
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 |
|
Functions¤
AddExclusionBounds(request, context)
¤
Adds exclusion bounds for a given metric of a given component, and returns the UTC timestamp until which the given exclusion bounds will stay in effect.
Exclusion bounds refer to the range of values that are disallowed for the
metric. If these bounds for a metric are [lower
, upper
], then this
metric's value
needs to comply with the constraints
value <= lower
OR upper <= value
.
Exclusion bounds are a useful tool for enhancing the performance of a system. They can be used to restrict the acceptance of commands that fall below a certain threshold, which can help ensure the smooth functioning of the system. E.g., exclusion bounds can be set to limit the minimum charging power to a sufficiently high level, preventing a peak-shaver client from sending charge powers that are too low when a DC heater client is executing a charge pulse. This can significantly improve the overall performance of the DC heating mechanism.
If multiple exclusion bounds have been provided bor a metric, then the aggregated lower and upper exclusion bounds are calculated as follows: lower: the minimum of all lower exclusion bounds upper: the maximum of all upper exclusion bounds
It is important to note that these bounds work together with
system_inclusion_bounds
.
E.g., for the system to accept a charge command,
clients need to request power values within the bounds
[system_inclusion_bounds.lower, system_exclusion_bounds.lower]
.
This means that clients can only request charge commands with values that
are within the system_inclusion_bounds
, but not within
system_exclusion_bounds
.
Similarly, for the system to accept a discharge command,
clients need to request power values within the bounds
[system_exclusion_bounds.upper, system_inclusion_bounds.upper]
.
The following diagram illustrates the relationship between the bounds.
inclusion.lower inclusion.upper
<-------|============|------------------|============|--------->
exclusion.lower exclusion.upper
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
AddInclusionBounds(request, context)
¤
Adds inclusion bounds for a given metric of a given component, and returns the UTC timestamp until which the given inclusion bounds will stay in effect.
Inclusion bounds refer to the range of values that are allowed for the
metric. If these bounds for a metric are [lower
, upper
], then this
metric's value
needs to comply with the constraint
lower <= value <= upper
.
If multiple inclusion bounds have been provided bor a metric, then the aggregated lower and upper inclusion bounds are calculated as follows: lower: the maximum of all lower inclusion bounds upper: the minimum of all upper inclusion bounds
It is important to note that these bounds work together with
system_exclusion_bounds
.
E.g., for the system to accept a charge command,
clients need to request power values within the bounds
[system_inclusion_bounds.lower, system_exclusion_bounds.lower]
.
This means that clients can only request charge commands with values that
are within the system_inclusion_bounds
, but not within
system_exclusion_bounds
.
Similarly, for the system to accept a discharge command,
clients need to request power values within the bounds
[system_exclusion_bounds.upper, system_inclusion_bounds.upper]
.
The following diagram illustrates the relationship between the bounds.
inclusion.lower inclusion.upper
<-------|============|------------------|============|--------->
exclusion.lower exclusion.upper
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
CanStreamData(request, context)
¤
Returns whether the component with given ID can stream data.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
ColdStandby(request, context)
¤
Sets the given component into a cold-standby state, from which it can return into an operational state within at most 2 minutes.
Performs the following sequence actions for the following component categories:
- Inverter: Checks if AC and DC relays are closed, then
- sets power to 0, and
- opens AC relays
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call efffectively skips that action.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
ErrorAck(request, context)
¤
Acknowledges any recoverable error reported by the component, and brings it back to the stopped or cold-standby state.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
GetMicrogridMetadata(request, context)
¤
/ Returns the microgrid metadata / The metadata consists of information that describes the overall / microgrid, as opposed to its components, / e.g., the microgrid ID, location.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
HotStandby(request, context)
¤
Sets the given component into a hot-standby state, from which it can return into an operational state within at most 5 seconds.
Performs the following sequence actions for the following component categories:
- Inverter: Checks if AC and DC relays are closed, then
- sets power to 0
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
ListComponents(request, context)
¤
List components in the local microgrid, optionally filtered by a given list of component IDs and component categories.
If provided, the filters for component IDs and categories have an AND
relationship with one another, meaning that they are applied serially,
but the elements within a single filter list have an OR
relationship with
each other.
E.g., if ids
= [1, 2, 3], and categories
= [
ComponentCategory::COMPONENT_CATEGORY_INVERTER
,
ComponentCategory::COMPONENT_CATEGORY_BATTERY
],
then the results will consist of elements that
have the IDs 1, OR 2, OR 3,
AND
are of the categories ComponentCategory::COMPONENT_CATEGORY_INVERTER
OR
ComponentCategory::COMPONENT_CATEGORY_BATTERY
.
If a filter list is empty, then that filter is not applied.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
ListConnections(request, context)
¤
Returns a list of the connections between components as (start, end)
pairs of connection IDs, where the direction of individual connections
is always away from the grid endpoint, i.e. aligned with the direction
of positive current according to the passive sign convention:
https://en.wikipedia.org/wiki/Passive_sign_convention
The request may be filtered by start
/end
component(s) of individual
connections. If provided, the start
and end
filters have an AND
relationship between each other, meaning that they are applied serially,
but an OR
relationship with other elements in the same list.
For example, if start
= [1, 2, 3]
, and end
= [4, 5, 6]
, then the
result should have all the connections where
* each start
component ID is either 1
, 2
, OR 3
,
AND
* each end
component ID is either 4
, 5
, OR 6
.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
SetPowerActive(request, context)
¤
Sets the active power output of a component with a given ID, provided the component supports it.
Note that the target component may have a resolution of more than 1 W. E.g., an inverter may have a resolution of 88 W. In such cases, the magnitude of power will be floored to the nearest multiple of the resolution.
Performs the following sequence actions for the following component categories:
- Inverter: Sends the discharge command to the inverter, making it deliver AC power.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
SetPowerReactive(request, context)
¤
Sets the reactive power output of a component with a given ID, provided the component supports it.
Note that the target component may have a resolution of more than 1 VAr. E.g., an inverter may have a resolution of 88 VAr. In such cases, the magnitude of power will be floored to the nearest multiple of the resolution.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
Start(request, context)
¤
Starts the component, and brings it into a state where it is immediately operational.
Performs the following sequence of actions for the following component categories:
- Inverter:
- closes DC relays, if the feature is available
- closes AC relays
-
sets power output to 0
-
Battery: Checks if DC relays are open, then
- closes DC relays
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
If a feature required to perform an action is missing, then that action is skipped.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
Stop(request, context)
¤
Stops the component completely, potentially disengaging its power electronics controller(s).
Performs the following sequence actions for the following component categories:
- Inverter:
- Brings component to the cold-standby state
-
opens DC relays
-
Battery: Checks if the power output is 0, then
- opens DC relays
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
If a feature required to perform an action is missing, then that action is skipped.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
StreamComponentData(request, context)
¤
Returns a stream containing data from a component with a given ID.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
frequenz.api.microgrid.microgrid_pb2_grpc.MicrogridStub
¤
Bases: object
Missing associated documentation comment in .proto file.
Source code in frequenz/api/microgrid/microgrid_pb2_grpc.py
Attributes¤
AddExclusionBounds: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetBoundsParam, google.protobuf.timestamp_pb2.Timestamp] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/AddExclusionBounds', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.SetBoundsParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_timestamp__pb2.Timestamp.FromString)
instance-attribute
¤
Adds exclusion bounds for a given metric of a given component, and returns the UTC timestamp until which the given exclusion bounds will stay in effect.
Exclusion bounds refer to the range of values that are disallowed for the
metric. If these bounds for a metric are [lower
, upper
], then this
metric's value
needs to comply with the constraints
value <= lower
OR upper <= value
.
Exclusion bounds are a useful tool for enhancing the performance of a system. They can be used to restrict the acceptance of commands that fall below a certain threshold, which can help ensure the smooth functioning of the system. E.g., exclusion bounds can be set to limit the minimum charging power to a sufficiently high level, preventing a peak-shaver client from sending charge powers that are too low when a DC heater client is executing a charge pulse. This can significantly improve the overall performance of the DC heating mechanism.
If multiple exclusion bounds have been provided bor a metric, then the aggregated lower and upper exclusion bounds are calculated as follows: lower: the minimum of all lower exclusion bounds upper: the maximum of all upper exclusion bounds
It is important to note that these bounds work together with
system_inclusion_bounds
.
E.g., for the system to accept a charge command,
clients need to request power values within the bounds
[system_inclusion_bounds.lower, system_exclusion_bounds.lower]
.
This means that clients can only request charge commands with values that
are within the system_inclusion_bounds
, but not within
system_exclusion_bounds
.
Similarly, for the system to accept a discharge command,
clients need to request power values within the bounds
[system_exclusion_bounds.upper, system_inclusion_bounds.upper]
.
The following diagram illustrates the relationship between the bounds.
---- values here are disallowed and wil be rejected ==== vales here are allowed and will be accepted
AddInclusionBounds: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetBoundsParam, google.protobuf.timestamp_pb2.Timestamp] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/AddInclusionBounds', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.SetBoundsParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_timestamp__pb2.Timestamp.FromString)
instance-attribute
¤
Adds inclusion bounds for a given metric of a given component, and returns the UTC timestamp until which the given inclusion bounds will stay in effect.
Inclusion bounds refer to the range of values that are allowed for the
metric. If these bounds for a metric are [lower
, upper
], then this
metric's value
needs to comply with the constraint
lower <= value <= upper
.
If multiple inclusion bounds have been provided bor a metric, then the aggregated lower and upper inclusion bounds are calculated as follows: lower: the maximum of all lower inclusion bounds upper: the minimum of all upper inclusion bounds
It is important to note that these bounds work together with
system_exclusion_bounds
.
E.g., for the system to accept a charge command,
clients need to request power values within the bounds
[system_inclusion_bounds.lower, system_exclusion_bounds.lower]
.
This means that clients can only request charge commands with values that
are within the system_inclusion_bounds
, but not within
system_exclusion_bounds
.
Similarly, for the system to accept a discharge command,
clients need to request power values within the bounds
[system_exclusion_bounds.upper, system_inclusion_bounds.upper]
.
The following diagram illustrates the relationship between the bounds.
---- values here are disallowed and wil be rejected ==== vales here are allowed and will be accepted
CanStreamData: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.wrappers_pb2.BoolValue] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/CanStreamData', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentIdParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString)
instance-attribute
¤
Returns whether the component with given ID can stream data.
ColdStandby: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/ColdStandby', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentIdParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString)
instance-attribute
¤
Sets the given component into a cold-standby state, from which it can return into an operational state within at most 2 minutes.
Performs the following sequence actions for the following component categories:
- Inverter: Checks if AC and DC relays are closed, then
- sets power to 0, and
- opens AC relays
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call efffectively skips that action.
ErrorAck: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/ErrorAck', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentIdParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString)
instance-attribute
¤
Acknowledges any recoverable error reported by the component, and brings it back to the stopped or cold-standby state.
GetMicrogridMetadata: grpc.UnaryUnaryMultiCallable[google.protobuf.empty_pb2.Empty, frequenz.api.microgrid.microgrid_pb2.MicrogridMetadata] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/GetMicrogridMetadata', request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, response_deserializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.MicrogridMetadata.FromString)
instance-attribute
¤
/ Returns the microgrid metadata / The metadata consists of information that describes the overall / microgrid, as opposed to its components, / e.g., the microgrid ID, location.
HotStandby: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/HotStandby', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentIdParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString)
instance-attribute
¤
Sets the given component into a hot-standby state, from which it can return into an operational state within at most 5 seconds.
Performs the following sequence actions for the following component categories:
- Inverter: Checks if AC and DC relays are closed, then
- sets power to 0
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
ListComponents: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentFilter, frequenz.api.microgrid.microgrid_pb2.ComponentList] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/ListComponents', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentFilter.SerializeToString, response_deserializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentList.FromString)
instance-attribute
¤
List components in the local microgrid, optionally filtered by a given list of component IDs and component categories.
If provided, the filters for component IDs and categories have an AND
relationship with one another, meaning that they are applied serially,
but the elements within a single filter list have an OR
relationship with
each other.
E.g., if ids
= [1, 2, 3], and categories
= [
ComponentCategory::COMPONENT_CATEGORY_INVERTER
,
ComponentCategory::COMPONENT_CATEGORY_BATTERY
],
then the results will consist of elements that
have the IDs 1, OR 2, OR 3,
AND
are of the categories ComponentCategory::COMPONENT_CATEGORY_INVERTER
OR
ComponentCategory::COMPONENT_CATEGORY_BATTERY
.
If a filter list is empty, then that filter is not applied.
ListConnections: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ConnectionFilter, frequenz.api.microgrid.microgrid_pb2.ConnectionList] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/ListConnections', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ConnectionFilter.SerializeToString, response_deserializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ConnectionList.FromString)
instance-attribute
¤
Returns a list of the connections between components as (start, end)
pairs of connection IDs, where the direction of individual connections
is always away from the grid endpoint, i.e. aligned with the direction
of positive current according to the passive sign convention:
https://en.wikipedia.org/wiki/Passive_sign_convention
The request may be filtered by start
/end
component(s) of individual
connections. If provided, the start
and end
filters have an AND
relationship between each other, meaning that they are applied serially,
but an OR
relationship with other elements in the same list.
For example, if start
= [1, 2, 3]
, and end
= [4, 5, 6]
, then the
result should have all the connections where
* each start
component ID is either 1
, 2
, OR 3
,
AND
* each end
component ID is either 4
, 5
, OR 6
.
SetPowerActive: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetPowerActiveParam, google.protobuf.empty_pb2.Empty] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/SetPowerActive', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.SetPowerActiveParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString)
instance-attribute
¤
Sets the active power output of a component with a given ID, provided the component supports it.
Note that the target component may have a resolution of more than 1 W. E.g., an inverter may have a resolution of 88 W. In such cases, the magnitude of power will be floored to the nearest multiple of the resolution.
Performs the following sequence actions for the following component categories:
- Inverter: Sends the discharge command to the inverter, making it deliver AC power.
SetPowerReactive: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.SetPowerReactiveParam, google.protobuf.empty_pb2.Empty] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/SetPowerReactive', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.SetPowerReactiveParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString)
instance-attribute
¤
Sets the reactive power output of a component with a given ID, provided the component supports it.
Note that the target component may have a resolution of more than 1 VAr. E.g., an inverter may have a resolution of 88 VAr. In such cases, the magnitude of power will be floored to the nearest multiple of the resolution.
Start: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/Start', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentIdParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString)
instance-attribute
¤
Starts the component, and brings it into a state where it is immediately operational.
Performs the following sequence of actions for the following component categories:
- Inverter:
- closes DC relays, if the feature is available
- closes AC relays
-
sets power output to 0
-
Battery: Checks if DC relays are open, then
- closes DC relays
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
If a feature required to perform an action is missing, then that action is skipped.
Stop: grpc.UnaryUnaryMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, google.protobuf.empty_pb2.Empty] = channel.unary_unary('/frequenz.api.microgrid.Microgrid/Stop', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentIdParam.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString)
instance-attribute
¤
Stops the component completely, potentially disengaging its power electronics controller(s).
Performs the following sequence actions for the following component categories:
- Inverter:
- Brings component to the cold-standby state
-
opens DC relays
-
Battery: Checks if the power output is 0, then
- opens DC relays
If any of the checks mentioned above fails, then the method call returns an error.
If any of the above mentioned actions for a given component has already been performed, then this method call effectively skips that action.
If a feature required to perform an action is missing, then that action is skipped.
StreamComponentData: grpc.UnaryStreamMultiCallable[frequenz.api.microgrid.microgrid_pb2.ComponentIdParam, frequenz.api.microgrid.microgrid_pb2.ComponentData] = channel.unary_stream('/frequenz.api.microgrid.Microgrid/StreamComponentData', request_serializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentIdParam.SerializeToString, response_deserializer=frequenz_dot_api_dot_microgrid_dot_microgrid__pb2.ComponentData.FromString)
instance-attribute
¤
Returns a stream containing data from a component with a given ID.
Functions¤
__init__(channel)
¤
Constructor.
PARAMETER | DESCRIPTION |
---|---|
channel |
A grpc.Channel. |