Skip to main content

Python library for communicating with Airobot ventilation units via Modbus TCP

Project description

pyairobotmodbus

Python library for communicating with Airobot ventilation units via Modbus TCP.

Installation

pip install pyairobotmodbus

Usage

Context manager (recommended)

import asyncio
from pyairobotmodbus import AirobotModbusClient, OperatingMode

async def main():
    async with AirobotModbusClient("192.168.1.100") as client:
        data = await client.async_get_data()
        print(f"Supply air: {data.supply_air_temp}°C")
        print(f"CO2: {data.co2_level} ppm")

        await client.async_set_mode(OperatingMode.MANUAL)
        await client.async_set_fan_speed(7)

asyncio.run(main())

Factory method

client = await AirobotModbusClient.create("192.168.1.100")

Error handling

All exceptions inherit from AirobotError:

from pyairobotmodbus import AirobotError, AirobotConnectionError, AirobotTimeoutError

try:
    async with AirobotModbusClient("192.168.1.100") as client:
        data = await client.async_get_data()
except AirobotTimeoutError:
    print("Device did not respond in time")
except AirobotConnectionError:
    print("Could not connect to device")
except AirobotError as e:
    print(f"Communication error: {e}")

Sensor data

async_get_data() returns an AirobotData snapshot with:

  • Temperatures — supply, extract, outside, exhaust, extra (°C)
  • Humidity — supply, extract, outside, exhaust, extra (RH%)
  • Air quality — CO2 (ppm), VOC (index), PM2.5 (μg/m³)
  • Fans — supply/extract level, RPM, and airflow (m³/h)
  • Status — error flags, heat recovery efficiency, working time

Device control

# Operating mode
await client.async_set_mode(OperatingMode.AUTOMATIC)

# Fan speed (1-10)
await client.async_set_fan_speed(7)

# Toggles
await client.async_set_boost(True)
await client.async_set_overpressure(True)
await client.async_set_bypass(True)
await client.async_set_power(True)

# Setpoints
await client.async_set_co2_setpoint(800)         # ppm
await client.async_set_humidity_setpoint(50.0)    # RH%
await client.async_set_voc_setpoint(200)          # index
await client.async_set_pm25_setpoint(25)          # μg/m³

# Timeouts
await client.async_set_boost_timeout(1200)        # seconds
await client.async_set_overpressure_timeout(600)  # seconds

# Filter reminder
await client.async_set_filter_reminder_interval(4380)  # hours

# Sensor control toggles
await client.async_set_humidity_control(True)
await client.async_set_voc_control(True)
await client.async_set_pm_control(True)

CLI

# Read all data from the device
pyairobotmodbus read 192.168.1.100

# Set a parameter
pyairobotmodbus set 192.168.1.100 fan_speed 7

# Monitor continuously
pyairobotmodbus monitor 192.168.1.100

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyairobotmodbus-0.2.0.tar.gz (164.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyairobotmodbus-0.2.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file pyairobotmodbus-0.2.0.tar.gz.

File metadata

  • Download URL: pyairobotmodbus-0.2.0.tar.gz
  • Upload date:
  • Size: 164.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyairobotmodbus-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3fabdad9f406ae0001fdf812558f0bc9f40df4f6e4cf3fe1d3e80b1f9aaac372
MD5 090742da460f1c43979b3796bd5252f4
BLAKE2b-256 5c1f1b74d4cd6b539dc1a21a8221823f3b95de53145ca7cc13736bf1b951aa95

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyairobotmodbus-0.2.0.tar.gz:

Publisher: publish.yml on dmednis/pyairobotmodbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyairobotmodbus-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyairobotmodbus-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 101b03c535cdf78b0756ee762bdc1ab4ddfcc6ecfa0cf38a41650f1b17fe2c04
MD5 7ade050eb987b6dbcc78926af66faec5
BLAKE2b-256 f76548ee8e205ed95a36592cc5ba01a24524b5c61ad4478b95b181c0bb45d033

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyairobotmodbus-0.2.0-py3-none-any.whl:

Publisher: publish.yml on dmednis/pyairobotmodbus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page