{"id":21974272,"url":"https://github.com/frequenz-floss/frequenz-api-microgrid","last_synced_at":"2025-06-14T09:06:43.086Z","repository":{"id":57942573,"uuid":"523701831","full_name":"frequenz-floss/frequenz-api-microgrid","owner":"frequenz-floss","description":"gRPC+protobuf specification and Python bindings for the Frequenz Microgrid API","archived":false,"fork":false,"pushed_at":"2025-06-10T13:24:03.000Z","size":7121,"stargazers_count":6,"open_issues_count":26,"forks_count":6,"subscribers_count":3,"default_branch":"v0.x.x","last_synced_at":"2025-06-10T13:24:23.043Z","etag":null,"topics":["api","frequenz","grpc","microgrid","protobuf","python","rpc"],"latest_commit_sha":null,"homepage":"https://frequenz-floss.github.io/frequenz-api-microgrid/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frequenz-floss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-11T11:44:18.000Z","updated_at":"2025-06-10T13:04:09.000Z","dependencies_parsed_at":"2023-11-13T09:45:15.295Z","dependency_job_id":"18166581-fdf7-496f-b726-8987c0ad22a2","html_url":"https://github.com/frequenz-floss/frequenz-api-microgrid","commit_stats":{"total_commits":188,"total_committers":5,"mean_commits":37.6,"dds":0.5797872340425532,"last_synced_commit":"bd34ea571263fd7f365047ed475f1159683df793"},"previous_names":["frequenz-floss/frequenz-api-microgrid-proto"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/frequenz-floss/frequenz-api-microgrid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Ffrequenz-api-microgrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Ffrequenz-api-microgrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Ffrequenz-api-microgrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Ffrequenz-api-microgrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frequenz-floss","download_url":"https://codeload.github.com/frequenz-floss/frequenz-api-microgrid/tar.gz/refs/heads/v0.x.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Ffrequenz-api-microgrid/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259790455,"owners_count":22911547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","frequenz","grpc","microgrid","protobuf","python","rpc"],"created_at":"2024-11-29T15:40:31.275Z","updated_at":"2025-06-14T09:06:43.069Z","avatar_url":"https://github.com/frequenz-floss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frequenz Microgrid API\n\n[![Build Status](https://github.com/frequenz-floss/frequenz-api-microgrid/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/frequenz-api-microgrid/actions/workflows/ci.yaml)\n[![PyPI Package](https://img.shields.io/pypi/v/frequenz-api-microgrid)](https://pypi.org/project/frequenz-api-microgrid/)\n[![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/frequenz-api-microgrid/)\n\n## Introduction\n\nThe Frequenz Microgrid API is an service for operating and monitoring electrical\ncomponents and sensors within a microgrid. It offers various functionalities\nrelated to microgrid management, including metadata retrieval, component\nlisting, setting power levels, and controlling the state of components. The API\nis structured around the concept of a microgrid, which is a localized energy\nsystem composed of various interconnected components and auxiliary sensors.\nMicrogrids are typically connected to the main grid, but can also operate\nindependently, in which case they are referred to as _islanded_ microgrids.\n\nThe API supports different _categories_ of electrical components and sensors.\nThe list of supported electrical component categories cam be found [here](https://github.com/frequenz-floss/frequenz-api-common/blob/v0.4.0/proto/frequenz/api/common/v1/components.proto#L13-L72).\nThe list of supported sensor categories cam be found [here](https://github.com/frequenz-floss/frequenz-api-common/blob/83e96a9cb3fd88db06c47d29be54da435fc648e3/proto/frequenz/api/common/v1/sensors.proto#L13-L38).\nNote that each of these categories could have their own _types_, e.g., inverters\ncould belong to the type \"battery\" or \"PV\". This information is stored in the\nmetadata of each component and sensor, and is exposed by the API.\n\nThe API streams data from the microgrid in real-time, allowing users to retrieve\nthe status and performance of components and sensors. It also allows users to\ncontrol the microgrid by setting power levels and controlling the state of\ncomponents.\n\n## Objective\n\nThe objective of this API is to provide a standardized interface for monitoring\nand controlling components and sensors within a microgrid. The API is designed\nto be vendor-agnostic, allowing users to interact with components from various\nvendors using the same API.\n\n### Key Features\n\n- **Metadata Retrieval:** The API allows users to retrieve metadata about the\n  microgrid, providing information about the microgrid's unique identifier (ID)\n  and geographical coordinates.\n\n- **Component Listing:** Users can list components in the microgrid, optionally\n  filtered by component IDs and categories.\n\n- **Component Graphs:** The API provides a way to list electrical connections\n  between components. Connections are represented as pairs of component IDs that\n  are directly connected. The connections can be visualized as a directed graph,\n  where the nodes are components, the edges are connections between components,\n  and the edge direction represents the direction of power flow in Passive Sign\n  Convention.\n\n- **Power Level Control:** Users can set the active and reactive power levels of\n  components that support it.\n\n- **Component State Control:** For components that support it, the API supports\n  starting, stopping, and transitioning components between these and the\n  standby states.\n\n- **Bounds Management:** Users can set exclusion and inclusion bounds for\n  specific metrics of a component. These bounds define the acceptable and\n  unacceptable ranges of metric values. E.g., one could set the inclusion bounds\n  for a battery's DC power to be between -100kW and 100 kW, and the exclusion\n  bounds to be between -50kW and 50kW. This would allow the battery to operate\n  between -100kW and 100kW, but would prevent it from operating between -50kW\n  and 50kW.\n\n### Example Use Cases:\n\nThis API is designed for use in microgrid management and control systems. It\ncan be applied in various scenarios, including:\n\n- **Microgrid Monitoring:** Monitoring the status and performance of components\n  in a microgrid, allowing operators to ensure efficient energy distribution.\n\n- **Optimizing Energy Storage:** Managing the charge and discharge power of\n  storage systems and generators, e.g., batteries, CHPs, etc., to optimize\n  energy storage and consumption within the microgrid.\n\n- **Flexibility Management:** Managing the flexibility of components in the\n  microgrid, e.g., by controlling the state and power draw of electrical\n  components, to ensure that the microgrid can respond to changes in energy\n  demand.\n\n- **Performance Enhancements:** Setting exclusion bounds for metrics to enhance\n  system performance and prevent extreme values in battery SoCs or power\n  output.\n\n### Target Audience:\n\nThis API is designed for application developers in the energy sector who focus\non the tasks of optimizing microgrid electricity flows. Its design aims to be as\ndeveloper-friendly as possible, requiring no prior knowledge of any specific\nhardware implementation.\n\n## Contributing\n\nIf you want to know how to build this project and contribute to it, please\ncheck out the [Contributing Guide](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrequenz-floss%2Ffrequenz-api-microgrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrequenz-floss%2Ffrequenz-api-microgrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrequenz-floss%2Ffrequenz-api-microgrid/lists"}