External integration - KNX (KNXnet/IP)

Hi everyone!

Here is KNX in Gladys, the home automation bus for professional installations. It goes through a KNXnet/IP interface or router on your local network, without cloud and without ETS.

What it does

  • Your KNX devices, declared by group address, one line per device:

    light; Living Room; switch=1/1/1; state=1/1/2
    
    dimmer; Kitchen; switch=1/2/1; brightness=1/2/3; brightness_state=1/2/4
    
    shutter; Bedroom; move=2/1/1; stop=2/1/2; position=2/1/3; position_state=2/1/4
    
    sensor; Office; temperature=4/1/1; humidity=4/1/2
    
    thermostat; Office; setpoint=5/1/1; temperature=5/1/3; mode=5/1/4
    
    binary; Window; contact=6/1/1
    
  • Supported types: lights, dimmers, shutters, switches, sensors (temperature, humidity, brightness, CO₂, wind, pressure, power, energy…), thermostats with their modes, binary sensors (contact, motion, presence, smoke, leak).

  • Live tracked states: they are read at connection, then tracked on the bus. A wall switch activated is immediately seen in Gladys.

  • A scene trigger „Value received on a group address“, to react to any telegram, including an undeclared push button.

  • A scene action „Send a KNX value“: any address, with 11 data types to choose from.

  • A „KNX Bus“ widget: the last telegrams of the bus. Activate a switch and its address appears: practical to fill the list.

The cool thing

  • KNX energy is published as a meter index: it arrives in Gladys’ Energy screen.
  • Gladys scenes finally control KNX: at sunset, the shutters go down; if the window is open, the heating goes into frost protection.
  • The bus is spared: one command at a time, commands go before reads, and nothing is polled in a loop.

Installation

Gladys 5.1 minimum. It arrives in the store at the next indexer pass. In a hurry? Integrations → Install from GitHub, with the address GitHub - LM1LC3N7/gladys-knx: Gladys Assistant external integration for KNX over KNXnet/IP tunnelling: lights, dimmers, shutters, switches, sensors and thermostats by group address, on your local network. Unofficial, not affiliated with the KNX Association. · GitHub

  1. Give a fixed address to your KNX IP gateway, then enter it in the configuration (port 3671, UDP).
  2. Click on Test the gateway: its name is displayed, then a tunnel opens and closes.
  3. List your devices, save, then add them in Discovery.

Small honest reservations

  • Testers wanted! I don’t have a KNX installation. The protocol was written according to the specification and verified byte by byte on the test frames of xknx, the library used by Home Assistant. But nothing replaces a real gateway.
  • Tunnel mode only: the integration runs in a Docker container where KNX routing multicast does not arrive. A KNX IP router is used in tunnel mode, and it occupies one of the tunnel connections of the gateway.
  • No KNX IP Secure nor ETS project import for now.
  • The direction of the shutters is to be confirmed on a real installation: Gladys counts 100 for open, KNX 0 %. An invert option exists.

Like the previous ones, developed with Claude Code. Independent project, not affiliated with the KNX Association.

Repository: GitHub - LM1LC3N7/gladys-knx: Gladys Assistant external integration for KNX over KNXnet/IP tunnelling: lights, dimmers, shutters, switches, sensors and thermostats by group address, on your local network. Unofficial, not affiliated with the KNX Association. · GitHub

Oh the copycat, lol

Duplicate module removed.

Use this one instead: