Skip to main content

Frequenz Microgrid API

Build Status PyPI Package Docs

Introduction

The Frequenz Microgrid API is an service for operating and monitoring electrical components and sensors within a microgrid. It offers various functionalities related to microgrid management, including metadata retrieval, component listing, setting power levels, and controlling the state of components. The API is structured around the concept of a microgrid, which is a localized energy system composed of various interconnected components and auxiliary sensors. Microgrids are typically connected to the main grid, but can also operate independently, in which case they are referred to as islanded microgrids.

The API supports different categories of electrical components and sensors. The list of supported electrical component categories cam be found here. The list of supported sensor categories cam be found here. Note that each of these categories could have their own types, e.g., inverters could belong to the type "battery" or "PV". This information is stored in the metadata of each component and sensor, and is exposed by the API.

The API streams data from the microgrid in real-time, allowing users to retrieve the status and performance of components and sensors. It also allows users to control the microgrid by setting power levels and controlling the state of components.

Objective

The objective of this API is to provide a standardized interface for monitoring and controlling components and sensors within a microgrid. The API is designed to be vendor-agnostic, allowing users to interact with components from various vendors using the same API.

Key Features

  • Metadata Retrieval: The API allows users to retrieve metadata about the microgrid, providing information about the microgrid's unique identifier (ID) and geographical coordinates.

  • Component Listing: Users can list components in the microgrid, optionally filtered by component IDs and categories.

  • Component Graphs: The API provides a way to list electrical connections between components. Connections are represented as pairs of component IDs that are directly connected. The connections can be visualized as a directed graph, where the nodes are components, the edges are connections between components, and the edge direction represents the direction of power flow in Passive Sign Convention.

  • Power Level Control: Users can set the active and reactive power levels of components that support it.

  • Component State Control: For components that support it, the API supports starting, stopping, and transitioning components between these and the standby states.

  • Bounds Management: Users can set exclusion and inclusion bounds for specific metrics of a component. These bounds define the acceptable and unacceptable ranges of metric values. E.g., one could set the inclusion bounds for a battery's DC power to be between -100kW and 100 kW, and the exclusion bounds to be between -50kW and 50kW. This would allow the battery to operate between -100kW and 100kW, but would prevent it from operating between -50kW and 50kW.

Example Use Cases:

This API is designed for use in microgrid management and control systems. It can be applied in various scenarios, including:

  • Microgrid Monitoring: Monitoring the status and performance of components in a microgrid, allowing operators to ensure efficient energy distribution.

  • Optimizing Energy Storage: Managing the charge and discharge power of storage systems and generators, e.g., batteries, CHPs, etc., to optimize energy storage and consumption within the microgrid.

  • Flexibility Management: Managing the flexibility of components in the microgrid, e.g., by controlling the state and power draw of electrical components, to ensure that the microgrid can respond to changes in energy demand.

  • Performance Enhancements: Setting exclusion bounds for metrics to enhance system performance and prevent extreme values in battery SoCs or power output.

Target Audience:

This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge of any specific hardware implementation.

Contributing

If you want to know how to build this project and contribute to it, please check out the Contributing Guide.

Release files for frequenz-api-microgrid 0.19.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frequenz-api-microgrid 0.19.1
File Size Uploaded
frequenz_api_microgrid-0.19.1.tar.gz 258.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for frequenz-api-microgrid 0.19.1
File Interpreter ABI Platform
frequenz_api_microgrid-0.19.1-py3-none-any.whl Python 3 none any Details

Total release size: 323.0 kB

Release files / frequenz_api_microgrid-0.19.1.tar.gz

Download URL frequenz_api_microgrid-0.19.1.tar.gz
Size 258.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cfcb67f8d2c7c4016c1e2547dab584731f48cc502b706ab9fe552275e6270ea3
BLAKE2b-256 checksum
How to use checksums
2f4e13a69b56ad048c7fd24c971971529fe28887a9483b3877aaa3c2440a0638
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / frequenz_api_microgrid-0.19.1-py3-none-any.whl

Download URL frequenz_api_microgrid-0.19.1-py3-none-any.whl
Size 64.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cd01623d693e4a4f65cfb6cee10bf4b0ee61ace6e68b81a917aba71734364c2
BLAKE2b-256 checksum
How to use checksums
97dc077501abf052902bf99ed89dcc958d9b4691cf7088604052a72b32d9ea13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.19.1 This release

2 release files

0.19.0

2 release files

0.18.2

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.6

2 release files

0.15.5

2 release files

0.15.4

2 release files

0.14.0

2 release files

0.13.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page