Zum Inhalt

API Reference

This section provides automatically generated API documentation from the aiohomematic source code.

Module Description
CentralUnit Core orchestrator class
CentralConfig Configuration and setup
Exceptions Error handling
Constants Enums and constants

Module Structure

aiohomematic/
├── central/        # Central unit and coordinators
├── client/         # Protocol adapters (XML-RPC, JSON-RPC)
├── model/          # Device, Channel, DataPoint classes
├── interfaces/     # Protocol interfaces for DI
├── store/          # Caching and persistence
├── exceptions.py   # Exception hierarchy
└── const.py        # Constants and enums

Usage Patterns

Layer 1: CentralConfig + CentralUnit (Recommended Entry Point)

from aiohomematic.central import CentralConfig

config = CentralConfig.for_ccu(host="...", username="...", password="...")
central = await config.create_central()
await central.start()

devices = central.device_coordinator.devices

Layer 2: Protocol Interfaces (Dependency Injection)

from aiohomematic.interfaces import DeviceProviderProtocol, EventBusProviderProtocol

class MyComponent:
    def __init__(self, *, device_provider: DeviceProviderProtocol): ...