KNX Cookbook

Hi all,
I’m looking for some general guidance for integrating knx with home assistant. We will be getting our apartment soon which uses a Gira based knx setup for lights, shutters, floor heating and door communication.
I know I will need an IP interface or router to connect to the knx. We didn’t opt for the Gira X1 at the time because of the cost.
Within the cabinet there is a Gira 2167 00 IP-router, but it seems this is for the door communication system (with video), which is via a Gira G1 control which I am fairly sure is connected by IP, and I think is part of the building IP infrastructure.
Would I still need a Gira X1 or some other IP-interface or router to control our apartment knx, separate from the one already installed in our cabinet for the door comms?
p.s. I already have ETS 6 home in prep for additions down the line.

Hi :wave:!
Gira IP Router is perfectly fine.

The key question is: Can you connect to this building IP network? If yes you will be ok to integrate it with your HA.

:wave: everyone! I am testing KNX using KNX Virtual and wanted to see how the setup and interactions work with HA.

In the HA manual and in this cookbook is talks about a configuration.yaml or knx.yaml file. However, it seems like the latest 2023.10+ that the KNX integration doesn’t require any editing of yaml files. I was able to click a few times within HA and it would successfully connect to my KNX Virtual!

However, when I make an interaction on KNX Virtual it would randomly (read rarely if ever) catch it in the group address monitoring in HA. In ETS Diagnostics monitoring the KNX Bus it would catch every single thing.

I have two questions:

  1. Do I have to use “knx:” and the other manual written yaml device types to get all of my GA/devices to show within HA? I imported my ETS project export file into HA KNX integration screen but it didn’t add any devices or anything (even though I had wall switch, actuator, dimmer and shades/blinds devices on the ETS bus).

  2. Is there any confidence level in doing this utilizing KNX Virtual or are there any known issues, bugs, etc associated with HA integration with KNX using KNX Virtual?

Again I’m trying to learn KNX and HA at the same time without spending the $ on physical equipment hence the reason for KNX Virtual. Any tips is appreciated!

Hi :wave:!

No. Entity creation still requires yaml.

That seems awkward, but given you don’t use a real Knx ip interface there is a chance that this is just Knx virtual experience. Or topology issues.
In proper real world systems communication is quite reliable.

My recommendation would be to get a decent IP interface (Enertex or Weinzierl), a power supply and some actuator and sensor (maybe second hand). If you want to build something you might want to get hands-on experience with wall switches (eg. haptic feeling) and motion sensors anyway.

Thanks farmio.

For the entity creation still requiring yaml, is there some type of tool (pyton script using group addresses to get start, ETS project file import tool, etc) that will get atleast the “bones” of the KNX system before manually editing yaml?

Is best practice at this stage to enable the KNX integration via the UI, and then include a knx.yaml in configuration.yaml and within knx.yaml include the knx: followed by all of the entities?

This is the latest tool I’ve seen knx2hass.yml · GitHub

There are others out there on GitHub too, but I still think the fastest way is to write it manually (with vscode HA plugin) and do some copy&paste then.

1 Like

Agree, this is one time effort, you are sure what you get. And the KNX integration is the most stable you can imagine. I’ve done that 3 years ago and not touched it since.

1 Like

Same here: KNX integration in HA up and running for nearly 5 years now with very little change, rock solid and never acting up.

1 Like

Hello everyone, a question why I get an error when I enter a KNX address greater than 30? Example 32/1/1

Invalid config for [knx]: value '32/0/4' is not a valid KNX group address '<main>/<middle>/<sub>', '<main>/<sub>' or '<free>' (eg.'1/2/3', '9/234', '123'), nor xknx internal address 'i-<string>'. @ data['knx']['switch'][5]['address'][0]. Got '3'. (See ?, line ?).

Hi :wave:!
Because 32/*/* is not a valid Knx group address. The highest possible GA is 31/7/255.

2 Likes

Thanks @farmio, They sold me a logicmachine already configured with all the objects, I asked them if it was possible to change the knx addresses but I would have to redo all the work which is not so cheap… Is there another cheaper way to have HA read the knx addresses 32/ * / * ?

By definition there is no such group address. The bit field in the telegram cannot encode such addresses.

If you logic machine is using those addresses its either faulty or lying to you. Could you record some telegrams and double-check what is happening on a low-level?

@kbabioch They only provided me with the virtual addresses, I have nothing else


I guess these are addresses used only internally in this device (“virtual”) - like we have our “i-”-addresses in HA Knx.

@farmio So there is no other way to communicate with these virtual addresses?

Not via Knx. Maybe the device provides a different API for that, I don’t know.

@farmio If I buy another knx IP router device could I solve the problem? This device should detect virtual KNX addresses and transform them into normal KNX addresses. Could this work? If so, which Microsoft device do you recommend? Thank you

If you logicmachine can do that, then you are fine. Just use the transformed normal addresses then.

@stepsolar: You are providing essentially no details on what your up to and what devices you are dealing with.

There is no such thing a “virtual” KNX addresses. Whatever the vendor is doing/referring to, it’s not standardized by KNX and hence not supported the KNX integration of Home Assistant.