CentralConfig¶
The CentralConfig class defines the configuration for connecting to a Homematic backend.
Overview¶
from aiohomematic.central import CentralConfig
from aiohomematic.client import InterfaceConfig
from aiohomematic.const import Interface
# Simple: Use factory methods
config = CentralConfig.for_ccu(
host="192.168.1.100",
username="Admin",
password="secret",
)
# Advanced: Full configuration
config = CentralConfig(
name="my-ccu",
host="192.168.1.100",
username="Admin",
password="secret",
central_id="unique-id",
interface_configs={
InterfaceConfig(
central_name="my-ccu",
interface=Interface.HMIP_RF,
port=2010,
),
},
)
Class Reference¶
aiohomematic.central.CentralConfig ¶
Bases: BaseModel
Configuration for CentralUnit initialization and behavior.
interface_configs instance-attribute ¶
Set of interface configurations.
client_session class-attribute instance-attribute ¶
Optional aiohttp client session to use.
callback_host class-attribute instance-attribute ¶
Hostname/IP for XML-RPC callback server.
callback_port_xml_rpc class-attribute instance-attribute ¶
Port for XML-RPC callback server.
default_callback_port_xml_rpc class-attribute instance-attribute ¶
Default port for XML-RPC callback if not specified.
delay_new_device_creation class-attribute instance-attribute ¶
Delay creation of new devices.
enable_device_firmware_check class-attribute instance-attribute ¶
Enable periodic device firmware checks.
enable_program_scan class-attribute instance-attribute ¶
Enable scanning of CCU programs.
enable_sysvar_scan class-attribute instance-attribute ¶
Enable scanning of CCU system variables.
ignore_custom_device_definition_models class-attribute instance-attribute ¶
ignore_custom_device_definition_models: frozenset[str] = DEFAULT_IGNORE_CUSTOM_DEVICE_DEFINITION_MODELS
Device models to ignore for custom definitions.
interfaces_requiring_periodic_refresh class-attribute instance-attribute ¶
interfaces_requiring_periodic_refresh: frozenset[Interface] = DEFAULT_INTERFACES_REQUIRING_PERIODIC_REFRESH
Interfaces that need periodic refresh instead of push updates.
json_port class-attribute instance-attribute ¶
Port for JSON-RPC communication.
listen_ip_addr class-attribute instance-attribute ¶
IP address to listen on for callback server.
listen_port_xml_rpc class-attribute instance-attribute ¶
Port to listen on for XML-RPC callback server.
max_read_workers class-attribute instance-attribute ¶
Maximum number of concurrent read workers.
optional_settings class-attribute instance-attribute ¶
Optional feature flags.
program_markers class-attribute instance-attribute ¶
Markers to filter programs.
schedule_timer_config class-attribute instance-attribute ¶
Timer configuration for scheduled tasks.
start_direct class-attribute instance-attribute ¶
Start without XML-RPC server (direct mode).
storage_directory class-attribute instance-attribute ¶
Directory for persistent storage.
storage_factory class-attribute instance-attribute ¶
Optional storage factory for custom storage implementations.
sysvar_markers class-attribute instance-attribute ¶
Markers to filter system variables.
timeout_config class-attribute instance-attribute ¶
Timeout configuration for various operations.
un_ignore_list class-attribute instance-attribute ¶
List of parameters to un-ignore.
use_group_channel_for_cover_state class-attribute instance-attribute ¶
Use group channel for cover state.
verify_tls class-attribute instance-attribute ¶
Verify TLS certificates.
enable_xml_rpc_server property ¶
Return if server and connection checker should be started.
enabled_interface_configs property ¶
Return the interface configs.
requires_xml_rpc_server property ¶
Return if XML-RPC server is required.
session_recorder_randomize_output property writable ¶
Return if session recorder should randomize output.
session_recorder_start property writable ¶
Return if session recorder should start.
session_recorder_start_for_seconds property ¶
Return session recorder start duration in seconds.
for_ccu classmethod ¶
for_ccu(*, host: str, username: str, password: str, name: str = 'ccu', central_id: str | None = None, tls: bool = False, enable_hmip: bool = True, enable_bidcos_rf: bool = True, enable_bidcos_wired: bool = False, enable_virtual_devices: bool = False, **kwargs: Any) -> CentralConfig
Create a CentralConfig preset for CCU3/CCU2 backends.
This factory method simplifies configuration for CCU backends by automatically setting up common interfaces with their default ports.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
host | str | Hostname or IP address of the CCU. | required |
username | str | CCU username for authentication. | required |
password | str | CCU password for authentication. | required |
name | str | Name identifier for the central unit. | 'ccu' |
central_id | str | None | Unique identifier for the central. Auto-generated if not provided. | None |
tls | bool | Enable TLS encryption for connections. | False |
enable_hmip | bool | Enable HomematicIP wireless interface (port 2010/42010). | True |
enable_bidcos_rf | bool | Enable BidCos RF interface (port 2001/42001). | True |
enable_bidcos_wired | bool | Enable BidCos wired interface (port 2000/42000). | False |
enable_virtual_devices | bool | Enable virtual devices interface (port 9292/49292). | False |
**kwargs | Any | Additional arguments passed to CentralConfig constructor. | {} |
Returns:
| Type | Description |
|---|---|
CentralConfig | Configured CentralConfig instance ready for create_central(). |
Example
config = CentralConfig.for_ccu( host="192.168.1.100", username="Admin", password="secret", ) central = await config.create_central()
for_homegear classmethod ¶
for_homegear(*, host: str, username: str, password: str, name: str = 'homegear', central_id: str | None = None, tls: bool = False, port: int | None = None, **kwargs: Any) -> CentralConfig
Create a CentralConfig preset for Homegear backends.
This factory method simplifies configuration for Homegear backends with the BidCos-RF interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
host | str | Hostname or IP address of the Homegear server. | required |
username | str | Homegear username for authentication. | required |
password | str | Homegear password for authentication. | required |
name | str | Name identifier for the central unit. | 'homegear' |
central_id | str | None | Unique identifier for the central. Auto-generated if not provided. | None |
tls | bool | Enable TLS encryption for connections. | False |
port | int | None | Custom port for BidCos-RF interface. Uses default (2001/42001) if not set. | None |
**kwargs | Any | Additional arguments passed to CentralConfig constructor. | {} |
Returns:
| Type | Description |
|---|---|
CentralConfig | Configured CentralConfig instance ready for create_central(). |
Example
config = CentralConfig.for_homegear( host="192.168.1.50", username="homegear", password="secret", ) central = await config.create_central()
model_post_init ¶
Initialize computed private attributes after model creation.
options: show_root_heading: true show_source: false
InterfaceConfig¶
aiohomematic.client.InterfaceConfig ¶
Bases: BaseModel
Configuration for a single Homematic interface connection.
central_name instance-attribute ¶
Name of the central unit this interface belongs to.
interface instance-attribute ¶
The interface type (e.g., HMIP_RF, BIDCOS_RF, CUXD).
port class-attribute instance-attribute ¶
XML-RPC port (required for standard interfaces, ignored for CUxD/CCU-Jack).
remote_path class-attribute instance-attribute ¶
Optional remote path for the interface.
options: show_root_heading: true show_source: false