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.3.3.tar.gz (16.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.3.3-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for python_duco_client-0.3.3.tar.gz
Algorithm Hash digest
SHA256 88c2e59595f5c121f91abaacd2d810056279f44c768491b77727d9f109770dde
MD5 a3d5fdddab3310558d207624386e0cfa
BLAKE2b-256 2b5c72fe3b043c981d6db58d73aa3afb8615f35cde49c42d6680af59dd5266f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_duco_client-0.3.3.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.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for python_duco_client-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bb1d154b0721d6c81ddda011931909c76d57f59bdcb5f352b3a7d5a7073452a2
MD5 d31b87eb118fae943bd453e95409ca74
BLAKE2b-256 389a9d08e60c080538b7255948b7393017f66bb89128651e8c76c87a7449aecf

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_duco_client-0.3.3-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