This python script parses a KNX easy configuration and converts it to a HomeAssistant KNX Integration yaml configuration.
HomeAssistant covers, lights and (temperature) sensors are supported.
Next steps / TODOs:
- Improve entity kind parsing (do not use icons?)
- Handle Timer addresses for lights?
- Switches ("inputs") in general, e.g. "Central off"
Use pre-built binary or setup following software/packages on your environment:
- Python >= 3.9 and PATH variable set
- Python requirements:
pip3 install -r requirements.txt
- HomeAssistant setup and KNX integration installed
- connection to Hager TJA670/TJA470 domovea Basic Server/Expert Server configured
python easy2homeassistant.py -i <project-name>.txa -o <output-filename>.yaml
easy2homeassistant.exe -i <project-name>.txa -o <output-filename>.yaml
Flag | Name | Description | Examples |
---|---|---|---|
-i | --input | KNX easy installation export (txa) | easy-project.txa |
-o | --output | HomeAssistant KNX config (yaml) | knx.yaml |
-l | --loglevel | Logging level | defaults to INFO, levels: DEBUG, INFO, WARNING, ERROR, CRITICAL |
- Open your local domovea installation in your browser
- Go to easytool > DETAIL
- Export > Save installation
KNX easy automatically assigns group addresses in a proprietary order. In the installation document (pdf) they are are represented as 3-level and in the installation export as 1-level (decimal) group addresses.
Addresses: 24/4/* (>= 50176)
Also used for status variables
Addresses: 2/4/* (>= 5120)
Alternative addresses: 6/0/* (redefinition, maybe for groups)
Link to sensor: 24/4/*
The lowest group address (2/4/*) is used for the HomeAssistant configuration.
A list of currently supported variables parsed from the easy installation export.
easy installation export name (all languages) | HomeAssistant variable |
---|---|
Up/Down | move_long_address |
Step/Stop | stop_address |
Stop | - |
Position control | position_address |
Slat angle control | angle_address |
Automatism deactivation | - |
Position control status | position_state_address |
Slat angle control status | angle_state_address |
Top position | - |
Bottom position | - |
Automatism deactivation status | - |
easy installation export name (all languages) | HomeAssistant variable |
---|---|
On/Off | address |
Timer | - |
Dim up/down | - |
Dim value | brightness_address |
Automatism deactivation | - |
Automatism deactivation status | - |
On/Off status | state_address |
Dim value status | brightness_state_address |
easy installation export name (all languages) | HomeAssistant variable |
---|---|
Indoor temperature | state_address |
Include generated HomeAssistant configuration to your HomeAssistant installation. Now all entities should show up in the Overview Dashboard. Create your own Dashboards to group your entities.
cover:
- name: "Kitchen blinds"
move_long_address: 5122 # 2/4/2 - Up/Down
stop_address: 5124 # 2/4/5 - Step/Stop
position_address: 5124 # 2/4/4 - Position control
angle_address: 5121 # 2/4/1 - Slat angle control
position_state_address: 50179 # 24/4/3 - Position control status
angle_state_address: 50177 # 24/4/1 - Slat angle control status
#travelling_time_down: 120 # not parsed
#travelling_time_up: 120 # not parsed
# ...
light:
- name: "Living room light dimmable"
address: 5220 # 2/4/100 - On/Off
brightness_address: 5222 # 2/4/102 - Dim value (optional)
state_address: 50262 # 24/4/86 - On/Off status
brightness_state_address: 50261 # 24/4/85 - Dim value status (optional)
# ...
sensor:
- name: "Bathroom"
state_address: 50376 # 24/4/200 - Indoor temperature
type: "temperature"
state_class: "measurement"
# ...
knx: !include knx.yaml