Skip to main content

Async Python client for the Duco ventilation API

Project description

python-duco-client

Async Python client for the DUCO ventilation box local REST API.

Installation

pip install python-duco-client

Quick start

import asyncio
import aiohttp
from duco import DucoClient

async def main():
    async with aiohttp.ClientSession() as session:
        client = DucoClient(session=session, host="192.168.1.100")

        board = await client.async_get_board_info()
        print(f"Box: {board.box_name} ({board.box_sub_type_name})")

        nodes = await client.async_get_nodes()
        for node in nodes:
            print(f"Node {node.node_id}: {node.general.node_type}")
            if node.sensor and node.sensor.co2 is not None:
                print(f"  CO2: {node.sensor.co2} ppm")

        await client.async_set_ventilation_state(1, "MAN2")

asyncio.run(main())

CLI

duco --host 192.168.1.100 info
duco --host 192.168.1.100 nodes
duco --host 192.168.1.100 set 1 MAN2

Documentation

See the docs/ folder for the full documentation:

License

MIT

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

python_duco_client-0.2.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

python_duco_client-0.2.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for python_duco_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ae3c608e50d82f8c5e644fe832886c64081fecf913d628bfec1c3bc4d7982fb9
MD5 803b9b63d238b94af498163ee880dfb0
BLAKE2b-256 edf644bee13c3bef352c04fdff77261bc4e08abef6e6dcf9df7b6f91dd4ec182

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on ronaldvdmeer/python-duco-client

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

File details

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

File metadata

File hashes

Hashes for python_duco_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b05460d46a1d84346d62dba04979c4a13a72eb67a22269645a6bba842f492b9
MD5 9a7ca60deeee20eeac31d1632323a75b
BLAKE2b-256 991ccb9933fe6936ad7176d43f2788eb1042d3e09409c52c996f8a5a13df141f

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on ronaldvdmeer/python-duco-client

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