Avatar (Fabio Alessandro Locati|Fale)'s blog

KNX with HTTP API

December 29, 2025

After a few years of experimenting, I moved forward with a full electrical system rewiring in my house earlier this year, opting for a KNX-based design.

One of the aspects I really like about KNX is that it is a brand-agnostic protocol, which makes it very easy to find any kind of object compatible with it. Another aspect that KNX has, different from many other options, is that it is it bus based. Being bus-based is a huge pain when you have to install it, but once you have done it, the experience is way better, since there is no perceptible delay, no risk of interference, etc., making the day-to-day experience indistinguishable from a traditionally cabled system.

During my experiments, I tried to connect the KNX bus to the LAN to further automate it. Although I tried various options, I did not like the most well-known ones, like Home Assistant. So, I ended up writing scripts and code snippets that allowed me to fully log KNX bus events, read device states, and send commands to them. In the last few days, I reworked much of the code, making it a usable project that is available on GitHub. In the process, I also wrote an HTTP API server for it, making it much easier to integrate with other tools. The user interface I use for it is OliveTin, which executes shell commands without issues, so it would not be required. However, for future use, it will surely be better this way.

The code is not the cleanest, nor the library API perfect, but I think it is ready enough for a v0.1, so I tagged that, with the intention of futher working on it in the coming months to get relatively soon to a point that I’m happy enough to tag the v1.0, and committing to not break APIs from that moment forward.

At the moment, it’s enough to use it with HTTP APIs, since they are versioned and won’t break.