KNX connection Issue with old MTN680329 ver0B

Hello,

I was using OpenRemote since 10 years now and I wanted to try other alternatives for my home integration.

I’ve got a MTN680329 ver0B (I think that can’t use tunneling)
ETS4.

I’ve tried Jeedom for few weeks and I wanted to try HA to see if I would not prefer this one. The problem is that I was not able to set up the connection with the KNX router. I don’t know why. I had also some difficulty to make it work with Jeedom where I will put the setup that make it works:

None of the option I’ve tried allow me to connect my KNX.

HA is new for me.

Any tips that could allow me to make the connection working ?

Thanks in advance

Hello :wave:!

We’d need some more infos about your setup:

  • Which installation method did you choose for HA?
  • On which system?
  • On the same network as your knx router? (Wired or Wifi? Docker NAT, VLAN, VM, etc)
  • Which options did you try? (Show some config!)
  • And what was the resulting outcome? Look for something “knx” or “xknx” related in the logs Open your Home Assistant instance and show your Home Assistant logs.
  • if there is nothing in the logs enable debug logging for xknx Troubleshooting KNX integration

Normally a config like

knx:
  # without further options, only config the entities
  # or set a knx individual address that shall be used for routing
  individual_address: "0.0.4"
  light:
    - name: "First Light"
      address: 1/2/3
    ...

should work fine.
You can also try to manually configure routing, but it should not be necesssary

knx:
  # without further options, only config the entities
  # or set a knx individual address that shall be used for routing
  routing:
  individual_address: "0.0.4"
  light:
    ...

Be aware that whitespace matters in yaml.

Hello,

I will try to give more details. I’ve started from scratch …

I’ve installed :
Home Assistant OS 6.1 from this url:
https://github.com/home-assistant/operating-system/releases/download/6.1/haos_rpi4-64-6.1.img.xz

On a RPi4 (8GB)

Yes both RPi4 and KNX/IP router are on the same network (wired).

I am able to communicate with ETS, open remote and Jeedom (not at the same time ;)) but I could not find the right setting for HA unfortunately.

In the configuration file, I’ve added:

logger:
  default: info
  logs:
    xknx: debug

To activate the logger.

Here is my first trials:

##########

  1. With router mode:

knx:
  routing:
    local_ip: "192.168.0.12"

  ###################
  # KNX switch
  ###################

  light:
    - name: "Kitchen"
      address: "2/0/7"
      state_address: "1/0/23"

I got this from the log:

2021-08-02 17:27:27 INFO (MainThread) [xknx.log] XKNX v0.18.8 starting routing connection to KNX bus.
2021-08-02 17:27:27 DEBUG (MainThread) [xknx.log] Starting Routing from 192.168.0.12 as 15.15.250
2021-08-02 17:27:27 DEBUG (MainThread) [xknx.log] Could not establish connection to KNX/IP network. OSError: [Errno 99] Address not available
2021-08-02 17:27:27 ERROR (MainThread) [homeassistant.setup] Error during setup of component knx

##########
2. I’ve tried by putting the multicasting address:

knx:
  routing:
    local_ip: "224.0.23.12"

  ###################
  # KNX switch
  ###################

  light:
    - name: "Kitchen"
      address: "2/0/7"
      state_address: "1/0/23"

I’ve got this:

2021-08-02 17:33:44 DEBUG (MainThread) [xknx.log] Starting Routing from 224.0.23.12 as 15.15.250
2021-08-02 17:33:44 DEBUG (MainThread) [xknx.log] Could not establish connection to KNX/IP network. OSError: [Errno 99] Address not available
2021-08-02 17:33:44 ERROR (MainThread) [homeassistant.setup] Error during setup of component knx
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 249, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/knx/__init__.py", line 177, in async_setup
    await knx_module.start()
  File "/usr/src/homeassistant/homeassistant/components/knx/__init__.py", line 287, in start
    await self.xknx.start()
  File "/usr/local/lib/python3.9/site-packages/xknx/xknx.py", line 109, in start
    await self.knxip_interface.start()
  File "/usr/local/lib/python3.9/site-packages/xknx/io/knxip_interface.py", line 51, in start
    await self.start_routing(self.connection_config.local_ip)
  File "/usr/local/lib/python3.9/site-packages/xknx/io/knxip_interface.py", line 135, in start_routing
    await self.interface.connect()
  File "/usr/local/lib/python3.9/site-packages/xknx/io/routing.py", line 100, in connect
    raise ex
  File "/usr/local/lib/python3.9/site-packages/xknx/io/routing.py", line 91, in connect
    await self.udpclient.connect()
  File "/usr/local/lib/python3.9/site-packages/xknx/io/udp_client.py", line 191, in connect
    sock = UDPClient.create_multicast_sock(self.local_addr[0], self.remote_addr)
  File "/usr/local/lib/python3.9/site-packages/xknx/io/udp_client.py", line 154, in create_multicast_sock
    sock.setsockopt(
OSError: [Errno 99] Address not available

##########
3. Then I’ve try with the tunneling mode:

knx:
  #routing:
  #local_ip: "224.0.23.12"
  tunneling:
    host: "192.168.0.12"
    port: 3671
    local_ip: "192.168.0.41"

  ###################
  # KNX switch
  ###################

  light:
    - name: "Kitchen"
      address: "2/0/7"
      state_address: "1/0/23"

=> And it works … Don’t get why :thinking:

The only difference with my first trial is that I’ve disconnected the computer where the ETS is running. Can this be linked ?

It seems to be. Because now with ETS I can’t connect directly to the KNX/router; only the multicasting is working …

Thanks :slight_smile:

You seem to mix up local_ip and host ip. local_ip should be the IP address of your raspberry pi. Not the multicast group and certainly not the routers ip address.

Most routers (if not all - i haven’t seen one without yet) also support tunneling connections. But concurrent tunnels are limited - on older models sometimes to 1 - so having ETS connected via tunneling can make a difference for a tunneling connection.
For routing it does not matter - you have a set of different problems, but limited connections isn’t one of them.

That said, have you tried my suggestion from above? local_ip is not required, but optional and I recommend not to define it at all in your configuration - for routing and tunneling alike. Less is more - the ip will be detected automatically, if the IP of your raspberry changes for whatever reason you wouldn’t have to change these settings.
If you don’t define tunneling: or routing: at all it will search for an interface and connect to the first responding via tunneling if available. If no tunneling capable device is found it tries to do a routing connection.
When you add routing: (without any sub-keys) it just starts a routing (multicast) connection.

Thanks for your feedback.
It works like this if I don’t connect the ETS at the same time.

knx:
  tunneling:
    host: "192.168.0.12"
    port: 3671
    local_ip: "192.168.0.41"

the 0.12 is the KNX/IP router.

As it was working with the ETS connected before with OpenRemote or Jeedom I didn’t try without it.

It seems to work fine now.
Let’s see what I can do now :wink:

Thanks again.

If your interface really only supports 1 concurrent connection you should try routing. Otherwise programming devices or using the Busmonitor from ETS could cause connection loss.
Or try to avoid using ETS with tunneling.

Notice I will use ETS only with multicast !
Thanks again for your help.
It’s working now since then :wink:

1 Like