Skip to main content

Release License Python GitHub Sponsors

aiohomematic

A modern, async Python library for controlling and monitoring Homematic and HomematicIP devices. Powers the Home Assistant integration "Homematic(IP) Local".

This project is the modern successor to pyhomematic, focusing on automatic entity creation, fewer manual device definitions, and faster startups.

Key Features

  • Automatic entity discovery from device/channel parameters
  • Broad backend support: CCU3, OpenCCU, CUxD, CCU-Jack, and godevccu for testing
  • Multiple transport protocols: XML-RPC (standard interfaces) and JSON-RPC (CUxD / CCU-Jack), with MQTT event forwarding via Homematic(IP) Local
  • Extensible via custom entity classes for complex devices (climate, cover, light, lock, siren, valve, …)
  • Hub entities for CCU programs, system variables, inbox messages, install mode, and service messages
  • Event-driven architecture with a unified EventBus for lifecycle, state, and diagnostic events
  • Fast startups through paramset and description caching
  • Robust operation with circuit breaker, command retry/throttling, and automatic reconnection after CCU restarts
  • Fully typed (mypy strict mode) and async/await based on asyncio

Documentation

Full documentation: sukramj.github.io/aiohomematic

Section Description
Getting Started Installation and first steps
User Guide Home Assistant integration and device topics
Developer Guide API reference for library consumers
Contributor Guide Dev environment, coding standards, release process
Architecture & ADRs System design and decision records

Additional entry points in this repository: CLAUDE.md (AI assistant / contributor quick-reference), AI_POLICY.md (rules for AI-assisted contributions) and changelog.md.

How It Works

┌─────────────────────────────────────────────────────────┐
│                    Home Assistant                       │
│                                                         │
│  ┌────────────────────────────────────────────────────┐ │
│  │           Homematic(IP) Local Integration          │ │
│  │                                                    │ │
│  │  • Home Assistant entities (climate, light, etc.)  │ │
│  │  • UI configuration flows                          │ │
│  │  • Services and automations                        │ │
│  │  • MQTT bridge for CUxD / CCU-Jack events          │ │
│  └────────────────────────┬───────────────────────────┘ │
└───────────────────────────┼─────────────────────────────┘
                            │
                            │ uses
                            ▼
┌───────────────────────────────────────────────────────────┐
│                      aiohomematic                         │
│                                                           │
│  • Protocol adapters (XML-RPC, JSON-RPC)                  │
│  • Device model and data point abstraction                │
│  • Connection management and reconnection                 │
│  • EventBus for lifecycle / state / diagnostic events     │
│  • Caching (paramset, device descriptions, sessions)      │
└───────────────────────────────────────────────────────────┘
                            │
                            │ communicates with
                            ▼
┌────────────────────────────────────────────────────────────┐
│     CCU3 / OpenCCU / CUxD / CCU-Jack                       │
└────────────────────────────────────────────────────────────┘

CUxD and CCU-Jack use JSON-RPC and receive events via MQTT forwarded by the Home Assistant integration — see CUxD and CCU-Jack for details.

Why Two Projects?

Aspect aiohomematic Homematic(IP) Local
Purpose Python library for Homematic protocol Home Assistant integration
Scope Protocol, devices, data points HA entities, UI, services
Dependencies Standalone (aiohttp; orjson optional) Requires Home Assistant
Reusability Any Python project Home Assistant only
Repository aiohomematic homematicip_local

Benefits of this separation:

  • Reusability: aiohomematic can be used in any Python project, not just Home Assistant
  • Testability: The library can be tested independently without Home Assistant
  • Maintainability: Protocol changes don't affect HA-specific code and vice versa
  • Clear boundaries: Each project has a focused responsibility

How They Work Together

  1. Homematic(IP) Local creates a CentralUnit via aiohomematic's API
  2. aiohomematic connects to the CCU and discovers devices
  3. aiohomematic creates Device, Channel, and DataPoint objects
  4. Homematic(IP) Local wraps these in Home Assistant entities
  5. aiohomematic receives events from the CCU (XML-RPC callbacks or MQTT bridge for CUxD/CCU-Jack) and notifies subscribers via the EventBus
  6. Homematic(IP) Local translates events into Home Assistant state updates

For Home Assistant Users

Use the Home Assistant custom integration Homematic(IP) Local:

  1. From Home Assistant 2026.11 on, open the Home Assistant Marketplace, search for Homematic(IP) Local for OpenCCU and install it. On earlier versions, install HACS and add https://github.com/SukramJ/homematicip_local as a custom repository (category: Integration).
  2. Restart Home Assistant.
  3. Configure the integration under Settings → Devices & Services → Add Integration.

See the Integration Guide for detailed instructions.

For Developers

pip install aiohomematic

Quick Start

import asyncio

from aiohomematic.central import CentralConfig
from aiohomematic.client import InterfaceConfig
from aiohomematic.const import Interface


async def main() -> None:
    config = CentralConfig(
        central_id="ccu-main",
        name="ccu-main",
        host="ccu.local",
        username="admin",
        password="secret",
        interface_configs={
            InterfaceConfig(central_name="ccu-main", interface=Interface.HMIP_RF, port=2010),
        },
    )

    central = await config.create_central()
    await central.start()

    for device in central.devices:
        print(f"{device.name}: {device.address}")

    await central.stop()


asyncio.run(main())

For a more complete example (multiple interfaces, event subscriptions, .env loading) see example.py. For API usage patterns see the Consumer API guide.

Contributing

Requirements

  • Python: 3.14+
  • CCU firmware: CCU3 ≥ 3.61.x recommended; CCU2 ≥ 2.61.x is best-effort (see backend support below)
  • No active testing is performed to identify the minimum required firmware versions — stay on a current release.

Backend Support

  • Primary test targets (continuously tested in CI):
    • OpenCCU with current firmware
    • godevccu (virtual CCU used in the automated test suite)
  • Supported, best-effort (expected to work, not continuously tested):
    • CCU3 with current firmware
    • CUxD (via JSON-RPC)
    • CCU-Jack (via JSON-RPC)
  • Legacy / unsupported:
    • CCU2 — works with recent firmware but is not actively tested

Running outdated firmware or untested backends (CCU2) is at your own risk.

OpenCCU Lite: OpenCCU Lite (a CCU platform without ReGaHSS) is not supported by aiohomematic. Use it with the OpenCCU Loom backend and openccu-loom-client in Homematic(IP) Local instead.

Recommendation: keep your CCU firmware up to date. Outdated versions may lack bug fixes, security patches, and compatibility improvements that this library relies on.

Project Description
Homematic(IP) Local Home Assistant integration built on aiohomematic
godevccu Virtual CCU used as a test target
OpenCCU Loom Go daemon bridging CCUs and OpenCCU Lite; backend for OpenCCU Lite
openccu-loom-client Python client for OpenCCU Loom, alternative to aiohomematic in Homematic(IP) Local
aiohomematic-config Device configuration UI library
openccu-data Configuration metadata (easymodes, translations, profiles)
pyhomematic Predecessor project (no longer actively developed)

Contributing

Contributions are welcome! See the Contributing Guide and the in-repo CLAUDE.md for coding standards and the refactoring checklist.

Development

Parts of aiohomematic are developed with agentic AI assistance, primarily Claude Code. Submitted issues are also triaged and analyzed with agentic help. Every change is still reviewed by a human maintainer and must pass the project's test suite before it lands — AI accelerates the work, it does not replace the review gate.

License

MIT License - see LICENSE for details.

Support

GitHub Sponsors

If you find this project useful, consider sponsoring the development.

Metadata

Release files for aiohomematic 2026.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiohomematic 2026.11.2
File Size Uploaded Provenance Actions
aiohomematic-2026.11.2.tar.gz 601.2 kB With provenance Details for aiohomematic-2026.11.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiohomematic 2026.11.2
File Interpreter ABI Platform Actions
aiohomematic-2026.11.2-py3-none-any.whl Python 3 none any Details for aiohomematic-2026.11.2-py3-none-any.whl

Total release size: 1.3 MB

Release files / aiohomematic-2026.11.2.tar.gz

Download URL aiohomematic-2026.11.2.tar.gz
Size 601.2 kB
Tags Source
SHA-256 checksum
How to use checksums
28b7e5cae41017b2c887ae7ffff3965fab6557531b53eb07f6d885736c4bbf59
BLAKE2b-256 checksum
How to use checksums
43f11537a592b5a6930d7db11381cd30df7a7a691503583b4782b1960f6f9552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / aiohomematic-2026.11.2-py3-none-any.whl

Download URL aiohomematic-2026.11.2-py3-none-any.whl
Size 720.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a8adaf20951a61955bf8ce28313c7185957903444f11691a7f8bf489df5f60b
BLAKE2b-256 checksum
How to use checksums
c835f54db7f22a53f70ca78923a80f059127ac0036de8c707ea5d9dc646e4e43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for aiohomematic 2026.11.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiohomematic-2026.11.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page