aiocomfoconnect 0.3.2__tar.gz → 0.3.4__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.
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/PKG-INFO +2 -1
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/README.md +1 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/bridge.py +10 -4
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/const.py +8 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/sensors.py +6 -3
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/pyproject.toml +1 -1
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/LICENSE +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/__init__.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/__main__.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/comfoconnect.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/discovery.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/exceptions.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/properties.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/protobuf/nanopb_pb2.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/protobuf/zehnder_pb2.py +0 -0
- {aiocomfoconnect-0.3.2 → aiocomfoconnect-0.3.4}/aiocomfoconnect/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aiocomfoconnect
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: aiocomfoconnect is an asyncio Python 3 library for communicating with a Zehnder ComfoAir Q350/450/600 ventilation system
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Michaël Arnauts
|
|
@@ -86,6 +86,7 @@ $ python -m aiocomfoconnect get-property --host 192.168.1.213 1 1 8 9 # Unit 0x
|
|
|
86
86
|
- `async set_sensor_ventmode_humidity_protection(mode)`: Set the sensor based ventilation humidity protection setting. (auto / on / off)
|
|
87
87
|
- `async get_property(prop)`: Get the value of a property, e.g. `PROPERTY_RMOT_HEATING_THRESHOLD`.
|
|
88
88
|
- `async get_property_constraints(prop)`: Get the raw value of a numeric property, together with the range and step size the unit accepts.
|
|
89
|
+
- `bridge_type`: The type of the bridge (`GatewayType.LANC`, `SEASON` or `PRO`). Discovery reports it, and a ComfoConnect Pro is also recognised once a session has started.
|
|
89
90
|
|
|
90
91
|
### Low-level API
|
|
91
92
|
|
|
@@ -69,6 +69,7 @@ $ python -m aiocomfoconnect get-property --host 192.168.1.213 1 1 8 9 # Unit 0x
|
|
|
69
69
|
- `async set_sensor_ventmode_humidity_protection(mode)`: Set the sensor based ventilation humidity protection setting. (auto / on / off)
|
|
70
70
|
- `async get_property(prop)`: Get the value of a property, e.g. `PROPERTY_RMOT_HEATING_THRESHOLD`.
|
|
71
71
|
- `async get_property_constraints(prop)`: Get the raw value of a numeric property, together with the range and step size the unit accepts.
|
|
72
|
+
- `bridge_type`: The type of the bridge (`GatewayType.LANC`, `SEASON` or `PRO`). Discovery reports it, and a ComfoConnect Pro is also recognised once a session has started.
|
|
72
73
|
|
|
73
74
|
### Low-level API
|
|
74
75
|
|
|
@@ -13,7 +13,7 @@ from typing import Awaitable, Callable, Dict, Iterator, Optional, Set
|
|
|
13
13
|
from google.protobuf.message import DecodeError
|
|
14
14
|
from google.protobuf.message import Message as ProtobufMessage
|
|
15
15
|
|
|
16
|
-
from .const import VENTILATION_UNIT_PRODUCT_IDS, ProductId, PdoType
|
|
16
|
+
from .const import VENTILATION_UNIT_PRODUCT_IDS, GatewayType, ProductId, PdoType
|
|
17
17
|
from .exceptions import (
|
|
18
18
|
AioComfoConnectNotConnected,
|
|
19
19
|
AioComfoConnectNotReachable,
|
|
@@ -34,7 +34,7 @@ from .protobuf import zehnder_pb2
|
|
|
34
34
|
_LOGGER = logging.getLogger(__name__)
|
|
35
35
|
|
|
36
36
|
TIMEOUT = 5
|
|
37
|
-
GATEWAY_TYPE_PRO =
|
|
37
|
+
GATEWAY_TYPE_PRO = GatewayType.PRO
|
|
38
38
|
|
|
39
39
|
# How long we wait for the bridge to announce the ventilation unit before we give up.
|
|
40
40
|
NODE_DISCOVERY_TIMEOUT = 5
|
|
@@ -126,6 +126,7 @@ class Bridge:
|
|
|
126
126
|
):
|
|
127
127
|
self.host: str = host
|
|
128
128
|
self.uuid: str = uuid
|
|
129
|
+
# One of GatewayType. Discovery reports it, and a ComfoConnect Pro also identifies itself when a session starts.
|
|
129
130
|
self.bridge_type: int = bridge_type
|
|
130
131
|
self._local_uuid: Optional[str] = None
|
|
131
132
|
|
|
@@ -490,15 +491,20 @@ class Bridge:
|
|
|
490
491
|
except DecodeError as exc:
|
|
491
492
|
_LOGGER.error("Failed to decode message: %s", exc)
|
|
492
493
|
|
|
493
|
-
def cmd_start_session(self, take_over: bool = False) ->
|
|
494
|
+
async def cmd_start_session(self, take_over: bool = False) -> Message:
|
|
494
495
|
"""Starts the session on the device by logging in and optionally disconnecting an already existing session."""
|
|
495
496
|
_LOGGER.debug("StartSessionRequest")
|
|
496
497
|
# pylint: disable=no-member
|
|
497
|
-
|
|
498
|
+
reply = await self._send(
|
|
498
499
|
zehnder_pb2.StartSessionRequest,
|
|
499
500
|
zehnder_pb2.GatewayOperation.StartSessionRequestType,
|
|
500
501
|
{"takeover": take_over},
|
|
501
502
|
)
|
|
503
|
+
# A ComfoConnect Pro sets the devicename of a successful session to "ccpro", a LAN C leaves it empty. This also
|
|
504
|
+
# tells us the type of a bridge that was connected to by IP address, without discovery.
|
|
505
|
+
if getattr(reply, "devicename", None) == "ccpro":
|
|
506
|
+
self.bridge_type = GatewayType.PRO
|
|
507
|
+
return reply
|
|
502
508
|
|
|
503
509
|
def cmd_close_session(self) -> Awaitable[Message]:
|
|
504
510
|
"""Stops the current session."""
|
|
@@ -32,6 +32,14 @@ VENTILATION_UNIT_PRODUCT_IDS = (ProductId.COMFOAIRQ, ProductId.COMFOAIRFLEX)
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
# PDO Types
|
|
35
|
+
class GatewayType:
|
|
36
|
+
"""Defines the type of a bridge, with the values of the GatewayType in the discovery response."""
|
|
37
|
+
|
|
38
|
+
LANC = 0 # ComfoConnect LAN C
|
|
39
|
+
SEASON = 1 # The built-in WiFi module of a ComfoAir Flex
|
|
40
|
+
PRO = 2 # ComfoConnect Pro
|
|
41
|
+
|
|
42
|
+
|
|
35
43
|
class PdoType:
|
|
36
44
|
"""Defines a PDO type."""
|
|
37
45
|
|
|
@@ -57,6 +57,9 @@ SENSOR_NEXT_CHANGE_FAN_EXHAUST = 87
|
|
|
57
57
|
SENSOR_NEXT_CHANGE_FAN_SUPPLY = 86
|
|
58
58
|
SENSOR_OPERATING_MODE = 56
|
|
59
59
|
SENSOR_OPERATING_MODE_2 = 49
|
|
60
|
+
SENSOR_POSTHEATER_PRESENT = 402
|
|
61
|
+
SENSOR_POSTHEATER_STATE = 401
|
|
62
|
+
SENSOR_POSTHEATER_TEMPERATURE_BEFORE = 278
|
|
60
63
|
SENSOR_POWER_USAGE = 128
|
|
61
64
|
SENSOR_POWER_USAGE_TOTAL = 130
|
|
62
65
|
SENSOR_POWER_USAGE_TOTAL_YEAR = 129
|
|
@@ -171,7 +174,7 @@ SENSORS: Dict[int, Sensor] = {
|
|
|
171
174
|
SENSOR_TEMPERATURE_EXHAUST: Sensor("Exhaust Air Temperature", UNIT_CELCIUS, 275, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
172
175
|
SENSOR_TEMPERATURE_OUTDOOR: Sensor("Outdoor Air Temperature", UNIT_CELCIUS, 276, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
173
176
|
277: Sensor("Outdoor Air Temperature (?)", UNIT_CELCIUS, 277, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
174
|
-
|
|
177
|
+
SENSOR_POSTHEATER_TEMPERATURE_BEFORE: Sensor("Temperature before Postheater", UNIT_CELCIUS, 278, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
175
178
|
SENSOR_HUMIDITY_EXTRACT: Sensor("Extract Air Humidity", UNIT_PERCENT, 290, PdoType.TYPE_CN_UINT8),
|
|
176
179
|
SENSOR_HUMIDITY_EXHAUST: Sensor("Exhaust Air Humidity", UNIT_PERCENT, 291, PdoType.TYPE_CN_UINT8),
|
|
177
180
|
SENSOR_HUMIDITY_OUTDOOR: Sensor("Outdoor Air Humidity", UNIT_PERCENT, 292, PdoType.TYPE_CN_UINT8),
|
|
@@ -191,8 +194,8 @@ SENSORS: Dict[int, Sensor] = {
|
|
|
191
194
|
384: Sensor("sensor_384", None, 384, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
192
195
|
386: Sensor("sensor_386", None, 386, PdoType.TYPE_CN_BOOL, bool),
|
|
193
196
|
400: Sensor("sensor_400", None, 400, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
SENSOR_POSTHEATER_STATE: Sensor("Postheater State", UNIT_PERCENT, 401, PdoType.TYPE_CN_UINT8),
|
|
198
|
+
SENSOR_POSTHEATER_PRESENT: Sensor("Postheater Present", None, 402, PdoType.TYPE_CN_BOOL, bool),
|
|
196
199
|
SENSOR_COMFOFOND_TEMP_OUTDOOR: Sensor("ComfoFond Outdoor Air Temperature", None, 416, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
197
200
|
SENSOR_COMFOFOND_TEMP_GROUND: Sensor("ComfoFond Ground Temperature", None, 417, PdoType.TYPE_CN_INT16, lambda x: x / 10),
|
|
198
201
|
SENSOR_COMFOFOND_GHE_STATE: Sensor("ComfoFond GHE State Percentage", None, 418, PdoType.TYPE_CN_UINT8),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "aiocomfoconnect"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.4"
|
|
4
4
|
description = "aiocomfoconnect is an asyncio Python 3 library for communicating with a Zehnder ComfoAir Q350/450/600 ventilation system"
|
|
5
5
|
authors = ["Michaël Arnauts <michael.arnauts@gmail.com>"]
|
|
6
6
|
readme = "README.md"
|
|
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
|