Welcome back to the Home Assistant & KNX series! Last time I explained the reasoning behind combining KNX with Home Assistant, and promised to walk through the actual setup. So let’s get into it.

The Hardware Setup

Before Home Assistant can talk to your KNX installation, you need a bridge between the two worlds: a KNX IP interface. Normally, KNX devices communicate over a dedicated twisted-pair bus in a closed network. While KNX also supports other media (like IP or wireless with KNX RF), twisted-pair (TP) is the workhorse for most installations. KNX over IP is primarily used to connect multiple KNX lines or to interface with external systems: in our case Home Assistant.

If you’re thinking about doing this yourself, keep in mind that exposing your KNX bus to IP networks does open a new attack surface that needs to be considered in your threat model. I considered a dedicated network cable between the KNX interface (the part that connects TP to standard IP networks) and my Home Assistant server, but in the end decided against it for practical reasons. Instead, the KNX interface lives in a IoT VLAN with deny by default rules and only the Home Assistant server allowed to connect to it.

We went with a MDT IP Router instead of a simple interface, but both types work. Just be careful to use the correct connection type when setting it up in Home Assistant later on.

Physical Installation

The KNX interface goes into your electrical cabinet, mounted on the DIN rail next to your other KNX components. You’ll need:

  1. Power supply — the interface typically runs on 24V DC from your KNX power supply
  2. Bus connection — connect the red/black KNX bus cables
  3. Ethernet cable — connect it to your network

This step was done by our electrician during the KNX installation.
Before you can setup anything in Home Assistant, the KNX part of your installation needs to be functional. This means at least one KNX device like a switching actuator and a button or sensor needs to be properly installed and programmed. The KNX interface/router should also be programmed already, but this is also a prerequisite for programming your other KNX devices through ETS, so this is probably a given.

KNX programming might sound intimidating if you haven’t done it before, but there are plenty of resources online to get you started. For example this great video series that teaches all the basics you might need.

Connecting Home Assistant

With the hardware in place, it’s time to get Home Assistant talking to KNX.

Please check out the official Home Assistant KNX documentation for the most up-to-date instructions and details. It’s really comprehensive and well written.

Installing the KNX Integration

The KNX integration comes built-in with Home Assistant, so no need to install anything from HACS. Just head to:

  1. SettingsDevices & ServicesAdd Integration
  2. Search for “KNX”
  3. The wizard will guide you through the setup, and probably auto-discover your KNX interface on the network.

See the connection section for more details and the differences between tunneling and routing modes and how to setup secure ore non-secure connections. I recommend the Automatic connection method.

If everything is wired correctly, Home Assistant should connect successfully.

If it doesn’t work immediately, double-check:

  • The IP address is correct and reachable (ping it from Home Assistant)
  • Your firewall isn’t blocking communication between Home Assistant and the KNX interface
  • The KNX interface is properly connected to the bus and powered

Configuration via YAML

While Home Assistant now offers a UI for KNX configuration, I went the YAML route. Why? Because once you have dozens of devices, managing them through YAML becomes much more efficient — especially with some AI assistance to generate the repetitive parts. Additionally, not all device types and features can be fully configured through the UI yet.

You should not need to add any connection details in YAML if you set up the integration through the UI as described above. To make the configuration work bearable, I recommend to install the Visual Studio Code Addon through the Home Assistant Add-on Store. Alternatively, use the Remote SSH VSCode Plugin to edit your configuration files directly on the Home Assistant server.

Adding Your First Device

Let’s start with something simple: a light. In KNX, every device is controlled through group addresses — think of them as message channels that devices listen to and respond on.

For a basic on/off light, you typically need:

  • A switching address (e.g., 1/0/1) to turn it on/off
  • Optionally, a state address (e.g., 1/0/2) to read its current state

Here’s how you’d configure it in configuration.yaml:

knx:  
  light:
    - name: "Living Room Main Light"
      address: "1/0/1"        # Switching address
      state_address: "1/0/2"  # State feedback

Restart Home Assistant (quick YAML reload is good enough), and you should see “Living Room Main Light” appear as a light entity. Try toggling it — if everything is configured correctly, the physical light should respond!

What we’ve accomplished so far

In this part, we covered:

  • What you need to connect Home Assistant to KNX
  • Setting up the KNX IP interface/router
  • Connecting Home Assistant to the KNX bus
  • Adding a simple light device to be controlled from Home Assistant

There is still a lot more to explore to get the most out of your KNX + Home Assistant setup. In the next part, we’ll talk about configuring different device types and I’ll share some tips and tricks to make your setup more manageable and the configuration less tedious.