frequenz-client-microgrid 0.18.2__tar.gz → 0.18.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/PKG-INFO +27 -27
- frequenz_client_microgrid-0.18.3/RELEASE_NOTES.md +5 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/pyproject.toml +28 -27
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_lifetime.py +0 -1
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_location.py +0 -1
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_microgrid_info_proto.py +0 -1
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/__init__.py +2 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_category.py +3 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_component_proto.py +4 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_data_samples_proto.py +0 -1
- frequenz_client_microgrid-0.18.3/src/frequenz/client/microgrid/component/_steam_boiler.py +18 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_types.py +2 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/metrics/_bounds_proto.py +0 -1
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/metrics/_metric.py +0 -1
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz_client_microgrid.egg-info/PKG-INFO +27 -27
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz_client_microgrid.egg-info/SOURCES.txt +1 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz_client_microgrid.egg-info/requires.txt +25 -24
- frequenz_client_microgrid-0.18.2/RELEASE_NOTES.md +0 -177
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/LICENSE +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/MANIFEST.in +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/README.md +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/setup.cfg +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/__init__.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_client.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_delivery_area.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_delivery_area_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_exception.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_lifetime_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_location_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_microgrid_info.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/_util.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_battery.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_chp.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_component.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_connection.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_connection_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_converter.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_crypto_miner.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_data_samples.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_electrolyzer.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_ev_charger.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_grid_connection_point.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_hvac.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_inverter.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_meter.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_precharger.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_problematic.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_relay.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_state_sample.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_state_sample_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_voltage_transformer.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/component/_wind_turbine.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/conftest.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/metrics/__init__.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/metrics/_bounds.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/metrics/_sample.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/metrics/_sample_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/py.typed +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/sensor/__init__.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/sensor/_sensor.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/sensor/_sensor_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/sensor/_state.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/sensor/_state_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/sensor/_telemetry.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz/client/microgrid/sensor/_telemetry_proto.py +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz_client_microgrid.egg-info/dependency_links.txt +0 -0
- {frequenz_client_microgrid-0.18.2 → frequenz_client_microgrid-0.18.3}/src/frequenz_client_microgrid.egg-info/top_level.txt +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: frequenz-client-microgrid
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.3
|
|
4
4
|
Summary: Microgrid API client for Python
|
|
5
5
|
Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License-Expression: MIT
|
|
7
7
|
Project-URL: Documentation, https://frequenz-floss.github.io/frequenz-client-microgrid-python/
|
|
8
8
|
Project-URL: Changelog, https://github.com/frequenz-floss/frequenz-client-microgrid-python/releases
|
|
9
9
|
Project-URL: Issues, https://github.com/frequenz-floss/frequenz-client-microgrid-python/issues
|
|
@@ -12,7 +12,6 @@ Project-URL: Support, https://github.com/frequenz-floss/frequenz-client-microgri
|
|
|
12
12
|
Keywords: api,client,frequenz,grpc,lib,library,microgrid,python
|
|
13
13
|
Classifier: Development Status :: 3 - Alpha
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
|
17
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
17
|
Classifier: Topic :: Internet
|
|
@@ -21,53 +20,54 @@ Classifier: Typing :: Typed
|
|
|
21
20
|
Requires-Python: <4,>=3.11
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: frequenz-api-common<1.0.0,>=0.8.
|
|
25
|
-
Requires-Dist: frequenz-api-microgrid<
|
|
23
|
+
Requires-Dist: frequenz-api-common<1.0.0,>=0.8.2
|
|
24
|
+
Requires-Dist: frequenz-api-microgrid<1,>=0.18.0
|
|
26
25
|
Requires-Dist: frequenz-channels<2.0.0,>=1.6.1
|
|
27
26
|
Requires-Dist: frequenz-client-base<0.12.0,>=0.10.0
|
|
28
27
|
Requires-Dist: frequenz-client-common<0.4.0,>=0.3.6
|
|
29
28
|
Requires-Dist: frequenz-core<2.0.0,>=1.3.0
|
|
30
|
-
Requires-Dist: grpcio<2,>=1.
|
|
31
|
-
Requires-Dist: protobuf<
|
|
29
|
+
Requires-Dist: grpcio<2,>=1.80.0
|
|
30
|
+
Requires-Dist: protobuf<8,>=6.33.6
|
|
32
31
|
Requires-Dist: typing-extensions<5,>=4.13.0
|
|
33
32
|
Provides-Extra: dev-flake8
|
|
34
33
|
Requires-Dist: flake8==7.3.0; extra == "dev-flake8"
|
|
34
|
+
Requires-Dist: flake8-datetimez==20.10.0; extra == "dev-flake8"
|
|
35
35
|
Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
|
|
36
36
|
Requires-Dist: flake8-pyproject==1.2.4; extra == "dev-flake8"
|
|
37
37
|
Requires-Dist: pydoclint==0.8.3; extra == "dev-flake8"
|
|
38
38
|
Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
|
|
39
39
|
Provides-Extra: dev-formatting
|
|
40
|
-
Requires-Dist: black==
|
|
41
|
-
Requires-Dist: isort==
|
|
40
|
+
Requires-Dist: black==26.3.1; extra == "dev-formatting"
|
|
41
|
+
Requires-Dist: isort==8.0.1; extra == "dev-formatting"
|
|
42
42
|
Provides-Extra: dev-mkdocs
|
|
43
|
-
Requires-Dist: black==
|
|
44
|
-
Requires-Dist: Markdown==3.10; extra == "dev-mkdocs"
|
|
45
|
-
Requires-Dist: mike==2.1.
|
|
46
|
-
Requires-Dist: mkdocs-gen-files==0.6.
|
|
47
|
-
Requires-Dist: mkdocs-literate-nav==0.6.
|
|
43
|
+
Requires-Dist: black==26.3.1; extra == "dev-mkdocs"
|
|
44
|
+
Requires-Dist: Markdown==3.10.2; extra == "dev-mkdocs"
|
|
45
|
+
Requires-Dist: mike==2.1.4; extra == "dev-mkdocs"
|
|
46
|
+
Requires-Dist: mkdocs-gen-files==0.6.1; extra == "dev-mkdocs"
|
|
47
|
+
Requires-Dist: mkdocs-literate-nav==0.6.3; extra == "dev-mkdocs"
|
|
48
48
|
Requires-Dist: mkdocs-macros-plugin==1.5.0; extra == "dev-mkdocs"
|
|
49
|
-
Requires-Dist: mkdocs-material==9.7.
|
|
50
|
-
Requires-Dist: mkdocstrings[python]==1.0.
|
|
51
|
-
Requires-Dist: mkdocstrings-python==
|
|
52
|
-
Requires-Dist: frequenz-repo-config[lib]==0.
|
|
49
|
+
Requires-Dist: mkdocs-material==9.7.6; extra == "dev-mkdocs"
|
|
50
|
+
Requires-Dist: mkdocstrings[python]==1.0.3; extra == "dev-mkdocs"
|
|
51
|
+
Requires-Dist: mkdocstrings-python==2.0.3; extra == "dev-mkdocs"
|
|
52
|
+
Requires-Dist: frequenz-repo-config[lib]==0.16.0; extra == "dev-mkdocs"
|
|
53
53
|
Provides-Extra: dev-mypy
|
|
54
|
-
Requires-Dist: mypy==1.
|
|
54
|
+
Requires-Dist: mypy==1.20.0; extra == "dev-mypy"
|
|
55
55
|
Requires-Dist: grpc-stubs==1.53.0.6; extra == "dev-mypy"
|
|
56
|
-
Requires-Dist: types-Markdown==3.10.
|
|
57
|
-
Requires-Dist: types-protobuf==6.32.1.
|
|
56
|
+
Requires-Dist: types-Markdown==3.10.2.20260211; extra == "dev-mypy"
|
|
57
|
+
Requires-Dist: types-protobuf==6.32.1.20260221; extra == "dev-mypy"
|
|
58
58
|
Requires-Dist: frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
|
|
59
59
|
Provides-Extra: dev-noxfile
|
|
60
|
-
Requires-Dist: nox==
|
|
61
|
-
Requires-Dist: frequenz-repo-config[lib]==0.
|
|
60
|
+
Requires-Dist: nox==2026.2.9; extra == "dev-noxfile"
|
|
61
|
+
Requires-Dist: frequenz-repo-config[lib]==0.16.0; extra == "dev-noxfile"
|
|
62
62
|
Provides-Extra: dev-pylint
|
|
63
|
-
Requires-Dist: pylint==4.0.
|
|
63
|
+
Requires-Dist: pylint==4.0.5; extra == "dev-pylint"
|
|
64
64
|
Requires-Dist: frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
|
|
65
65
|
Provides-Extra: dev-pytest
|
|
66
|
-
Requires-Dist: pytest==9.0.
|
|
67
|
-
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.
|
|
66
|
+
Requires-Dist: pytest==9.0.3; extra == "dev-pytest"
|
|
67
|
+
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.16.0; extra == "dev-pytest"
|
|
68
68
|
Requires-Dist: pytest-mock==3.15.1; extra == "dev-pytest"
|
|
69
69
|
Requires-Dist: pytest-asyncio==1.3.0; extra == "dev-pytest"
|
|
70
|
-
Requires-Dist: async-solipsism==0.
|
|
70
|
+
Requires-Dist: async-solipsism==0.9; extra == "dev-pytest"
|
|
71
71
|
Provides-Extra: dev
|
|
72
72
|
Requires-Dist: frequenz-client-microgrid[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]; extra == "dev"
|
|
73
73
|
Dynamic: license-file
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
[build-system]
|
|
5
5
|
requires = [
|
|
6
|
-
"setuptools ==
|
|
7
|
-
"setuptools_scm[toml] ==
|
|
8
|
-
"frequenz-repo-config[lib] == 0.
|
|
6
|
+
"setuptools == 82.0.1",
|
|
7
|
+
"setuptools_scm[toml] == 10.0.5",
|
|
8
|
+
"frequenz-repo-config[lib] == 0.16.0",
|
|
9
9
|
]
|
|
10
10
|
build-backend = "setuptools.build_meta"
|
|
11
11
|
|
|
@@ -13,7 +13,8 @@ build-backend = "setuptools.build_meta"
|
|
|
13
13
|
name = "frequenz-client-microgrid"
|
|
14
14
|
description = "Microgrid API client for Python"
|
|
15
15
|
readme = "README.md"
|
|
16
|
-
license =
|
|
16
|
+
license = "MIT"
|
|
17
|
+
license-files = ["LICENSE"]
|
|
17
18
|
keywords = [
|
|
18
19
|
"api",
|
|
19
20
|
"client",
|
|
@@ -27,7 +28,6 @@ keywords = [
|
|
|
27
28
|
classifiers = [
|
|
28
29
|
"Development Status :: 3 - Alpha",
|
|
29
30
|
"Intended Audience :: Developers",
|
|
30
|
-
"License :: OSI Approved :: MIT License",
|
|
31
31
|
"Programming Language :: Python :: 3",
|
|
32
32
|
"Programming Language :: Python :: 3 :: Only",
|
|
33
33
|
"Topic :: Internet",
|
|
@@ -36,14 +36,14 @@ classifiers = [
|
|
|
36
36
|
]
|
|
37
37
|
requires-python = ">= 3.11, < 4"
|
|
38
38
|
dependencies = [
|
|
39
|
-
"frequenz-api-common >= 0.8.
|
|
40
|
-
"frequenz-api-microgrid >= 0.18.0, <
|
|
39
|
+
"frequenz-api-common >= 0.8.2, < 1.0.0",
|
|
40
|
+
"frequenz-api-microgrid >= 0.18.0, < 1",
|
|
41
41
|
"frequenz-channels >= 1.6.1, < 2.0.0",
|
|
42
42
|
"frequenz-client-base >= 0.10.0, < 0.12.0",
|
|
43
43
|
"frequenz-client-common >= 0.3.6, < 0.4.0",
|
|
44
44
|
"frequenz-core >= 1.3.0, < 2.0.0",
|
|
45
|
-
"grpcio >= 1.
|
|
46
|
-
"protobuf >= 6.
|
|
45
|
+
"grpcio >= 1.80.0, < 2",
|
|
46
|
+
"protobuf >= 6.33.6, < 8",
|
|
47
47
|
"typing-extensions >= 4.13.0, < 5",
|
|
48
48
|
]
|
|
49
49
|
dynamic = ["version"]
|
|
@@ -55,44 +55,45 @@ email = "floss@frequenz.com"
|
|
|
55
55
|
[project.optional-dependencies]
|
|
56
56
|
dev-flake8 = [
|
|
57
57
|
"flake8 == 7.3.0",
|
|
58
|
+
"flake8-datetimez == 20.10.0",
|
|
58
59
|
"flake8-docstrings == 1.7.0",
|
|
59
60
|
"flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
|
|
60
61
|
"pydoclint == 0.8.3",
|
|
61
62
|
"pydocstyle == 6.3.0",
|
|
62
63
|
]
|
|
63
|
-
dev-formatting = ["black ==
|
|
64
|
+
dev-formatting = ["black == 26.3.1", "isort == 8.0.1"]
|
|
64
65
|
dev-mkdocs = [
|
|
65
|
-
"black ==
|
|
66
|
-
"Markdown==3.10",
|
|
67
|
-
"mike == 2.1.
|
|
68
|
-
"mkdocs-gen-files == 0.6.
|
|
69
|
-
"mkdocs-literate-nav == 0.6.
|
|
66
|
+
"black == 26.3.1",
|
|
67
|
+
"Markdown==3.10.2",
|
|
68
|
+
"mike == 2.1.4",
|
|
69
|
+
"mkdocs-gen-files == 0.6.1",
|
|
70
|
+
"mkdocs-literate-nav == 0.6.3",
|
|
70
71
|
"mkdocs-macros-plugin == 1.5.0",
|
|
71
|
-
"mkdocs-material == 9.7.
|
|
72
|
-
"mkdocstrings[python] == 1.0.
|
|
73
|
-
"mkdocstrings-python ==
|
|
74
|
-
"frequenz-repo-config[lib] == 0.
|
|
72
|
+
"mkdocs-material == 9.7.6",
|
|
73
|
+
"mkdocstrings[python] == 1.0.3",
|
|
74
|
+
"mkdocstrings-python == 2.0.3",
|
|
75
|
+
"frequenz-repo-config[lib] == 0.16.0",
|
|
75
76
|
]
|
|
76
77
|
dev-mypy = [
|
|
77
|
-
"mypy == 1.
|
|
78
|
+
"mypy == 1.20.0",
|
|
78
79
|
"grpc-stubs == 1.53.0.6",
|
|
79
|
-
"types-Markdown == 3.10.
|
|
80
|
-
"types-protobuf == 6.32.1.
|
|
80
|
+
"types-Markdown == 3.10.2.20260211",
|
|
81
|
+
"types-protobuf == 6.32.1.20260221",
|
|
81
82
|
# For checking the noxfile, docs/ script, and tests
|
|
82
83
|
"frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]",
|
|
83
84
|
]
|
|
84
|
-
dev-noxfile = ["nox ==
|
|
85
|
+
dev-noxfile = ["nox == 2026.2.9", "frequenz-repo-config[lib] == 0.16.0"]
|
|
85
86
|
dev-pylint = [
|
|
86
|
-
"pylint == 4.0.
|
|
87
|
+
"pylint == 4.0.5",
|
|
87
88
|
# For checking the noxfile, docs/ script, and tests
|
|
88
89
|
"frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]",
|
|
89
90
|
]
|
|
90
91
|
dev-pytest = [
|
|
91
|
-
"pytest == 9.0.
|
|
92
|
-
"frequenz-repo-config[extra-lint-examples] == 0.
|
|
92
|
+
"pytest == 9.0.3",
|
|
93
|
+
"frequenz-repo-config[extra-lint-examples] == 0.16.0",
|
|
93
94
|
"pytest-mock == 3.15.1",
|
|
94
95
|
"pytest-asyncio == 1.3.0",
|
|
95
|
-
"async-solipsism == 0.
|
|
96
|
+
"async-solipsism == 0.9",
|
|
96
97
|
]
|
|
97
98
|
dev = [
|
|
98
99
|
"frequenz-client-microgrid[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
|
|
@@ -51,6 +51,7 @@ from ._problematic import (
|
|
|
51
51
|
)
|
|
52
52
|
from ._relay import Relay
|
|
53
53
|
from ._state_sample import ComponentErrorCode, ComponentStateCode, ComponentStateSample
|
|
54
|
+
from ._steam_boiler import SteamBoiler
|
|
54
55
|
from ._types import (
|
|
55
56
|
ComponentTypes,
|
|
56
57
|
ProblematicComponentTypes,
|
|
@@ -97,6 +98,7 @@ __all__ = [
|
|
|
97
98
|
"ProblematicComponentTypes",
|
|
98
99
|
"Relay",
|
|
99
100
|
"SolarInverter",
|
|
101
|
+
"SteamBoiler",
|
|
100
102
|
"UnrecognizedBattery",
|
|
101
103
|
"UnrecognizedComponent",
|
|
102
104
|
"UnrecognizedComponentTypes",
|
|
@@ -107,3 +107,6 @@ class ComponentCategory(enum.Enum):
|
|
|
107
107
|
|
|
108
108
|
WIND_TURBINE = electrical_components_pb2.ELECTRICAL_COMPONENT_CATEGORY_WIND_TURBINE
|
|
109
109
|
"""A wind turbine."""
|
|
110
|
+
|
|
111
|
+
STEAM_BOILER = electrical_components_pb2.ELECTRICAL_COMPONENT_CATEGORY_STEAM_BOILER
|
|
112
|
+
"""A steam boiler."""
|
|
@@ -58,6 +58,7 @@ from ._problematic import (
|
|
|
58
58
|
UnspecifiedComponent,
|
|
59
59
|
)
|
|
60
60
|
from ._relay import Relay
|
|
61
|
+
from ._steam_boiler import SteamBoiler
|
|
61
62
|
from ._types import ComponentTypes
|
|
62
63
|
from ._voltage_transformer import VoltageTransformer
|
|
63
64
|
from ._wind_turbine import WindTurbine
|
|
@@ -256,6 +257,7 @@ def component_from_proto_with_issues(
|
|
|
256
257
|
| ComponentCategory.METER
|
|
257
258
|
| ComponentCategory.PRECHARGER
|
|
258
259
|
| ComponentCategory.RELAY
|
|
260
|
+
| ComponentCategory.STEAM_BOILER
|
|
259
261
|
| ComponentCategory.WIND_TURBINE
|
|
260
262
|
):
|
|
261
263
|
return _trivial_category_to_class(base_data.category)(
|
|
@@ -451,6 +453,7 @@ def _trivial_category_to_class(
|
|
|
451
453
|
| Meter
|
|
452
454
|
| Precharger
|
|
453
455
|
| Relay
|
|
456
|
+
| SteamBoiler
|
|
454
457
|
| WindTurbine
|
|
455
458
|
]:
|
|
456
459
|
"""Return the class corresponding to a trivial component category."""
|
|
@@ -464,6 +467,7 @@ def _trivial_category_to_class(
|
|
|
464
467
|
ComponentCategory.METER: Meter,
|
|
465
468
|
ComponentCategory.PRECHARGER: Precharger,
|
|
466
469
|
ComponentCategory.RELAY: Relay,
|
|
470
|
+
ComponentCategory.STEAM_BOILER: SteamBoiler,
|
|
467
471
|
ComponentCategory.WIND_TURBINE: WindTurbine,
|
|
468
472
|
}[category]
|
|
469
473
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# License: MIT
|
|
2
|
+
# Copyright © 2026 Frequenz Energy-as-a-Service GmbH
|
|
3
|
+
|
|
4
|
+
"""Steam boiler component."""
|
|
5
|
+
|
|
6
|
+
import dataclasses
|
|
7
|
+
from typing import Literal
|
|
8
|
+
|
|
9
|
+
from ._category import ComponentCategory
|
|
10
|
+
from ._component import Component
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclasses.dataclass(frozen=True, kw_only=True)
|
|
14
|
+
class SteamBoiler(Component):
|
|
15
|
+
"""A steam boiler component."""
|
|
16
|
+
|
|
17
|
+
category: Literal[ComponentCategory.STEAM_BOILER] = ComponentCategory.STEAM_BOILER
|
|
18
|
+
"""The category of this component."""
|
|
@@ -22,6 +22,7 @@ from ._problematic import (
|
|
|
22
22
|
UnspecifiedComponent,
|
|
23
23
|
)
|
|
24
24
|
from ._relay import Relay
|
|
25
|
+
from ._steam_boiler import SteamBoiler
|
|
25
26
|
from ._voltage_transformer import VoltageTransformer
|
|
26
27
|
from ._wind_turbine import WindTurbine
|
|
27
28
|
|
|
@@ -59,6 +60,7 @@ ComponentTypes: TypeAlias = (
|
|
|
59
60
|
| Precharger
|
|
60
61
|
| ProblematicComponentTypes
|
|
61
62
|
| Relay
|
|
63
|
+
| SteamBoiler
|
|
62
64
|
| VoltageTransformer
|
|
63
65
|
| WindTurbine
|
|
64
66
|
)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: frequenz-client-microgrid
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.3
|
|
4
4
|
Summary: Microgrid API client for Python
|
|
5
5
|
Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License-Expression: MIT
|
|
7
7
|
Project-URL: Documentation, https://frequenz-floss.github.io/frequenz-client-microgrid-python/
|
|
8
8
|
Project-URL: Changelog, https://github.com/frequenz-floss/frequenz-client-microgrid-python/releases
|
|
9
9
|
Project-URL: Issues, https://github.com/frequenz-floss/frequenz-client-microgrid-python/issues
|
|
@@ -12,7 +12,6 @@ Project-URL: Support, https://github.com/frequenz-floss/frequenz-client-microgri
|
|
|
12
12
|
Keywords: api,client,frequenz,grpc,lib,library,microgrid,python
|
|
13
13
|
Classifier: Development Status :: 3 - Alpha
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
|
17
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
17
|
Classifier: Topic :: Internet
|
|
@@ -21,53 +20,54 @@ Classifier: Typing :: Typed
|
|
|
21
20
|
Requires-Python: <4,>=3.11
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: frequenz-api-common<1.0.0,>=0.8.
|
|
25
|
-
Requires-Dist: frequenz-api-microgrid<
|
|
23
|
+
Requires-Dist: frequenz-api-common<1.0.0,>=0.8.2
|
|
24
|
+
Requires-Dist: frequenz-api-microgrid<1,>=0.18.0
|
|
26
25
|
Requires-Dist: frequenz-channels<2.0.0,>=1.6.1
|
|
27
26
|
Requires-Dist: frequenz-client-base<0.12.0,>=0.10.0
|
|
28
27
|
Requires-Dist: frequenz-client-common<0.4.0,>=0.3.6
|
|
29
28
|
Requires-Dist: frequenz-core<2.0.0,>=1.3.0
|
|
30
|
-
Requires-Dist: grpcio<2,>=1.
|
|
31
|
-
Requires-Dist: protobuf<
|
|
29
|
+
Requires-Dist: grpcio<2,>=1.80.0
|
|
30
|
+
Requires-Dist: protobuf<8,>=6.33.6
|
|
32
31
|
Requires-Dist: typing-extensions<5,>=4.13.0
|
|
33
32
|
Provides-Extra: dev-flake8
|
|
34
33
|
Requires-Dist: flake8==7.3.0; extra == "dev-flake8"
|
|
34
|
+
Requires-Dist: flake8-datetimez==20.10.0; extra == "dev-flake8"
|
|
35
35
|
Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
|
|
36
36
|
Requires-Dist: flake8-pyproject==1.2.4; extra == "dev-flake8"
|
|
37
37
|
Requires-Dist: pydoclint==0.8.3; extra == "dev-flake8"
|
|
38
38
|
Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
|
|
39
39
|
Provides-Extra: dev-formatting
|
|
40
|
-
Requires-Dist: black==
|
|
41
|
-
Requires-Dist: isort==
|
|
40
|
+
Requires-Dist: black==26.3.1; extra == "dev-formatting"
|
|
41
|
+
Requires-Dist: isort==8.0.1; extra == "dev-formatting"
|
|
42
42
|
Provides-Extra: dev-mkdocs
|
|
43
|
-
Requires-Dist: black==
|
|
44
|
-
Requires-Dist: Markdown==3.10; extra == "dev-mkdocs"
|
|
45
|
-
Requires-Dist: mike==2.1.
|
|
46
|
-
Requires-Dist: mkdocs-gen-files==0.6.
|
|
47
|
-
Requires-Dist: mkdocs-literate-nav==0.6.
|
|
43
|
+
Requires-Dist: black==26.3.1; extra == "dev-mkdocs"
|
|
44
|
+
Requires-Dist: Markdown==3.10.2; extra == "dev-mkdocs"
|
|
45
|
+
Requires-Dist: mike==2.1.4; extra == "dev-mkdocs"
|
|
46
|
+
Requires-Dist: mkdocs-gen-files==0.6.1; extra == "dev-mkdocs"
|
|
47
|
+
Requires-Dist: mkdocs-literate-nav==0.6.3; extra == "dev-mkdocs"
|
|
48
48
|
Requires-Dist: mkdocs-macros-plugin==1.5.0; extra == "dev-mkdocs"
|
|
49
|
-
Requires-Dist: mkdocs-material==9.7.
|
|
50
|
-
Requires-Dist: mkdocstrings[python]==1.0.
|
|
51
|
-
Requires-Dist: mkdocstrings-python==
|
|
52
|
-
Requires-Dist: frequenz-repo-config[lib]==0.
|
|
49
|
+
Requires-Dist: mkdocs-material==9.7.6; extra == "dev-mkdocs"
|
|
50
|
+
Requires-Dist: mkdocstrings[python]==1.0.3; extra == "dev-mkdocs"
|
|
51
|
+
Requires-Dist: mkdocstrings-python==2.0.3; extra == "dev-mkdocs"
|
|
52
|
+
Requires-Dist: frequenz-repo-config[lib]==0.16.0; extra == "dev-mkdocs"
|
|
53
53
|
Provides-Extra: dev-mypy
|
|
54
|
-
Requires-Dist: mypy==1.
|
|
54
|
+
Requires-Dist: mypy==1.20.0; extra == "dev-mypy"
|
|
55
55
|
Requires-Dist: grpc-stubs==1.53.0.6; extra == "dev-mypy"
|
|
56
|
-
Requires-Dist: types-Markdown==3.10.
|
|
57
|
-
Requires-Dist: types-protobuf==6.32.1.
|
|
56
|
+
Requires-Dist: types-Markdown==3.10.2.20260211; extra == "dev-mypy"
|
|
57
|
+
Requires-Dist: types-protobuf==6.32.1.20260221; extra == "dev-mypy"
|
|
58
58
|
Requires-Dist: frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
|
|
59
59
|
Provides-Extra: dev-noxfile
|
|
60
|
-
Requires-Dist: nox==
|
|
61
|
-
Requires-Dist: frequenz-repo-config[lib]==0.
|
|
60
|
+
Requires-Dist: nox==2026.2.9; extra == "dev-noxfile"
|
|
61
|
+
Requires-Dist: frequenz-repo-config[lib]==0.16.0; extra == "dev-noxfile"
|
|
62
62
|
Provides-Extra: dev-pylint
|
|
63
|
-
Requires-Dist: pylint==4.0.
|
|
63
|
+
Requires-Dist: pylint==4.0.5; extra == "dev-pylint"
|
|
64
64
|
Requires-Dist: frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
|
|
65
65
|
Provides-Extra: dev-pytest
|
|
66
|
-
Requires-Dist: pytest==9.0.
|
|
67
|
-
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.
|
|
66
|
+
Requires-Dist: pytest==9.0.3; extra == "dev-pytest"
|
|
67
|
+
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.16.0; extra == "dev-pytest"
|
|
68
68
|
Requires-Dist: pytest-mock==3.15.1; extra == "dev-pytest"
|
|
69
69
|
Requires-Dist: pytest-asyncio==1.3.0; extra == "dev-pytest"
|
|
70
|
-
Requires-Dist: async-solipsism==0.
|
|
70
|
+
Requires-Dist: async-solipsism==0.9; extra == "dev-pytest"
|
|
71
71
|
Provides-Extra: dev
|
|
72
72
|
Requires-Dist: frequenz-client-microgrid[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]; extra == "dev"
|
|
73
73
|
Dynamic: license-file
|
|
@@ -40,6 +40,7 @@ src/frequenz/client/microgrid/component/_problematic.py
|
|
|
40
40
|
src/frequenz/client/microgrid/component/_relay.py
|
|
41
41
|
src/frequenz/client/microgrid/component/_state_sample.py
|
|
42
42
|
src/frequenz/client/microgrid/component/_state_sample_proto.py
|
|
43
|
+
src/frequenz/client/microgrid/component/_steam_boiler.py
|
|
43
44
|
src/frequenz/client/microgrid/component/_types.py
|
|
44
45
|
src/frequenz/client/microgrid/component/_voltage_transformer.py
|
|
45
46
|
src/frequenz/client/microgrid/component/_wind_turbine.py
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
frequenz-api-common<1.0.0,>=0.8.
|
|
2
|
-
frequenz-api-microgrid<
|
|
1
|
+
frequenz-api-common<1.0.0,>=0.8.2
|
|
2
|
+
frequenz-api-microgrid<1,>=0.18.0
|
|
3
3
|
frequenz-channels<2.0.0,>=1.6.1
|
|
4
4
|
frequenz-client-base<0.12.0,>=0.10.0
|
|
5
5
|
frequenz-client-common<0.4.0,>=0.3.6
|
|
6
6
|
frequenz-core<2.0.0,>=1.3.0
|
|
7
|
-
grpcio<2,>=1.
|
|
8
|
-
protobuf<
|
|
7
|
+
grpcio<2,>=1.80.0
|
|
8
|
+
protobuf<8,>=6.33.6
|
|
9
9
|
typing-extensions<5,>=4.13.0
|
|
10
10
|
|
|
11
11
|
[dev]
|
|
@@ -13,45 +13,46 @@ frequenz-client-microgrid[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxf
|
|
|
13
13
|
|
|
14
14
|
[dev-flake8]
|
|
15
15
|
flake8==7.3.0
|
|
16
|
+
flake8-datetimez==20.10.0
|
|
16
17
|
flake8-docstrings==1.7.0
|
|
17
18
|
flake8-pyproject==1.2.4
|
|
18
19
|
pydoclint==0.8.3
|
|
19
20
|
pydocstyle==6.3.0
|
|
20
21
|
|
|
21
22
|
[dev-formatting]
|
|
22
|
-
black==
|
|
23
|
-
isort==
|
|
23
|
+
black==26.3.1
|
|
24
|
+
isort==8.0.1
|
|
24
25
|
|
|
25
26
|
[dev-mkdocs]
|
|
26
|
-
black==
|
|
27
|
-
Markdown==3.10
|
|
28
|
-
mike==2.1.
|
|
29
|
-
mkdocs-gen-files==0.6.
|
|
30
|
-
mkdocs-literate-nav==0.6.
|
|
27
|
+
black==26.3.1
|
|
28
|
+
Markdown==3.10.2
|
|
29
|
+
mike==2.1.4
|
|
30
|
+
mkdocs-gen-files==0.6.1
|
|
31
|
+
mkdocs-literate-nav==0.6.3
|
|
31
32
|
mkdocs-macros-plugin==1.5.0
|
|
32
|
-
mkdocs-material==9.7.
|
|
33
|
-
mkdocstrings[python]==1.0.
|
|
34
|
-
mkdocstrings-python==
|
|
35
|
-
frequenz-repo-config[lib]==0.
|
|
33
|
+
mkdocs-material==9.7.6
|
|
34
|
+
mkdocstrings[python]==1.0.3
|
|
35
|
+
mkdocstrings-python==2.0.3
|
|
36
|
+
frequenz-repo-config[lib]==0.16.0
|
|
36
37
|
|
|
37
38
|
[dev-mypy]
|
|
38
|
-
mypy==1.
|
|
39
|
+
mypy==1.20.0
|
|
39
40
|
grpc-stubs==1.53.0.6
|
|
40
|
-
types-Markdown==3.10.
|
|
41
|
-
types-protobuf==6.32.1.
|
|
41
|
+
types-Markdown==3.10.2.20260211
|
|
42
|
+
types-protobuf==6.32.1.20260221
|
|
42
43
|
frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]
|
|
43
44
|
|
|
44
45
|
[dev-noxfile]
|
|
45
|
-
nox==
|
|
46
|
-
frequenz-repo-config[lib]==0.
|
|
46
|
+
nox==2026.2.9
|
|
47
|
+
frequenz-repo-config[lib]==0.16.0
|
|
47
48
|
|
|
48
49
|
[dev-pylint]
|
|
49
|
-
pylint==4.0.
|
|
50
|
+
pylint==4.0.5
|
|
50
51
|
frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]
|
|
51
52
|
|
|
52
53
|
[dev-pytest]
|
|
53
|
-
pytest==9.0.
|
|
54
|
-
frequenz-repo-config[extra-lint-examples]==0.
|
|
54
|
+
pytest==9.0.3
|
|
55
|
+
frequenz-repo-config[extra-lint-examples]==0.16.0
|
|
55
56
|
pytest-mock==3.15.1
|
|
56
57
|
pytest-asyncio==1.3.0
|
|
57
|
-
async-solipsism==0.
|
|
58
|
+
async-solipsism==0.9
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# Frequenz Microgrid API Client Release Notes
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
This release reintroduces sensor support that was temporarily removed in the v0.18.0 release. The new sensor API has been redesigned to fit the updated component and metrics model introduced in v0.18.0.
|
|
6
|
-
|
|
7
|
-
## New Features
|
|
8
|
-
|
|
9
|
-
- New `sensor` module (`frequenz.client.microgrid.sensor`) with sensor related types.
|
|
10
|
-
- New `MicrogridApiClient` methods
|
|
11
|
-
|
|
12
|
-
* `list_sensors()`: fetch sensor metadata.
|
|
13
|
-
* `receive_sensor_telemetry_stream()`: stream sensor telemetry data.
|
|
14
|
-
|
|
15
|
-
Example:
|
|
16
|
-
|
|
17
|
-
```python
|
|
18
|
-
import asyncio
|
|
19
|
-
from frequenz.client.microgrid import MicrogridApiClient
|
|
20
|
-
from frequenz.client.microgrid.metrics import Metric
|
|
21
|
-
|
|
22
|
-
URL = "grpc://[::1]:62060"
|
|
23
|
-
|
|
24
|
-
async def main() -> None:
|
|
25
|
-
print(f"Connecting to {URL}...")
|
|
26
|
-
async with MicrogridApiClient(URL) as client:
|
|
27
|
-
print("Listing available sensors...")
|
|
28
|
-
sensors = list(await client.list_sensors())
|
|
29
|
-
|
|
30
|
-
if not sensors:
|
|
31
|
-
print("No sensors found.")
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
print(f"Found {len(sensors)}: {sensors}.")
|
|
35
|
-
print()
|
|
36
|
-
|
|
37
|
-
sensor = sensors[0]
|
|
38
|
-
print(f"Streaming telemetry from sensor {sensor.id} ({sensor.name})...")
|
|
39
|
-
telemetry_stream = client.receive_sensor_telemetry_stream(
|
|
40
|
-
sensors[0].id, list(Metric)
|
|
41
|
-
)
|
|
42
|
-
async for telemetry in telemetry_stream:
|
|
43
|
-
print(f"\tReceived: {telemetry}")
|
|
44
|
-
|
|
45
|
-
asyncio.run(main())
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Upgrading (from v0.9)
|
|
49
|
-
|
|
50
|
-
### Sensor support restored with new API
|
|
51
|
-
|
|
52
|
-
Sensor support that was removed in v0.18.0 is now back, but with a redesigned API that aligns with the v0.18.0 component and metrics model.
|
|
53
|
-
|
|
54
|
-
#### `list_sensors()`
|
|
55
|
-
|
|
56
|
-
The method name remains the same, but the signature and return type have changed:
|
|
57
|
-
|
|
58
|
-
```python
|
|
59
|
-
# Old v0.9.1 API
|
|
60
|
-
sensors: Iterable[Sensor] = await client.list_sensors()
|
|
61
|
-
|
|
62
|
-
# New v0.18.2 API (same method name, different types)
|
|
63
|
-
from frequenz.client.common.microgrid.sensors import SensorId
|
|
64
|
-
from frequenz.client.microgrid.sensor import Sensor
|
|
65
|
-
|
|
66
|
-
sensors: Iterable[Sensor] = await client.list_sensors()
|
|
67
|
-
|
|
68
|
-
# You can also filter by sensor IDs
|
|
69
|
-
sensors = await client.list_sensors(sensors=[SensorId(1), SensorId(2)])
|
|
70
|
-
```
|
|
71
|
-
The `Sensor` class now provides a new attribute `microgrid_id: MicrogridId` and the `identity` property now returns a tuple `(SensorId, MicrogridId)` instead of just `SensorId`.
|
|
72
|
-
|
|
73
|
-
#### `stream_sensor_data()` → `receive_sensor_telemetry_stream()`
|
|
74
|
-
|
|
75
|
-
The streaming method has been renamed and its return type changed:
|
|
76
|
-
|
|
77
|
-
```python
|
|
78
|
-
# Old v0.9.1 API
|
|
79
|
-
from frequenz.client.microgrid.sensor import SensorDataSamples, SensorMetric
|
|
80
|
-
|
|
81
|
-
receiver: Receiver[SensorDataSamples] = client.stream_sensor_data(
|
|
82
|
-
sensor=SensorId(1),
|
|
83
|
-
metrics=[SensorMetric.TEMPERATURE, SensorMetric.HUMIDITY], # optional
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
async for samples in receiver:
|
|
87
|
-
# samples.metric_samples, samples.state_sample, etc.
|
|
88
|
-
...
|
|
89
|
-
|
|
90
|
-
# New v0.18.2 API
|
|
91
|
-
from frequenz.client.microgrid.sensor import SensorTelemetry
|
|
92
|
-
from frequenz.client.microgrid.metrics import Metric
|
|
93
|
-
|
|
94
|
-
receiver: Receiver[SensorTelemetry] = client.receive_sensor_telemetry_stream(
|
|
95
|
-
sensor=SensorId(1),
|
|
96
|
-
metrics=[Metric.TEMPERATURE, Metric.AC_VOLTAGE], # required
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
async for telemetry in receiver:
|
|
100
|
-
# telemetry.sensor_id: SensorId
|
|
101
|
-
# telemetry.metric_samples: Sequence[MetricSample]
|
|
102
|
-
# telemetry.state_snapshots: Sequence[SensorStateSnapshot]
|
|
103
|
-
for sample in telemetry.metric_samples:
|
|
104
|
-
print(f"{sample.metric}: {sample.value} at {sample.sampled_at}")
|
|
105
|
-
...
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Key differences:
|
|
109
|
-
|
|
110
|
-
- **Method renamed**: `stream_sensor_data()` → `receive_sensor_telemetry_stream()`
|
|
111
|
-
- **Metrics parameter is now required**: You must specify which metrics to stream. The old API allowed `None` to stream all metrics.
|
|
112
|
-
- **Uses unified `Metric` enum**: The old `SensorMetric` enum is removed. Use `frequenz.client.microgrid.metrics.Metric` instead.
|
|
113
|
-
- **Return type changed**: `SensorDataSamples` → `SensorTelemetry`
|
|
114
|
-
- **State samples changed**: `SensorStateSample` → `SensorStateSnapshot` with different structure (see below)
|
|
115
|
-
|
|
116
|
-
#### Sensor state types
|
|
117
|
-
|
|
118
|
-
The sensor state types have been redesigned:
|
|
119
|
-
|
|
120
|
-
| Old v0.9.1 type | New v0.18.2 type |
|
|
121
|
-
|---------------------------|-------------------------------------------|
|
|
122
|
-
| `SensorMetric` | *Removed* — use `Metric` |
|
|
123
|
-
| `SensorStateCode` | `SensorStateCode` (different values) |
|
|
124
|
-
| `SensorErrorCode` | `SensorDiagnosticCode` |
|
|
125
|
-
| `SensorStateSample` | `SensorStateSnapshot` |
|
|
126
|
-
| `SensorMetricSample` | `MetricSample` |
|
|
127
|
-
| `SensorDataSamples` | `SensorTelemetry` |
|
|
128
|
-
|
|
129
|
-
The new `SensorStateSnapshot` structure:
|
|
130
|
-
|
|
131
|
-
```python
|
|
132
|
-
@dataclass(frozen=True, kw_only=True)
|
|
133
|
-
class SensorStateSnapshot:
|
|
134
|
-
origin_time: datetime # was `sampled_at`
|
|
135
|
-
states: Set[SensorStateCode | int] # was `frozenset`
|
|
136
|
-
warnings: Sequence[SensorDiagnostic] # new
|
|
137
|
-
errors: Sequence[SensorDiagnostic] # replaces error codes
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
The new `SensorDiagnostic` provides richer error/warning information:
|
|
141
|
-
|
|
142
|
-
```python
|
|
143
|
-
@dataclass(frozen=True, kw_only=True)
|
|
144
|
-
class SensorDiagnostic:
|
|
145
|
-
diagnostic_code: SensorDiagnosticCode | int
|
|
146
|
-
message: str | None
|
|
147
|
-
vendor_diagnostic_code: str | None
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
#### Import changes
|
|
151
|
-
|
|
152
|
-
Update your imports for sensor types:
|
|
153
|
-
|
|
154
|
-
```python
|
|
155
|
-
# Old v0.9.1
|
|
156
|
-
from frequenz.client.microgrid.sensor import (
|
|
157
|
-
Sensor,
|
|
158
|
-
SensorDataSamples,
|
|
159
|
-
SensorErrorCode,
|
|
160
|
-
SensorMetric,
|
|
161
|
-
SensorMetricSample,
|
|
162
|
-
SensorStateCode,
|
|
163
|
-
SensorStateSample,
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
# New v0.18.2
|
|
167
|
-
from frequenz.client.microgrid.sensor import (
|
|
168
|
-
Sensor,
|
|
169
|
-
SensorDiagnostic,
|
|
170
|
-
SensorDiagnosticCode,
|
|
171
|
-
SensorStateCode,
|
|
172
|
-
SensorStateSnapshot,
|
|
173
|
-
SensorTelemetry,
|
|
174
|
-
)
|
|
175
|
-
from frequenz.client.microgrid.metrics import Metric, MetricSample
|
|
176
|
-
from frequenz.client.common.microgrid.sensors import SensorId
|
|
177
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|