Problems with KNX integration

Hi,

I am new to Home Assistant.

I have installed Home Assistant on a Rasberry Pi 4b (32Bit).
That runs and everything is fine.
After that, I tried to integrate KNX.
I could not find any normal integration like Home Kit oder Phillips Hue etc.
So I started Googleing and found this:

I tried my best, but everytime I download the files and then rebootet the RP the files were gone.
I have even tried to download them into different folders “~” and “/home”, but it didn’t work.

Am I missing a configuration to save not known files?
Or is this even the right way for KNX integration?

And btw, in that documentation mentiont earlierer they said to run the command “hass”. I can’t execute this command. It says allways not found.
Did I miss something?`

Thanks!

Regards
Christopher

Do you have the knx tunneling device (KNX IP Interface or KNX Router IP)?
You can do the integration without XKNX. See the documentation: https://www.home-assistant.io/integrations/knx/

Hi!

I don’t know where you were looking but for me https://www.home-assistant.io/integrations/ is the go-to way to find supported HA integrations.

xknx is the library HA uses to connect to KNX. It will be automatically installed when you configure your knx devices. You do not need to download anything manually. What you found there is a manual to set up a development version of xknx - this is not supported on Hassio (which I assume you are running).

1 Like

Hi,

Thanks to the answers.
I did find this integration site: https://www.home-assistant.io/integrations/knx/
But everytime I copy that code into the configuration.yaml I get this error after reboot:
2020-10-28 00:50:20 ERROR (MainThread) [homeassistant.bootstrap] Failed to parse configuration.yaml: in “/config/configuration.yaml”, line 17, column 18: Unable to read file /config/knx_binary_sensor.yaml… Activating safe mode

I copied this code:

knx:
  binary_sensor: !include knx_binary_sensor.yaml
  switch: !include knx_switch.yaml
  sensor: !include knx_sensor.yaml
  cover: !include knx_cover.yaml
  light: !include knx_light.yaml
  notify: !include knx_notify.yaml
  scene: !include knx_scene.yaml

I am using Gira X1 KNX IP-Gateway.
Do I need tunneling or routing configuration?

Thanks

Neither. Connection type should be found automatically.

You need a “knx_binary_sensor.yaml”…
“!include: …” tells HA to look for the configuration in a different file. So either create it or remove the “!include: …” and write your device configuration directly in configuration.yaml where you pasted these things.
Same for the other platforms (switch, light, etc). See https://www.home-assistant.io/docs/configuration/splitting_configuration/ for more infos about that.

Somewhere at the top of https://www.home-assistant.io/integrations/knx/ are anchor links to every platform (device type). Follow them to get information on how to set up the individual devices.

You have to manually write a configuration for every knx device - mostly defining group addresses. This can not be done automatically or via UI.

Remove the platforms you don’t need. I’d configure one device after another and reload (restart HA) from time to time to see if there were errors introduced in the added configuration.

1 Like

Hi,

ahhhh Thanks for that!

Now I have created a seperate configuration file for binary sensors, that worked
But, I still get an error:
Invalid config for [knx]: [knx] is an invalid option for [knx]. Check: knx->knx->binary_sensor->0->knx. (See /config/configuration.yaml, line 14).

Also I found the KNX Cookbook KNX Cookbook
Here it also says that it automatically finds the KNX IP Interface and that I could check the log if the integration was successful. But I could not find that in my log under “/config/logs”

So I tried it with knx->tunneling and that also didn’t work.
I am a bit confused at the moment.

Here is my code now:

knx:
   tunneling:
      host: 192.168.1.5
      port: 3671
      local_ip: 192.168.1.40

   binary_sensor: !include knx_binary_sensor.yaml

Thanks again

It says it right in the error message (that’s what it is for :wink:). Your configuration is wrong. Probably something is wrongly indented or under a wrong key in your binary_sensor.yaml.
I’d suggest to remove the second yaml file and put your config right in configuration.yaml. You can always split it up later when you got it working. Or have a read on “splitting up your configuration” again.
Start easy. (And remove the hardcoded tunneling ip addresses again :wink:

Did you ever get a solution for that?

I also get:

2023-04-23 19:24:46 ERROR (MainThread) [homeassistant.config] Invalid config for [homeassistant]: [knx] is an invalid option for [homeassistant]. Check: homeassistant->customize->knx. (See /config/configuration.yaml, line 2).

In the manual it is you have to just add :knx to the configuration.yaml, but it is not working.
Do I have a wrong version of HA?
I have 0.65.5

Or probably I have a network problem so HA can not download anything?

HA is running on a docker-image on Qnap NAS.

Thanks for help

Lukas

Is that the version of HA you are running?