aiohomematic is a Python library for controlling and monitoring Homematic and Homematic IP gear. It powers the Home Assistant integration Homematic(IP) Local and replaces the older pyhomematic approach.
Overview
aiohomematic is an asyncio-based Python library for Homematic and Homematic IP devices. It discovers entities from device and channel parameters automatically, supports XML-RPC and JSON-RPC transports, and can receive MQTT-forwarded events through Homematic(IP) Local setups.
Developers can extend behavior with custom entity classes for device types such as climate, covers, lights, locks, sirens, and valves. Hub-level entities cover CCU programs, system variables, inbox messages, install mode, and service messages. An internal event bus unifies lifecycle, state, and diagnostic events.
The library caches paramsets and descriptions for faster startup and includes circuit breaking, command retry with throttling, and automatic reconnection after CCU restarts. It is fully typed for strict mypy use and runs on asyncio.
It is intended as a reusable protocol layer: the Home Assistant integration wraps its devices and channels into entities, while other Python projects can depend on aiohomematic directly without Home Assistant.
Key features
- Automatic entity discovery
- XML-RPC and JSON-RPC
- MQTT event forwarding support
- Custom entity classes
- Unified EventBus
- Paramset description caching
- Reconnect after CCU restart
- Strict typing with asyncio
Use cases
- Home Assistant Homematic(IP) Local backend
- Custom Python Homematic automations
- CCU device monitoring in code
- Protocol testing without Home Assistant
- Integrating Homematic IP local devices