Skip to content

Commit 55fc68c

Browse files
authored
Update KNX for xknx 0.16.0 (home-assistant#16079)
1 parent d0eba15 commit 55fc68c

File tree

1 file changed

+82
-45
lines changed

1 file changed

+82
-45
lines changed

source/_integrations/knx.markdown

Lines changed: 82 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ config_file:
8080
description: The path for XKNX configuration file. See [xknx.io](https://xknx.io/configuration) for details
8181
required: false
8282
type: string
83-
rate_limit:
84-
description: Defines the maximum number of telegrams to be sent to the bus per second (range 1-100).
85-
required: false
86-
default: 20
87-
type: integer
8883
individual_address:
8984
description: The KNX individual address that shall be used for routing or if a tunnelling server doesn't assign an IA at connection.
9085
required: false
@@ -100,16 +95,30 @@ multicast_port:
10095
required: false
10196
type: integer
10297
default: 3671
98+
rate_limit:
99+
description: Defines the maximum number of telegrams to be sent to the bus per second (range 1-100).
100+
required: false
101+
default: 20
102+
type: integer
103+
state_updater:
104+
description: The integration will collect the current state of each configured device from the KNX bus to display it correctly within Home Assistant. Set this option to False to prevent this behavior.
105+
required: false
106+
default: true
107+
type: boolean
103108
{% endconfiguration %}
104109

105-
If the auto detection of the KNX/IP device does not work you can specify IP and port of the tunneling device:
110+
## Connection
111+
112+
Under normal conditions no connection configuration should be needed. The integration will auto-detect KNX/IP interfaces and connect to one. This requires multicast communication to work in your environment.
113+
114+
### Tunneling
115+
116+
If you want to connect to a sepcific tunnelling server or if the auto detection of the KNX/IP device does not work the IP or/and port of the tunneling device can be configurated.
106117

107118
```yaml
108119
knx:
109120
tunneling:
110121
host: '192.168.2.23'
111-
port: 3671
112-
local_ip: '192.168.2.109'
113122
```
114123

115124
{% configuration %}
@@ -127,7 +136,9 @@ local_ip:
127136
required: false
128137
{% endconfiguration %}
129138

130-
Explicit connection to a KNX/IP routing device:
139+
### Routing
140+
141+
Explicit connection via KNX/IP routing. This requires multicast communication to work in your environment.
131142

132143
```yaml
133144
knx:
@@ -142,6 +153,8 @@ local_ip:
142153
required: true
143154
{% endconfiguration %}
144155

156+
## Events
157+
145158
```yaml
146159
knx:
147160
fire_event: true
@@ -158,13 +171,16 @@ fire_event_filter:
158171
description: If `fire_event` is set `fire_event_filter` has to be specified. `fire_event_filter` defines a list of patterns for filtering KNX addresses. Only telegrams which match this pattern are sent to the Home Assistant event bus.
159172
required: inclusive
160173
type: [list, string]
161-
state_updater:
162-
description: The integration will collect the current state of each configured device from the KNX bus to display it correctly within Home Assistant. Set this option to False to prevent this behavior.
163-
required: false
164-
default: true
165-
type: boolean
166174
{% endconfiguration %}
167175

176+
Every telegram that matches the filter will be announced on the event bus as a `knx_event` event containing data attributes
177+
178+
- `data` contains the raw payload data (eg. 1 or "[12, 55]").
179+
- `destination` the KNX group address the telegram is sent to as string (eg. "1/2/3).
180+
- `direction` the direction of the telegram as string ("Incoming" / "Outgoing"). Currently only incoming telegrams generate the event.
181+
- `source` the KNX indidividual address of the sender as string (eg. "1.2.3").
182+
- `telegramtype` the APCI service of the telegram. "GroupValueWrite", "GroupValueRead" or "GroupValueResponse" generate a knx_event.
183+
168184
## Services
169185

170186
In order to directly interact with the KNX bus, you can use the following service:
@@ -248,15 +264,12 @@ address:
248264
required: true
249265
{% endconfiguration %}
250266

267+
## Binary Sensor
251268

252-
The `knx` sensor platform allows you to monitor [KNX](https://www.knx.org/) binary sensors.
269+
The `knx` binary sensor platform allows you to monitor [KNX](https://www.knx.org/) binary sensors.
253270

254271
Binary sensors are read-only. To write to the knx-bus configure an exposure [KNX Integration - Expose](/integrations/knx/#exposing-sensor-values-or-time-to-knx-bus).
255272

256-
## Binary Sensor
257-
258-
To use your binary sensors please add the relevant configuration to your top level [KNX Integration](/integrations/knx) configuration key in `configuration.yaml`:
259-
260273
```yaml
261274
knx:
262275
binary_sensor:
@@ -307,7 +320,7 @@ context_timeout:
307320

308321
You can use a built in event in order to trigger an automation (e.g. to switch on a light when a switch was pressed).
309322

310-
Let's pretend you have a binary sensor with the name `Livingroom.Switch` and you want to switch one light on when the button was pressed once and two other lights when the button was pressed twice.
323+
Let's pretend you have a binary sensor with the name `Livingroom.Switch` and you want to switch one light on when the button was pressed once and two other lights when the button was pressed twice. `context_timeout` has to be configured in order for this to work.
311324

312325
```yaml
313326
# Example automation.yaml entry
@@ -681,8 +694,6 @@ The `knx light` integration is used as an interface to control KNX actuators for
681694
- LED controllers
682695
- DALI gateways
683696

684-
### Configuration
685-
686697
To use your KNX light in your installation, add the following lines to your top level [KNX Integration](/integrations/knx) configuration key in `configuration.yaml`:
687698

688699
```yaml
@@ -730,6 +741,46 @@ rgbw_state_address:
730741
description: KNX group address for retrieving the RGBW color of the light. *DPT 251.600*
731742
required: false
732743
type: string
744+
individual_colors:
745+
description: Used when the actuator only supports individual group addresses for colors. When `address` is specified for all 3 (or 4) individual colors the root `address` key can be omitted.
746+
required: false
747+
type: map
748+
keys:
749+
red:
750+
description: Group addresses for the red component.
751+
type: map
752+
required: true
753+
keys:
754+
address:
755+
description: KNX group address to switch the red component. *DPT 1.001*
756+
type: string
757+
required: false
758+
state_address:
759+
description: KNX group address for the state of the red component. *DPT 1.001*
760+
type: string
761+
required: false
762+
brightness_address:
763+
description: KNX group address to set the brightness of the red component. *DPT 5.001*
764+
type: string
765+
required: true
766+
brightness_state_address:
767+
description: KNX group address for the current brightness of the red component. *DPT 5.001*
768+
type: string
769+
required: false
770+
type: string
771+
required: false
772+
green:
773+
description: Group addresses for the green component. Same keys available as for red component above.
774+
type: map
775+
required: true
776+
blue:
777+
description: Group addresses for the blue component. Same keys available as for red component above.
778+
type: map
779+
required: true
780+
white:
781+
description: Group addresses for the white component. Same keys available as for red component above.
782+
type: map
783+
required: false
733784
color_temperature_address:
734785
description: KNX group address for setting the color temperature of the light. *DPT 5.001 or 7.600 based on color_temperature_mode*
735786
required: false
@@ -761,7 +812,7 @@ For switching/light actuators that are only controlled by a single group address
761812

762813
*Note on tunable white:* Home Assistant uses Mireds as the unit for color temperature, whereas KNX typically uses Kelvin. The Kelvin/Mireds relationship is reciprocal, not linear, therefore the color temperature pickers (sliders) in Home Assistant may not align with ones of KNX visualizations. This is the expected behavior.
763814

764-
## Extended configuration example
815+
### Extended configuration examples
765816

766817
```yaml
767818
knx:
@@ -802,11 +853,7 @@ knx:
802853

803854
## Notify
804855

805-
The `knx` notify platform allows you to send notifications to [KNX](https://www.knx.org/) devices.
806-
807-
### Configuration
808-
809-
To use your KNX switch in your installation, add the following lines to your top level [KNX Integration](/integrations/knx) configuration key in `configuration.yaml`:
856+
The `knx` notify platform allows you to send notifications to [KNX](https://www.knx.org/) devices as DPT16 strings.
810857

811858
```yaml
812859
knx:
@@ -825,13 +872,10 @@ name:
825872
required: false
826873
type: string
827874
{% endconfiguration %}
828-
The `knx` scenes platform allows you to trigger [KNX](https://www.knx.org/) scenes.
829875

830876
## Scene
831877

832-
### Configuration
833-
834-
To use your KNX scene in your installation, add the following lines to your top level [KNX Integration](/integrations/knx) configuration key in `configuration.yaml`:
878+
The `knx` scenes platform allows you to trigger [KNX](https://www.knx.org/) scenes. These entities are write-only.
835879

836880
```yaml
837881
# Example configuration.yaml entry
@@ -861,12 +905,7 @@ name:
861905

862906
The `knx` sensor platform allows you to monitor [KNX](https://www.knx.org/) sensors.
863907

864-
Sensors are read-only. To write to the knx-bus configure an exposure [KNX Integration - Expose](/integrations/knx/#exposing-sensor-values-or-time-to-knx-bus).
865-
866-
867-
### Configuration
868-
869-
To use your KNX sensor in your installation, add the following lines to your top level [KNX Integration](/integrations/knx) configuration key in `configuration.yaml`:
908+
Sensors are read-only. To write to the knx-bus configure an exposure [KNX Integration - Expose](/integrations/knx/#exposing-sensor-values-or-time-to-knx-bus) or use the `knx.send` service.
870909

871910
```yaml
872911
# Example configuration.yaml entry
@@ -876,15 +915,15 @@ knx:
876915
state_address: '2/0/0'
877916
```
878917

879-
In order to actively read the sensor data from the bus all 30 seconds you can add the following lines to your `configuration.yaml`:
918+
In order to actively read the sensor data from the bus every 30 minutes you can add the following lines to your `configuration.yaml`:
880919

881920
```yaml
882921
# Example configuration.yaml entry
883922
knx:
884923
sensor:
885924
- name: Heating.Valve1
886925
state_address: '2/0/0'
887-
sync_state: expire 30
926+
sync_state: every 30
888927
```
889928

890929
{% configuration %}
@@ -912,6 +951,8 @@ always_callback:
912951
default: False
913952
{% endconfiguration %}
914953

954+
### Value Types
955+
915956
| KNX DPT | type | size in byte | range | unit |
916957
|--------:|-------------------------------|-------------:|:--------------------------:|----------------|
917958
| 5.001 | percent | 1 | 0 ... 100 | % |
@@ -1052,7 +1093,7 @@ always_callback:
10521093
| 16.000 | string | 14 | | |
10531094
| 17.001 | scene_number | 1 | 1 ... 64 | |
10541095

1055-
### Full example
1096+
### More examples
10561097

10571098
```yaml
10581099
# Example configuration.yaml entry
@@ -1072,10 +1113,6 @@ knx:
10721113

10731114
The `knx` switch platform is used as an interface to switching actuators.
10741115

1075-
### Configuration
1076-
1077-
To use your KNX switch in your installation, add the following lines to your top level [KNX Integration](/integrations/knx) configuration key in `configuration.yaml`:
1078-
10791116
```yaml
10801117
knx:
10811118
switch:

0 commit comments

Comments
 (0)