Zum Inhalt

aiohomematic

PyPI version Python versions License

Moderne async Python-Bibliothek für Homematic- und HomematicIP-Geräte.

aiohomematic bildet die Grundlage der Homematic(IP) Local-Integration für Home Assistant und ermöglicht die lokale Steuerung von Homematic-Geräten ohne Cloud-Abhängigkeit.


Funktionen

  • Async-first: Basiert auf asyncio für nicht-blockierende I/O-Operationen
  • Typsicher: Vollständig typisiert mit strikter mypy-Durchsetzung
  • Automatische Erkennung: Automatische Entity-Erstellung aus Geräte-Parametern
  • Erweiterbar: Benutzerdefinierte Entity-Klassen für gerätespezifische Funktionen
  • Schneller Start: Paramset-Caching für schnelle Initialisierung
  • Multi-Backend: Unterstützt CCU3, CCU2, Homegear und RaspberryMatic

Schnellstart

Installation

pip install aiohomematic

Grundlegende Verwendung

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

async def main():
    # Configure the central unit
    config = CentralConfig(
        name="my-ccu",
        host="192.168.1.100",
        username="Admin",
        password="your-password",
        central_id="my-central",
        interface_configs={
            InterfaceConfig(
                central_name="my-ccu",
                interface=Interface.HMIP_RF,
                port=2010,
            ),
        },
    )

    # Create and start the central
    central = config.create_central()
    await central.start()

    # Access devices
    for address, device in central.devices.items():
        print(f"Device: {device.name} ({address})")

    # Stop the central
    await central.stop()

asyncio.run(main())

Dokumentationsübersicht

Für Benutzer (Home Assistant)

Für Entwickler (Bibliotheksnutzung)

Für Mitwirkende

Unterstützte Geräte

aiohomematic unterstützt eine breite Palette von Homematic- und HomematicIP-Geräten:

Kategorie Beispiele
Klima HmIP-eTRV, HmIP-BWTH, HM-CC-RT-DN
Abdeckung HmIP-BROLL, HmIP-FBL, HM-LC-Bl1
Licht HmIP-BDT, HmIP-BSL, HM-LC-Dim1T
Schloss HmIP-DLD, HM-Sec-Key
Schalter HmIP-PS, HmIP-BSM, HM-LC-Sw1
Sensor HmIP-SRH, HmIP-SWSD, HmIP-SMI
Sirene HmIP-ASIR, HmIP-MP3P

Eine vollständige Liste ist in der Dokumentation der Erweiterungspunkte zu finden.

Zwei Projekte, ein Ökosystem

Diese Dokumentation umfasst zwei verwandte, aber separate Projekte:

Projekt Typ Zweck Repository
aiohomematic Python-Bibliothek Protokollimplementierung, Gerätemodell aiohomematic
Homematic(IP) Local HA-Integration Home Assistant Entities, UI, Services homematicip_local

Welche Dokumentation wird benötigt?

Architekturübersicht

Home Assistant
Homematic(IP) Local Integration    ← HA-spezifisch: Entities, Services, UI
aiohomematic-Bibliothek            ← Eigenständig: Protokoll, Geräte, Ereignisse
CCU3 / OpenCCU / Homegear          ← Backend-Hardware/-Software
Homematic-Geräte                  ← Physische Geräte

Siehe Home Assistant Lebenszyklus für den detaillierten Integrationsablauf.

Lizenz

MIT-Lizenz - siehe LICENSE für Details.