pycomap 2.2.0__tar.gz → 2.3.1__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.
- {pycomap-2.2.0 → pycomap-2.3.1}/PKG-INFO +7 -7
- {pycomap-2.2.0 → pycomap-2.3.1}/README.md +1 -1
- {pycomap-2.2.0 → pycomap-2.3.1}/pyproject.toml +6 -6
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/client.py +17 -5
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/__init__.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/alarms.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/configuration.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/controller.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/datatypes.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/discovery.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/exceptions.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/history.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/__init__.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/commands.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/crc.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/crypto.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/framing.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/objects.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/protocol/transport.py +0 -0
- {pycomap-2.2.0 → pycomap-2.3.1}/src/pycomap/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pycomap
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: Async Python client for ComAp controllers: LAN discovery and the native ECDH/AES-encrypted control protocol
|
|
5
5
|
Author: Igor Panteleyev
|
|
6
6
|
Author-email: Igor Panteleyev <panteleev.igor69@gmail.com>
|
|
@@ -18,11 +18,11 @@ Classifier: Typing :: Typed
|
|
|
18
18
|
Requires-Dist: cryptography>=42
|
|
19
19
|
Requires-Dist: pytz>=2026.2
|
|
20
20
|
Requires-Python: >=3.14
|
|
21
|
-
Project-URL: Homepage, https://github.com/
|
|
22
|
-
Project-URL: Documentation, https://
|
|
23
|
-
Project-URL: Source, https://github.com/
|
|
24
|
-
Project-URL: Issues, https://github.com/
|
|
25
|
-
Project-URL: Changelog, https://github.com/
|
|
21
|
+
Project-URL: Homepage, https://github.com/dobters/pycomap
|
|
22
|
+
Project-URL: Documentation, https://dobters.github.io/pycomap/
|
|
23
|
+
Project-URL: Source, https://github.com/dobters/pycomap
|
|
24
|
+
Project-URL: Issues, https://github.com/dobters/pycomap/issues
|
|
25
|
+
Project-URL: Changelog, https://github.com/dobters/pycomap/releases
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
|
|
28
28
|
# pycomap
|
|
@@ -50,7 +50,7 @@ async with Controller(
|
|
|
50
50
|
await ctrl.set_setpoint("Summer Time Mode", "Winter") # STRING_LIST by label
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
See the [API docs](https://
|
|
53
|
+
See the [API docs](https://dobters.github.io/pycomap/) for full reference, built with [Zensical](https://zensical.org/). `just docs-serve` to browse locally.
|
|
54
54
|
|
|
55
55
|
## Development
|
|
56
56
|
|
|
@@ -23,7 +23,7 @@ async with Controller(
|
|
|
23
23
|
await ctrl.set_setpoint("Summer Time Mode", "Winter") # STRING_LIST by label
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
See the [API docs](https://
|
|
26
|
+
See the [API docs](https://dobters.github.io/pycomap/) for full reference, built with [Zensical](https://zensical.org/). `just docs-serve` to browse locally.
|
|
27
27
|
|
|
28
28
|
## Development
|
|
29
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pycomap"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.3.1"
|
|
4
4
|
description = "Async Python client for ComAp controllers: LAN discovery and the native ECDH/AES-encrypted control protocol"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -26,11 +26,11 @@ classifiers = [
|
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.urls]
|
|
29
|
-
Homepage = "https://github.com/
|
|
30
|
-
Documentation = "https://
|
|
31
|
-
Source = "https://github.com/
|
|
32
|
-
Issues = "https://github.com/
|
|
33
|
-
Changelog = "https://github.com/
|
|
29
|
+
Homepage = "https://github.com/dobters/pycomap"
|
|
30
|
+
Documentation = "https://dobters.github.io/pycomap/"
|
|
31
|
+
Source = "https://github.com/dobters/pycomap"
|
|
32
|
+
Issues = "https://github.com/dobters/pycomap/issues"
|
|
33
|
+
Changelog = "https://github.com/dobters/pycomap/releases"
|
|
34
34
|
|
|
35
35
|
[build-system]
|
|
36
36
|
requires = ["uv_build>=0.9.26,<0.12.0"]
|
|
@@ -82,12 +82,20 @@ class ComApClient[TransportT: Transport]:
|
|
|
82
82
|
await client.authenticate("0")
|
|
83
83
|
"""
|
|
84
84
|
|
|
85
|
-
def __init__(self, transport: TransportT) -> None:
|
|
85
|
+
def __init__(self, transport: TransportT, addr: int = 1) -> None:
|
|
86
86
|
"""
|
|
87
87
|
Args:
|
|
88
88
|
transport: Byte-stream transport to use (typically ``EthernetTransport``).
|
|
89
|
+
addr: Default controller unit address (``ControllerAddress`` setpoint, C.O.
|
|
90
|
+
24537; range 1-32, factory default ``1``) used for every ``read_object``/
|
|
91
|
+
``write_object`` call that doesn't override it explicitly. Only matters if
|
|
92
|
+
the target controller's ``ControllerAddress`` has been changed from the
|
|
93
|
+
default -- e.g. multiple units addressed through one gateway/party-line,
|
|
94
|
+
the same address you'd set in InteliMonitor/InteliConfig's connection
|
|
95
|
+
dialog.
|
|
89
96
|
"""
|
|
90
97
|
self._transport = transport
|
|
98
|
+
self._addr = addr
|
|
91
99
|
self._identifier = 0
|
|
92
100
|
self._mode = _Mode.NONE
|
|
93
101
|
self._cipher: ChainedAesCbc | None = None
|
|
@@ -215,12 +223,13 @@ class ComApClient[TransportT: Transport]:
|
|
|
215
223
|
|
|
216
224
|
# -- communication objects -------------------------------------------------
|
|
217
225
|
|
|
218
|
-
async def read_object(self, comm_obj: int, addr: int =
|
|
226
|
+
async def read_object(self, comm_obj: int, addr: int | None = None) -> bytes:
|
|
219
227
|
"""Read a communication object, handling ``SendToBlock`` continuation transparently.
|
|
220
228
|
|
|
221
229
|
Args:
|
|
222
230
|
comm_obj: Communication object number (C.O.).
|
|
223
|
-
addr: Controller unit address;
|
|
231
|
+
addr: Controller unit address; defaults to the address passed to
|
|
232
|
+
``ComApClient.__init__`` (``1`` unless overridden there).
|
|
224
233
|
|
|
225
234
|
Returns:
|
|
226
235
|
Raw payload bytes.
|
|
@@ -229,6 +238,7 @@ class ComApClient[TransportT: Transport]:
|
|
|
229
238
|
ComApControllerError: If the controller responds with an error code.
|
|
230
239
|
ComApProtocolError: If an unexpected message operation is received.
|
|
231
240
|
"""
|
|
241
|
+
addr = self._addr if addr is None else addr
|
|
232
242
|
ident = self._next_identifier()
|
|
233
243
|
await self._write_message(Operation.SEND_ME, addr, comm_obj, b"", ident)
|
|
234
244
|
|
|
@@ -251,13 +261,14 @@ class ComApClient[TransportT: Transport]:
|
|
|
251
261
|
f"unexpected operation {message.op!r} while reading {comm_obj}"
|
|
252
262
|
)
|
|
253
263
|
|
|
254
|
-
async def write_object(self, comm_obj: int, data: bytes, addr: int =
|
|
264
|
+
async def write_object(self, comm_obj: int, data: bytes, addr: int | None = None) -> bytes:
|
|
255
265
|
"""Write a communication object.
|
|
256
266
|
|
|
257
267
|
Args:
|
|
258
268
|
comm_obj: Communication object number (C.O.).
|
|
259
269
|
data: Raw payload bytes to write.
|
|
260
|
-
addr: Controller unit address;
|
|
270
|
+
addr: Controller unit address; defaults to the address passed to
|
|
271
|
+
``ComApClient.__init__`` (``1`` unless overridden there).
|
|
261
272
|
|
|
262
273
|
Returns:
|
|
263
274
|
Any data carried back on the ``NEXT`` acknowledgment (usually empty).
|
|
@@ -265,6 +276,7 @@ class ComApClient[TransportT: Transport]:
|
|
|
265
276
|
Raises:
|
|
266
277
|
ComApControllerError: If the controller responds with an error code.
|
|
267
278
|
"""
|
|
279
|
+
addr = self._addr if addr is None else addr
|
|
268
280
|
ident = self._next_identifier()
|
|
269
281
|
await self._write_message(Operation.SEND_TO, addr, comm_obj, data, ident)
|
|
270
282
|
message = await self._read_message()
|
|
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
|