Constants and Enums¶
aiohomematic provides several enums and constants for type-safe configuration.
Commonly Used Enums¶
Interface¶
Identifies the communication interface to the backend.
from aiohomematic.const import Interface
# HomematicIP wireless devices
Interface.HMIP_RF
# Classic Homematic wireless devices
Interface.BIDCOS_RF
# Wired devices
Interface.BIDCOS_WIRED
# Virtual devices / Heating groups
Interface.VIRTUAL_DEVICES
# CUxD extension
Interface.CUXD
# CCU-Jack
Interface.CCU_JACK
ParamsetKey¶
Identifies the type of parameter set.
from aiohomematic.const import ParamsetKey
# Runtime values (STATE, LEVEL, etc.)
ParamsetKey.VALUES
# Configuration parameters
ParamsetKey.MASTER
# Link parameters (for direct device links)
ParamsetKey.LINK
CentralState¶
System state of the central unit.
from aiohomematic.const import CentralState
CentralState.STOPPED # Not started
CentralState.STARTING # Initializing
CentralState.RUNNING # All interfaces connected
CentralState.DEGRADED # Some interfaces disconnected
CentralState.RECONNECTING # Attempting reconnection
CentralState.FAILED # Maximum retries exceeded
CentralState.STOPPING # Shutting down
Class Reference¶
aiohomematic.const.Interface ¶
Bases: StrEnum
Enum with Homematic interfaces.
options: show_root_heading: true show_source: false members: false
aiohomematic.const.ParamsetKey ¶
Bases: StrEnum
Enum with paramset keys.
options: show_root_heading: true show_source: false members: false
aiohomematic.const.CentralState ¶
Bases: StrEnum
Central State Machine states for overall system health orchestration.
This enum defines the states for the Central State Machine which orchestrates the overall system state based on individual client states.
State Machine¶
STARTING ──► INITIALIZING ──► RUNNING ◄──► DEGRADED
│ │ │
│ ▼ ▼
│ RECOVERING ◄────┘
│ │
│ ├──► RUNNING (all recovered)
│ ├──► DEGRADED (partial recovery)
│ └──► FAILED (max retries)
│
└──► FAILED (critical init error)
STOPPED ◄── (from any state via stop())
Valid Transitions¶
- STARTING → INITIALIZING, STOPPED
- INITIALIZING → RUNNING, DEGRADED, FAILED, STOPPED
- RUNNING → DEGRADED, RECOVERING, STOPPED
- DEGRADED → RUNNING, RECOVERING, FAILED, STOPPED
- RECOVERING → RUNNING, DEGRADED, FAILED, STOPPED
- FAILED → RECOVERING, STOPPED
- STOPPED → (terminal)
INITIALIZING class-attribute instance-attribute ¶
Clients are being initialized.
RUNNING class-attribute instance-attribute ¶
Normal operation - all clients connected.
DEGRADED class-attribute instance-attribute ¶
Limited operation - at least one client not connected.
RECOVERING class-attribute instance-attribute ¶
Active recovery in progress.
FAILED class-attribute instance-attribute ¶
Critical error - manual intervention required.
options: show_root_heading: true show_source: false members: false