blauberg-vento 1.0.0__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.
- blauberg_vento-1.0.0/.gitignore +71 -0
- blauberg_vento-1.0.0/ARCHITECTURE.md +258 -0
- blauberg_vento-1.0.0/LICENSE +21 -0
- blauberg_vento-1.0.0/PKG-INFO +106 -0
- blauberg_vento-1.0.0/README.md +76 -0
- blauberg_vento-1.0.0/blauberg_vento/__init__.py +54 -0
- blauberg_vento-1.0.0/blauberg_vento/client.py +746 -0
- blauberg_vento-1.0.0/blauberg_vento/exceptions.py +59 -0
- blauberg_vento-1.0.0/blauberg_vento/models.py +242 -0
- blauberg_vento-1.0.0/blauberg_vento/parameters.py +547 -0
- blauberg_vento-1.0.0/blauberg_vento/protocol.py +359 -0
- blauberg_vento-1.0.0/blauberg_vento/transport.py +187 -0
- blauberg_vento-1.0.0/pyproject.toml +59 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
|
|
27
|
+
# PyInstaller
|
|
28
|
+
*.manifest
|
|
29
|
+
*.spec
|
|
30
|
+
|
|
31
|
+
# Installer logs
|
|
32
|
+
pip-log.txt
|
|
33
|
+
pip-delete-this-directory.txt
|
|
34
|
+
|
|
35
|
+
# Unit test / coverage reports
|
|
36
|
+
htmlcov/
|
|
37
|
+
.tox/
|
|
38
|
+
.nox/
|
|
39
|
+
.coverage
|
|
40
|
+
.coverage.*
|
|
41
|
+
.cache
|
|
42
|
+
nosetests.xml
|
|
43
|
+
coverage.xml
|
|
44
|
+
*.cover
|
|
45
|
+
*.py,cover
|
|
46
|
+
.hypothesis/
|
|
47
|
+
.pytest_cache/
|
|
48
|
+
|
|
49
|
+
# Translations
|
|
50
|
+
*.mo
|
|
51
|
+
*.pot
|
|
52
|
+
|
|
53
|
+
# Environments
|
|
54
|
+
.env
|
|
55
|
+
.venv
|
|
56
|
+
env/
|
|
57
|
+
venv/
|
|
58
|
+
ENV/
|
|
59
|
+
env.bak/
|
|
60
|
+
venv.bak/
|
|
61
|
+
|
|
62
|
+
# IDE
|
|
63
|
+
.idea/
|
|
64
|
+
.vscode/
|
|
65
|
+
*.swp
|
|
66
|
+
*.swo
|
|
67
|
+
*~
|
|
68
|
+
|
|
69
|
+
# OS
|
|
70
|
+
.DS_Store
|
|
71
|
+
Thumbs.db
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Blauberg Vento Protocol Library - Architecture Overview
|
|
2
|
+
|
|
3
|
+
## **Introduction**
|
|
4
|
+
|
|
5
|
+
This library provides a Python interface for interacting with **Blauberg Vento ventilation devices** using their openly available protocol. It supports both **synchronous** and **asynchronous** communication, device discovery, and comprehensive parameter control.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## **Architecture**
|
|
10
|
+
|
|
11
|
+
The library is organized into the following layers:
|
|
12
|
+
|
|
13
|
+
### 1. **Transport Layer** (`transport.py`)
|
|
14
|
+
|
|
15
|
+
- Handles **UDP communication** with devices.
|
|
16
|
+
- Provides synchronous (`VentoTransport`) and asynchronous (`AsyncVentoTransport`) implementations.
|
|
17
|
+
- Supports **device discovery** via UDP broadcast.
|
|
18
|
+
|
|
19
|
+
### 2. **Protocol Layer** (`protocol.py`)
|
|
20
|
+
|
|
21
|
+
- Implements **packet encoding/decoding** for the Blauberg Vento protocol.
|
|
22
|
+
- Constructs packets for **read**, **write**, **increment**, and **decrement** operations.
|
|
23
|
+
- Parses responses into structured data (e.g., `Param` → `bytes` mappings).
|
|
24
|
+
- Includes **checksum verification** and error handling for malformed packets.
|
|
25
|
+
|
|
26
|
+
### 3. **Parameter Layer** (`parameters.py`)
|
|
27
|
+
|
|
28
|
+
- Defines all **protocol parameters** (`Param` enum) and their metadata (e.g., size, read/write permissions).
|
|
29
|
+
- Provides helper functions to check parameter properties (e.g., `is_readable`, `is_writable`).
|
|
30
|
+
- Maps parameters to human-readable descriptions and valid value ranges.
|
|
31
|
+
|
|
32
|
+
### 4. **Model Layer** (`models.py`)
|
|
33
|
+
|
|
34
|
+
- Defines **dataclasses** for structured device data (e.g., `DeviceState`, `FirmwareVersion`, `WifiConfig`).
|
|
35
|
+
- Includes helper classes for parsing raw data (e.g., `RtcTime`, `FilterCountdown`).
|
|
36
|
+
- Aggregates device state into a single object (`DeviceState`) for easy access.
|
|
37
|
+
|
|
38
|
+
### 5. **Client Layer** (`client.py`)
|
|
39
|
+
|
|
40
|
+
- Provides **high-level clients** (`VentoClient`, `AsyncVentoClient`) for device interaction.
|
|
41
|
+
- Implements methods for:
|
|
42
|
+
- Reading/writing parameters (e.g., `read_params`, `write_params`).
|
|
43
|
+
- Controlling device state (e.g., `turn_on`, `set_speed`, `set_mode`).
|
|
44
|
+
- Configuring timers, sensors, Wi-Fi, and maintenance settings.
|
|
45
|
+
- Discovering devices on the network (`discover` method).
|
|
46
|
+
- Uses `_DeviceStateBuilder` to construct `DeviceState` from raw parameter data.
|
|
47
|
+
|
|
48
|
+
### 6. **Exception Layer** (`exceptions.py`)
|
|
49
|
+
|
|
50
|
+
- Defines **custom exceptions** for error handling (e.g., `VentoTimeoutError`, `VentoProtocolError`).
|
|
51
|
+
- Organized hierarchically under `VentoError` for consistent error handling.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## **Architecture Diagram**
|
|
56
|
+
|
|
57
|
+
```mermaid
|
|
58
|
+
flowchart TB
|
|
59
|
+
subgraph User
|
|
60
|
+
A[User Code]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
subgraph Client Layer
|
|
64
|
+
B[VentoClient]
|
|
65
|
+
C[AsyncVentoClient]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
subgraph Model Layer
|
|
69
|
+
D[DeviceState]
|
|
70
|
+
E[FirmwareVersion]
|
|
71
|
+
F[WifiConfig]
|
|
72
|
+
G[RtcTime]
|
|
73
|
+
H[FilterCountdown]
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
subgraph Protocol Layer
|
|
77
|
+
I[protocol.py]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
subgraph Parameter Layer
|
|
81
|
+
J[parameters.py]
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
subgraph Transport Layer
|
|
85
|
+
K[VentoTransport]
|
|
86
|
+
L[AsyncVentoTransport]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
subgraph Device
|
|
90
|
+
M[Blauberg Vento Device]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
A -->|Uses| B
|
|
94
|
+
A -->|Uses| C
|
|
95
|
+
B -->|Reads/Writes| I
|
|
96
|
+
C -->|Reads/Writes| I
|
|
97
|
+
I -->|Encodes/Decodes| J
|
|
98
|
+
I -->|Uses| K
|
|
99
|
+
C -->|Uses| L
|
|
100
|
+
I -->|Uses| L
|
|
101
|
+
|
|
102
|
+
I -->|Constructs| D
|
|
103
|
+
I -->|Constructs| E
|
|
104
|
+
I -->|Constructs| F
|
|
105
|
+
I -->|Constructs| G
|
|
106
|
+
I -->|Constructs| H
|
|
107
|
+
|
|
108
|
+
K -->|UDP| M
|
|
109
|
+
L -->|UDP| M
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## **Key Features**
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
| Feature | Description |
|
|
118
|
+
| ----------------------- | ------------------------------------------------------------------------- |
|
|
119
|
+
| **Device Discovery** | Discover Blauberg Vento devices on the local network via UDP broadcast. |
|
|
120
|
+
| **Parameter Control** | Read/write parameters (e.g., power, speed, timers, sensors, Wi-Fi). |
|
|
121
|
+
| **State Management** | Retrieve and update the full device state (`DeviceState`). |
|
|
122
|
+
| **Async Support** | Non-blocking operations via `AsyncVentoClient` and `AsyncVentoTransport`. |
|
|
123
|
+
| **Error Handling** | Comprehensive exceptions for connection, protocol, and parameter errors. |
|
|
124
|
+
| **Protocol Compliance** | Follows Blauberg's openly available protocol documentation. |
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## **When to Use `VentoClient` vs. `AsyncVentoClient`**
|
|
130
|
+
|
|
131
|
+
### **Use `VentoClient` (Synchronous) When:**
|
|
132
|
+
|
|
133
|
+
- You are writing **synchronous scripts** or applications where blocking operations are acceptable.
|
|
134
|
+
- You need **simple, straightforward** interactions with the device.
|
|
135
|
+
- Your application does **not** require high concurrency or parallelism.
|
|
136
|
+
- You are working in a **single-threaded environment** where async/await syntax is unnecessary.
|
|
137
|
+
|
|
138
|
+
**Example Use Cases:**
|
|
139
|
+
|
|
140
|
+
- CLI tools for one-off device configuration.
|
|
141
|
+
- Simple automation scripts (e.g., turning devices on/off at specific times).
|
|
142
|
+
- Testing or debugging device interactions.
|
|
143
|
+
|
|
144
|
+
**Example:**
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
from blauberg_vento import VentoClient
|
|
148
|
+
|
|
149
|
+
# Synchronous usage
|
|
150
|
+
client = VentoClient(host="192.168.1.100", device_id="DEVICE_ID", password="1111")
|
|
151
|
+
state = client.get_state() # Blocks until response is received
|
|
152
|
+
print(f"Power: {'ON' if state.power else 'OFF'}")
|
|
153
|
+
client.turn_on() # Blocks until command is sent
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### **Use `AsyncVentoClient` (Asynchronous) When:**
|
|
159
|
+
|
|
160
|
+
- You are building **high-performance applications** that need to handle multiple devices or tasks concurrently.
|
|
161
|
+
- You want to **avoid blocking** the main thread (e.g., in web servers, GUIs, or real-time systems).
|
|
162
|
+
- Your application uses **`asyncio`** or other asynchronous frameworks.
|
|
163
|
+
- You need to **scale** to many devices or frequent interactions without latency.
|
|
164
|
+
|
|
165
|
+
**Example Use Cases:**
|
|
166
|
+
|
|
167
|
+
- Integration in Home Assistant
|
|
168
|
+
- Web applications (e.g., Flask/FastAPI) that need to serve multiple requests simultaneously.
|
|
169
|
+
- Real-time monitoring systems that poll multiple devices.
|
|
170
|
+
- Applications integrating with other async libraries (e.g., databases, HTTP clients).
|
|
171
|
+
|
|
172
|
+
**Example:**
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
import asyncio
|
|
176
|
+
from blauberg_vento import AsyncVentoClient
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
async def monitor_device():
|
|
180
|
+
async with AsyncVentoClient(host="192.168.1.100", device_id="DEVICE_ID") as client:
|
|
181
|
+
state = await client.get_state() # Non-blocking: allows other tasks to run
|
|
182
|
+
print(f"Power: {'ON' if state.power else 'OFF'}")
|
|
183
|
+
await client.turn_on() # Non-blocking
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# Run multiple device interactions concurrently
|
|
187
|
+
async def main():
|
|
188
|
+
devices = [
|
|
189
|
+
("192.168.1.100", "DEVICE_1"),
|
|
190
|
+
("192.168.1.101", "DEVICE_2"),
|
|
191
|
+
]
|
|
192
|
+
tasks = [monitor_device(device[0], device[1]) for device in devices]
|
|
193
|
+
await asyncio.gather(*tasks) # Runs concurrently
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
asyncio.run(main())
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## **Supported Parameters**
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
| **Parameter** | **Description** | **Readable** | **Writable** | **Size (bytes)** | **Valid Values/Ranges** |
|
|
207
|
+
| -------------------- | ------------------------ | ------------ | ------------ | ---------------- | --------------------------------------------------------- |
|
|
208
|
+
| `POWER` | Unit On/Off | Yes | Yes | 1 | 0: Off, 1: On, 2: Invert |
|
|
209
|
+
| `SPEED` | Speed number | Yes | Yes | 1 | 1: Speed 1, 2: Speed 2, 3: Speed 3, 255: Manual |
|
|
210
|
+
| `BOOST_STATUS` | Boost status | Yes | No | 1 | 0: Off, 1: On |
|
|
211
|
+
| `TIMER_MODE` | Timer mode | Yes | Yes | 1 | 0: Off, 1: Night, 2: Party |
|
|
212
|
+
| `TIMER_COUNTDOWN` | Timer countdown | Yes | No | 3 | N/A |
|
|
213
|
+
| `HUMIDITY_SENSOR` | Humidity sensor | Yes | Yes | 1 | 0: Off, 1: On, 2: Invert |
|
|
214
|
+
| `RELAY_SENSOR` | Relay sensor | Yes | Yes | 1 | 0: Off, 1: On, 2: Invert |
|
|
215
|
+
| `VOLTAGE_SENSOR` | 0-10V sensor | Yes | Yes | 1 | 0: Off, 1: On, 2: Invert |
|
|
216
|
+
| `HUMIDITY_THRESHOLD` | Humidity threshold (%RH) | Yes | Yes | 1 | 40-80 |
|
|
217
|
+
| `VOLTAGE_THRESHOLD` | 0-10V threshold (%) | Yes | Yes | 1 | 5-100 |
|
|
218
|
+
| `BATTERY_VOLTAGE` | Battery voltage (mV) | Yes | No | 2 | 0-5000 |
|
|
219
|
+
| `CURRENT_HUMIDITY` | Current humidity (%RH) | Yes | No | 1 | 0-100 |
|
|
220
|
+
| `VOLTAGE_SENSOR_VAL` | 0-10V value (%) | Yes | No | 1 | 0-100 |
|
|
221
|
+
| `RELAY_STATE` | Relay state | Yes | No | 1 | 0: Off, 1: On |
|
|
222
|
+
| `HUMIDITY_STATUS` | Humidity status | Yes | No | 1 | 0: Below, 1: Over |
|
|
223
|
+
| `VOLTAGE_STATUS` | 0-10V status | Yes | No | 1 | 0: Below, 1: Over |
|
|
224
|
+
| `MANUAL_SPEED` | Manual speed (0-255) | Yes | Yes | 1 | 0-255 |
|
|
225
|
+
| `FAN1_SPEED` | Fan 1 speed (rpm) | Yes | No | 2 | 0-5000 |
|
|
226
|
+
| `FAN2_SPEED` | Fan 2 speed (rpm) | Yes | No | 2 | 0-5000 |
|
|
227
|
+
| `FILTER_COUNTDOWN` | Filter countdown | Yes | No | 3 | N/A |
|
|
228
|
+
| `FILTER_RESET` | Reset filter timer | No | Yes | 1 | N/A |
|
|
229
|
+
| `FILTER_INDICATOR` | Filter indicator | Yes | No | 1 | 0: OK, 1: Replace |
|
|
230
|
+
| `BOOST_DELAY` | Boost delay (0-60 min) | Yes | Yes | 1 | 0-60 |
|
|
231
|
+
| `RTC_TIME` | RTC time | Yes | Yes | 3 | N/A |
|
|
232
|
+
| `RTC_CALENDAR` | RTC calendar | Yes | Yes | 4 | N/A |
|
|
233
|
+
| `WEEKLY_SCHEDULE_EN` | Weekly schedule | Yes | Yes | 1 | 0: Off, 1: On, 2: Invert |
|
|
234
|
+
| `SCHEDULE_SETUP` | Schedule setup | Yes | Yes | 6 | N/A |
|
|
235
|
+
| `DEVICE_SEARCH` | Device search/ID | Yes | No | 16 | N/A |
|
|
236
|
+
| `DEVICE_PASSWORD` | Device password | Yes | Yes | N/A | N/A |
|
|
237
|
+
| `MACHINE_HOURS` | Machine hours | Yes | No | 4 | N/A |
|
|
238
|
+
| `RESET_ALARMS` | Reset alarms | No | Yes | 1 | N/A |
|
|
239
|
+
| `ALARM_STATUS` | Alarm status | Yes | No | 1 | 0: No alarm, 1: Alarm, 2: Warning |
|
|
240
|
+
| `CLOUD_PERMISSION` | Cloud permission | Yes | Yes | 1 | 0: Off, 1: On, 2: Invert |
|
|
241
|
+
| `FIRMWARE_VERSION` | Firmware version | Yes | No | 6 | N/A |
|
|
242
|
+
| `FACTORY_RESET` | Factory reset | No | Yes | 1 | N/A |
|
|
243
|
+
| `WIFI_MODE` | Wi-Fi mode | Yes | Yes | 1 | 1: Client, 2: AP |
|
|
244
|
+
| `WIFI_SSID` | Wi-Fi SSID | Yes | Yes | N/A | N/A |
|
|
245
|
+
| `WIFI_PASSWORD` | Wi-Fi password | Yes | Yes | N/A | N/A |
|
|
246
|
+
| `WIFI_ENCRYPTION` | Wi-Fi encryption | Yes | Yes | 1 | 48: OPEN, 50: WPA\_PSK, 51: WPA2\_PSK, 52: WPA\_WPA2\_PSK |
|
|
247
|
+
| `WIFI_CHANNEL` | Wi-Fi channel | Yes | Yes | 1 | 1-13 |
|
|
248
|
+
| `WIFI_DHCP` | Wi-Fi DHCP | Yes | Yes | 1 | 0: Static, 1: DHCP, 2: Invert |
|
|
249
|
+
| `WIFI_IP` | Wi-Fi IP | Yes | Yes | 4 | N/A |
|
|
250
|
+
| `WIFI_SUBNET` | Wi-Fi subnet | Yes | Yes | 4 | N/A |
|
|
251
|
+
| `WIFI_GATEWAY` | Wi-Fi gateway | Yes | Yes | 4 | N/A |
|
|
252
|
+
| `WIFI_APPLY` | Apply Wi-Fi config | No | Yes | 1 | N/A |
|
|
253
|
+
| `WIFI_DISCARD` | Discard Wi-Fi config | No | Yes | 1 | N/A |
|
|
254
|
+
| `WIFI_CURRENT_IP` | Current Wi-Fi IP | Yes | No | 4 | N/A |
|
|
255
|
+
| `OPERATION_MODE` | Operation mode | Yes | Yes | 1 | 0: Ventilation, 1: Heat Recovery, 2: Supply |
|
|
256
|
+
| `UNIT_TYPE` | Unit type | Yes | No | 2 | 3: A50/A85/A100 V.2, 4: Duo A30 V.2, 5: A30 V.2 |
|
|
257
|
+
| `NIGHT_TIMER` | Night timer | Yes | Yes | 2 | N/A |
|
|
258
|
+
| `PARTY_TIMER` | Party timer | Yes | Yes | | |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Birger Koblitz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: blauberg-vento
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Python API for Blauberg Vento Expert Wi-Fi fans
|
|
5
|
+
Project-URL: Homepage, https://github.com/BirgerKo/blauberg_vento_api
|
|
6
|
+
Project-URL: Repository, https://github.com/BirgerKo/blauberg_vento_api.git
|
|
7
|
+
Project-URL: Issues, https://github.com/BirgerKo/blauberg_vento_api/issues
|
|
8
|
+
Author-email: Birger Kollstrand <birger@kollstrand.no>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: blauberg,fan,home-automation,hvac,vento
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Home Automation
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: httpx>=0.27; extra == 'dev'
|
|
23
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
24
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest-playwright>=0.5; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# Blauberg Vento API
|
|
32
|
+
|
|
33
|
+
A Python library for controlling Blauberg Vento Expert Wi-Fi ventilation units.
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- Control Blauberg Vento fans via UDP protocol
|
|
38
|
+
- Support for both synchronous and asynchronous operations
|
|
39
|
+
- Device discovery on local network
|
|
40
|
+
- Comprehensive parameter control (speed, timers, sensors, Wi-Fi, etc.)
|
|
41
|
+
- Full device state retrieval
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install blauberg-vento
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
# Usage
|
|
50
|
+
|
|
51
|
+
## Synchronous Client
|
|
52
|
+
from blauberg_vento import VentoClient
|
|
53
|
+
|
|
54
|
+
# Create client
|
|
55
|
+
```python
|
|
56
|
+
client = VentoClient(
|
|
57
|
+
host="192.168.1.100",
|
|
58
|
+
device_id="YOUR_DEVICE_ID",
|
|
59
|
+
password="1111"
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Get device state
|
|
63
|
+
state = client.get_state()
|
|
64
|
+
print(f"Power: {'ON' if state.power else 'OFF'}")
|
|
65
|
+
print(f"Speed: {state.speed_name}")
|
|
66
|
+
print(f"Mode: {state.operation_mode_name}")
|
|
67
|
+
|
|
68
|
+
# Control device
|
|
69
|
+
client.turn_on()
|
|
70
|
+
client.set_speed(2) # Speed 2
|
|
71
|
+
client.set_ventilation() # Ventilation mode
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Asynchronous Client
|
|
75
|
+
```python
|
|
76
|
+
import asyncio
|
|
77
|
+
from blauberg_vento import AsyncVentoClient
|
|
78
|
+
|
|
79
|
+
async def main():
|
|
80
|
+
async with AsyncVentoClient(
|
|
81
|
+
host="192.168.1.100",
|
|
82
|
+
device_id="YOUR_DEVICE_ID",
|
|
83
|
+
password="1111"
|
|
84
|
+
) as client:
|
|
85
|
+
state = await client.get_state()
|
|
86
|
+
print(f"Power: {'ON' if state.power else 'OFF'}")
|
|
87
|
+
await client.turn_on()
|
|
88
|
+
|
|
89
|
+
asyncio.run(main())
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Device discovery
|
|
93
|
+
```python
|
|
94
|
+
from blauberg_vento import VentoClient
|
|
95
|
+
|
|
96
|
+
# Discover devices on network
|
|
97
|
+
devices = VentoClient.discover()
|
|
98
|
+
for device in devices:
|
|
99
|
+
print(f"Found device: {device.device_id} at {device.ip}")
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
# Documentation
|
|
103
|
+
See ARCHITECTURE.md for detailed architecture overview.
|
|
104
|
+
|
|
105
|
+
# License
|
|
106
|
+
MIT License - see LICENSE for details.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Blauberg Vento API
|
|
2
|
+
|
|
3
|
+
A Python library for controlling Blauberg Vento Expert Wi-Fi ventilation units.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Control Blauberg Vento fans via UDP protocol
|
|
8
|
+
- Support for both synchronous and asynchronous operations
|
|
9
|
+
- Device discovery on local network
|
|
10
|
+
- Comprehensive parameter control (speed, timers, sensors, Wi-Fi, etc.)
|
|
11
|
+
- Full device state retrieval
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install blauberg-vento
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
# Usage
|
|
20
|
+
|
|
21
|
+
## Synchronous Client
|
|
22
|
+
from blauberg_vento import VentoClient
|
|
23
|
+
|
|
24
|
+
# Create client
|
|
25
|
+
```python
|
|
26
|
+
client = VentoClient(
|
|
27
|
+
host="192.168.1.100",
|
|
28
|
+
device_id="YOUR_DEVICE_ID",
|
|
29
|
+
password="1111"
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# Get device state
|
|
33
|
+
state = client.get_state()
|
|
34
|
+
print(f"Power: {'ON' if state.power else 'OFF'}")
|
|
35
|
+
print(f"Speed: {state.speed_name}")
|
|
36
|
+
print(f"Mode: {state.operation_mode_name}")
|
|
37
|
+
|
|
38
|
+
# Control device
|
|
39
|
+
client.turn_on()
|
|
40
|
+
client.set_speed(2) # Speed 2
|
|
41
|
+
client.set_ventilation() # Ventilation mode
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Asynchronous Client
|
|
45
|
+
```python
|
|
46
|
+
import asyncio
|
|
47
|
+
from blauberg_vento import AsyncVentoClient
|
|
48
|
+
|
|
49
|
+
async def main():
|
|
50
|
+
async with AsyncVentoClient(
|
|
51
|
+
host="192.168.1.100",
|
|
52
|
+
device_id="YOUR_DEVICE_ID",
|
|
53
|
+
password="1111"
|
|
54
|
+
) as client:
|
|
55
|
+
state = await client.get_state()
|
|
56
|
+
print(f"Power: {'ON' if state.power else 'OFF'}")
|
|
57
|
+
await client.turn_on()
|
|
58
|
+
|
|
59
|
+
asyncio.run(main())
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Device discovery
|
|
63
|
+
```python
|
|
64
|
+
from blauberg_vento import VentoClient
|
|
65
|
+
|
|
66
|
+
# Discover devices on network
|
|
67
|
+
devices = VentoClient.discover()
|
|
68
|
+
for device in devices:
|
|
69
|
+
print(f"Found device: {device.device_id} at {device.ip}")
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
# Documentation
|
|
73
|
+
See ARCHITECTURE.md for detailed architecture overview.
|
|
74
|
+
|
|
75
|
+
# License
|
|
76
|
+
MIT License - see LICENSE for details.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from .client import AsyncVentoClient, VentoClient
|
|
2
|
+
from .exceptions import (
|
|
3
|
+
VentoAuthError,
|
|
4
|
+
VentoChecksumError,
|
|
5
|
+
VentoConnectionError,
|
|
6
|
+
VentoDiscoveryError,
|
|
7
|
+
VentoError,
|
|
8
|
+
VentoInvalidResponseError,
|
|
9
|
+
VentoProtocolError,
|
|
10
|
+
VentoTimeoutError,
|
|
11
|
+
VentoUnsupportedParamError,
|
|
12
|
+
VentoValueError,
|
|
13
|
+
)
|
|
14
|
+
from .models import (
|
|
15
|
+
DeviceState,
|
|
16
|
+
DiscoveredDevice,
|
|
17
|
+
FilterCountdown,
|
|
18
|
+
FirmwareVersion,
|
|
19
|
+
MachineHours,
|
|
20
|
+
RtcCalendar,
|
|
21
|
+
RtcTime,
|
|
22
|
+
SchedulePeriod,
|
|
23
|
+
TimerCountdown,
|
|
24
|
+
WifiConfig,
|
|
25
|
+
)
|
|
26
|
+
from .parameters import Func, Param
|
|
27
|
+
|
|
28
|
+
__version__ = "1.0.0"
|
|
29
|
+
__all__ = [
|
|
30
|
+
"VentoClient",
|
|
31
|
+
"AsyncVentoClient",
|
|
32
|
+
"DeviceState",
|
|
33
|
+
"DiscoveredDevice",
|
|
34
|
+
"FilterCountdown",
|
|
35
|
+
"FirmwareVersion",
|
|
36
|
+
"MachineHours",
|
|
37
|
+
"RtcCalendar",
|
|
38
|
+
"RtcTime",
|
|
39
|
+
"SchedulePeriod",
|
|
40
|
+
"TimerCountdown",
|
|
41
|
+
"WifiConfig",
|
|
42
|
+
"Param",
|
|
43
|
+
"Func",
|
|
44
|
+
"VentoError",
|
|
45
|
+
"VentoConnectionError",
|
|
46
|
+
"VentoTimeoutError",
|
|
47
|
+
"VentoChecksumError",
|
|
48
|
+
"VentoProtocolError",
|
|
49
|
+
"VentoInvalidResponseError",
|
|
50
|
+
"VentoAuthError",
|
|
51
|
+
"VentoUnsupportedParamError",
|
|
52
|
+
"VentoValueError",
|
|
53
|
+
"VentoDiscoveryError",
|
|
54
|
+
]
|