KNX Integration error : Received DisconnectRequest from tunnelling sever

So a new xknx is contained in HA 2021.12.4 which was released tonight. This might solve some of the described issues, let’s see.
Im looking forward to your feedback.

Sorry, seems we messed up. There are issues finding gateways in 2021.12.4 now

Ok, Gateway scanner (automatic connection) is fixed again in 2021.12.5
Lets see if we found the source for the disconnect problems. Looking forward to your feedbacks.

Hey @farmio, I just installed the latest version available (2021.12.6). So far no issues. :smiley: I’ll keep you posted. Thanks for looking into this!

Best,
Bernd

Hi guys, watching your discussion with interest. I am having the very same problem with my KNX integration. Worked with older version, but now available/not available every 5 seconds. I have just upgraded to 2021.12.6 as described above. No fix!

I have re-installed my KNX configuration now several times and reduced all to one simple switched light for testing. Still no success!

Thanks for the support!
Roland

Hi :wave:!
I recommend to try to set up a HA test installation on a different machine than your production instance with no other integration than KNX (2-3 entities) and see if the issue still persists.
See KNX entities switching constantly from available to unavailable · Issue #59170 · home-assistant/core · GitHub

If it behaves the same way on a clean HA installation we’d need some

  • configuration information
  • installation information (KNX interface etc.)
  • HA debug logs
  • xknx debug logs
  • logs written by your KNX interface
  • possibly a tcpdump of all traffic passing your KNX interface

(I think I’ll save this text as keyboard shortcut :rofl:)

2 Likes

Hi all,

FYI, just a little update from my side: 2021.12.6 is still working smoothly for me.

Best,
Bernd

1 Like

Feedback form my side:

This fixed my problem somehow: Migrating to HA 0.115.x - XKNX

My configuration looks like this now and that was the only way I was able to get it working:

######################
#### KNX IP INTERFACE
######################
knx:
  tunneling:
    host: "192.168.0.2"
    port: 3671
    local_ip: "192.168.0.185"
  state_updater: true
#######################
#### LIGHTS SWITCHED
#######################
## Wardrobe Light
#######################
  light:
    - name: "Wardrobe Light"
      address: "0/1/1"
#     state_address: "0/5/1"
########################
## Master Bedroom Light
########################
    - name: 'Master Bedroom Light'
      address: '0/1/0'
#     state_address: '0/5/0'
      brightness_address: '0/1/9'
#     brightness_state_address: '0/1/99'

But the behavior of the visible knx data point is strange:

When switching on any light it shows:

  • ON for 2 seconds
  • OFF for 2 seconds (unavailable)
  • ON permanently

When switching OFF the same light again all works correctly.

Imho that is the only valid configuration style for knx. I wonder why the old -platform: knx thing even passes the validator :scream:
Did you never get one of

[homeassistant.components.light] The knx platform for the light integration does not support platform setup. Please remove it from your config.
[homeassistant.setup] Unable to prepare setup for platform knx.switch: Unable to set up component.
[homeassistant.setup] Setup failed for knx: Integration failed to initialize.

?

Now remove the whole tunneling and state_updater keys and you have a proper up-to-date config.

Why don’t you use the state_addresses?

If you still get entities turning unavailable you have some kind of connection problem. Scroll up 2 posts to see how to generate decent debug data (omit the test-installation things).

Hi Matthias, thanks for you feedback. Things are getting clearer to me now.

I did the following now:

  • Delete the whole block “tunneling” (as you recommended)
  • Deleted the KNX integration under “configuration”. (I had added this integration before manually, but was never able to get it automatically done…only tunneling)
  • Reboot >>> all works correctly. ALL my lights are switching ON and OFF without intermediated “unavailable” messages.

The integration module KNX (within configuration) has been added automatically now without me manually starting it. I am also able to use the state address in the KNX config file without problems (before this was blocking me).

Conclusion which may will help other dummies like me:

  1. Most of the instructions you can find on the internet in regards of KNX integration HA are outdated and are not working anymore with the latest version of HA.
  2. The correct steps would be:
    • Add only “KNX:” and the lights and sensors to the config file (no tunneling or so…)
    • Do not manually start the KNX integration in the configuration section!
    • Restart and this KNX configuration is added automatically and correctly!
      Please correct me if I am wrong!

Thanks again
Roland

Well there have been some major changes in the last year or two. Just stick to the official documentation and the release notes.

When a knx: key is found and there is no config entry (eg. you deleted it before restart) it will import the connection config - and default to “automatic” when there is no tunneling or routing key.

When there already is a config entry it will use it - no matter if you changed the yaml connection keys. Import happens only if there is no config entry.

Starting the config step manually is ok, but should not be required since it doesn’t work without yaml anyway and then you had the import.

If you are unhappy with the imported connection settings just change them from UI by using the config entries “Configure” button. This will reload the integration (and yaml) when done.

1 Like

Hi,

I have read this thread from start now but didn’t fully understood what the problem or the solution was. I see the same DisconnectRequest messages now in my installation. I have the latest HA update with a 1home Server as a tunnel. I get the message approximetly once every two minutes and as said in the thread, devices becomes unavailable and flows and states in Node-Red becomes messy. Anyone else experiencing this nowadays or can explain to me?

Hi :wave:!
Most issues of this thread are long outdated. You are probably experiencing some complete different issue. I’d recommend to post your config settings, logs (https://www.home-assistant.io/integrations/knx/#logs-for-the-knx-integration) and ETS settings of your interface and a view of your topology. As well as listing other things that use connect to your interface (Nodered or what have you). Maybe in a new thread :wink:

1 Like

Hi!
It’s now solved. I sent my logs and findings to 1home and it turned out they had a different timing set on the UDP communication than default/expected. They are now changing this for the next firmware update. I have got a beta release to test and it works. :slight_smile:

The update will be included in the release following 1.7.0.

1 Like

That’s great news. Thanks for responding.
Do you know what firmware version the fix will be included / the last version it wasn’t? This could be helpful for other users of that device.