wafe-modbus
Read and control WAFE heat recovery units with the ACE2 controller (WAFE 201 E and relatives) over Modbus TCP, as typed Python objects.
Built on modbus-connection. The library never opens a connection. It takes a ModbusUnit, so the caller owns the link.
Installation
pip install wafe-modbus
Usage
import asyncio
from modbus_connection import ModbusTcpParams
from modbus_connection.tmodbus import ModbusConnection
from wafe_modbus import OperatingMode, WafeUnit
async def main() -> None:
connection = ModbusConnection(ModbusTcpParams(host="192.168.1.246", port=502))
try:
unit = WafeUnit(connection.for_unit(1))
await unit.async_update()
print("Outdoor:", unit.status.outdoor_temperature, "°C")
print("CO2:", unit.status.co2, "ppm")
print("Target airflow:", unit.status.target_airflow, "m³/h")
print("Fan speeds:", unit.status.fan_1_speed, unit.status.fan_2_speed, "rpm")
print("Mode:", unit.functions.operating_mode)
await unit.async_set_operating_mode(OperatingMode.MANUAL)
await unit.async_set_manual_airflow(120)
finally:
await connection.close()
asyncio.run(main())
The device
- The controller answers Modbus TCP on port 502.
- It serves one client at a time. A second client is accepted and then reset. Keep a single connection.
- It ignores the unit id.
- It answers only these addresses. Anything else is refused.
| Table | Addresses | Component |
|---|---|---|
| Input registers | 1000–1001 | Identity |
| Input registers | 1002–1012 | Status |
| Coils | 0–13 | Functions |
| Holding registers | 2000–2071 | Settings |
WafeUnit.async_update_readings() reads Status and Functions. WafeUnit.async_update_settings() reads Settings. WafeUnit.async_update() reads both.
Status
| Attribute | Register | Notes |
|---|---|---|
state |
1002 | UnitState: ventilation, standby, holiday, manual |
sub_mode |
1003 | SubMode flags; bypass_active and holiday_ventilation_active read bits 0 and 1 |
operating_mode |
1004 | OperatingMode: the index of the active mode coil 0–3 |
outdoor_temperature |
1005 | T1, °C |
supply_temperature |
1006 | T2, °C |
extract_temperature |
1007 | T3, °C |
exhaust_temperature |
1008 | T4, °C |
co2 |
1009 | ppm |
fan_1_speed |
1010 | Undocumented, rpm, see below |
fan_2_speed |
1011 | Undocumented, rpm, see below |
target_airflow |
1012 | Undocumented, m³/h, see below |
The vendor register sheet ends at 1009. Registers 1010–1012 were found on a WAFE 201 E:
fan_1_speed(1010) andfan_2_speed(1011) are the speeds of the two fans in rpm. They fall to 0 when the fans stop, ramp up with them, and top out near 3200–3300. Which one is the supply fan is not confirmed.target_airflow(1012) is the airflow the unit currently aims for: the manual airflow in manual mode, the CO2 demand in intelligent mode, the maximum during a boost, the silent mode cap, and 0 in standby. The unit does not measure the airflow it actually delivers; when a fan runs at its maximum speed, the delivered airflow is lower.
Functions
Coils 0–3 select the operating mode. Setting one clears the others. Scheduler mode with an empty weekly plan stops the fans.
Coils 4–10 switch standby, holiday, silent, short boost, long boost, bypass off, and fireplace mode. The boosts end by themselves after Settings.short_boost_duration / long_boost_duration; while either boost runs, both boost coils read as set, and clearing either coil ends it. Functions.boost_active, async_start_boost() and async_stop_boost() wrap this. Fireplace mode does nothing until an installer enables it. bypass_off follows Settings.bypass_disabled.
Coils 11–13 are scheduler commands. The library reads them but does not write them.
Settings
Holding registers 2000–2071 follow the vendor sheet: operating mode, fan imbalance, CO2 PID and setpoint, airflow limits, bypass, boost durations, compressor, sensor simulator, scheduler slot, preheater, afterheater, and Voltdrive. Settings are written through Settings.write(name, value), with range validation.
Tested on a WAFE 201 E, the device refuses writes to 2011, 2013, 2017, 2021–2024 and 2066, even of their current value. The library maps them read-only. The bypass months 2018–2019 read 0 (decoded as None) until set, and then take only 1–12. state (2001) takes only ventilation and standby.
The vendor sheet has known errors. Input 1004 is not "AUT/MAN/SCH/USM" in that order: it follows the mode coils. boost_airflow (2011) does not hold m³/h.
Development
uv sync
uv run pytest
uv run ruff check .
uv run mypy
Tests run against modbus-connection's mock backend, seeded with a register snapshot from a real WAFE 201 E (tests/fixtures/w201e.json).
License
Apache-2.0
Metadata
Release files for wafe-modbus 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wafe_modbus-0.1.0.tar.gz | 44.0 kB | With provenance | Details for wafe_modbus-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wafe_modbus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for wafe_modbus-0.1.0-py3-none-any.whl |
Total release size: 58.6 kB
Release files / wafe_modbus-0.1.0.tar.gz
| Download URL | wafe_modbus-0.1.0.tar.gz |
|---|---|
| Size | 44.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac1ba2ee44635f977c210cdaf80408b96807c22d9c3ebdf9c0d2b67bca3eaa0e
|
|
BLAKE2b-256 checksum How to use checksums |
e19fd955537f5d4dfab34209bd04abad62bdf04954b445586e25925600384877
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / wafe_modbus-0.1.0-py3-none-any.whl
| Download URL | wafe_modbus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e0bc356ba6cfda160dbe8cf4f0b5a96afc4402129466e7bf6e5cc971b8eed0e
|
|
BLAKE2b-256 checksum How to use checksums |
a994927c41b536535ab942c5b59559422a136c4b02582a7cd6ed9dccbdb74fca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for wafe-modbus 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for wafe_modbus-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.