KNX Openhab2 -General Configuration

Hi All,

Im fairly new to openhab/2, and Im working through trying to get Alexa to control my KNX installation. I am self taught KNX hobbyist, and have been tweaking my KNX system for the last 10 years. KNX was mainly set up for control of lighting, but over the years it has started to control heating. One of the reasons I have Veissman boiler at home is that they did have KNX gateway to the boiler, even though none of the technical guys in the UK, knew anything about, and I also had get the gateway specially order from Germany.

As people know who are familiar with KNX, KNX is set up using Physical Address of say a switch and actuator (dimmer perhaps) which is linked with a group address. Working through the my ETS project, and writing a KNX.thing file, I am mainly concerned with listing the actuators. However, I was thinking, is this the correct way of doing it, or should I, also list the switches, however, by doing this, will there be conflicts in openhab, as you will sometimes get the same GA listed under the channel definition, but the physical address of that item will different.

Any views or pointers would be good from experienced people. What are most people doing, just listing actuator. Some of my switches however, do have scenes on them, so would it not be easier to add the switch to the knx.thing, and then provide channels for the scenes?

At the moment I am just working through the knx.thing file listing all my actuators and channels. I then have to go onto the next stage which I believe is a KNX.item file, and then a sitemap, I think?

Many thanks

Good morning,

I have a similar background as you, knx was part of my diploma thesis decades ago and when building our house this was a must have then. I taught me knx and ETS on my own, which is not that tricky as it may seem.

First of all you usually model the actors, which gives you the initial “oh” and “ah” when lights suddenly start switching magically :wink:
It does not matter if you have group addresses more than once in your setup, actually this is what I´d expect to be common configuration.
Modeling a thing requires its physical address, the group addresses are assigned to the channels.
These channels then get linked to items, those you can use in scripts and for modelling the UI.
As for your question on modelling the sensors (what you called “switches”, but actually there is no difference between a physical switch that reacts to your touches or e.g. a temperature sensor that acts on temperature changes): I have got some MDT smart “switches” with a display that can be addressed to show messages, so modelling those as an item is a valid design - from an abstract point of view there is no difference between an actor channel in a thing triggering a relay or a “text channel” that triggers displaying the text).
Regarding you UI setup: As an initial setup it is easy to go for sitemaps, you get some quick results there. But I guess you will switch to HabPanel soon, providing you with more sophisticated options and a better look&feel.

I´d recommend you to start small, first a single actor, add one of its channels, link a single item to it and put it into a sitemap. After having a working roundtrip (the “oh” and “ah” when switching in openHAB and seeing the status reflected in the UI and e.g. the bulbs) go for fully modelling the first thing you started with. Then add more and more (often you have multiple actors of the same type, so configuring one completely and then copying will speed things up). I have well structure knx group addresses so this works like a charm.
Think about naming conventions in the beginning, e.g. I´ve named my actor channels like “A_Status”, “A_Switch”, “B_Status” … and have used the location where the result is taking place for the item naming (e.g. “Garage_Front_Light1”). But this is something you are completely free to decide on.

After things are working ( I know you will try after the first light is working…) you can take a look into e.g. the Hue emulation to integrate your lights with Amazon Echo of take a look at OH Cloud connector and the OH Echo skill.

Happy Coding !

Thanks Oggerschummer. Im currently working through all my all my actuators on the ETS software, and writing them in the KNX.thing file, adding channels etc. The annoying point is channel numbering. I have 7 floors in my house and each floor has KNX cabinet for the actuators. The third floor cabinet though does cover third and forth floors. I then started to run out of channel numbers. Basement floor, channel start with 0, first with 1, etc, but then on the third floor, my number system didn’t work, as I got to channel 49, and then needed to add another channel. Can channels be 3 numbers?, either 001 to 999.

It nice to see on paper UI that the actuator is on line, every time I add actuator in KNX.thing file, I log into paper UI to see it on line:smile:. I have managed to control a channel, by link using Paper UI, which Im glad it works. :grin:
In regard KNX actuators, my system is at least 15 years old, and when it was installed the person who programmed the ETS didn’t install status addresses, as there wasn’t a requirement back then. Some of the (merten) switches do change colour (LEDS in the push buttons), to indicate if a light is on in a remote room, but most of them dont as you can see if the light is on, when you are sitting in the room. Some of the old ABB actuators are switch and status combined and don’t have separate parameters for the status feedback.

What confuses me, with openHAB help inks, is that they don’t explain in detail. For instance, I know for alexa the items need tag. If you look at the documentation, it gives you an example of the code, but it doesn’t tell you which part of the code is the ‘tag’ bit.

I have already set up my OH cloud connector, and my amazon link to alexa, I just need to work through the knx.items, and sort out site maps!! Oh dear, Im getting there hopefully, and my SD card doesn’t get chewed up, the raspberrypi!

Many thanks.

my setup is five years old, most of it manufactured by MDT and I already replaced some stuff for more fancy things (like the smart sensors with display).

I do not fully get the problem with the channel numbering, maybe it is just a wording issue.
As the name of the channel in the thing is related to the thing (The channel belongs to the knx device) there should be no issue, you can name them freely as you like.

Or are you talking about the group addresses in ETS ?

Depending on the number of hierarchies you have chosen in ETS (I have 3 levels) those read like x/y/z where I usually start with 1 up to 254 (intentionally leaving 2 addresses blank).

The structure I use is simple:

function/floornumber/uniqueID within floor

The functions are like: 1(Switch), 2(Increas/Decrease relative),9 (Percentage), 10(Switch Status), 11 (Percentage Status), 21(Error) …. actual values differ as you see below.


1/1/1 is the actor channel to switch Light 1 on floor 1
2/1/1 is the status channel for Light 1 on floor 1

You get the logic. This makes copying easy and you do not have to look up which address it is for the different functions when editing - it follows a strict logic.

Especially when creating the things on OH this is helpful. The channels i simply name “A”…“Z” with additions like “A_LOCK” for the device channel that locks channel A.
Example for a thing (stripped down to 3 channels) representing a dim actor located in compartment “UV”:

Thing device Dimmaktor1_1_3 “KNX 1.1.1 MDT Dimmaktor” @ “UV” [
Type dimmer : A “Light Wohnzimmer Mitte” [ switch=“1/1/5+<10/1/5”, position=“9/1/5+<11/1/5”, increaseDecrease=“2/1/5”, frequency=8 ]
Type dimmer : B “Deckenlicht Wohnzimmer Fenster” [ switch=“1/1/6+<10/1/6”, position=“9/1/6+<11/1/6”, increaseDecrease=“2/1/6”, frequency=8 ]
Type dimmer : C “Wandlicht Wohnzimmer” [ switch=“1/1/7+<10/1/7”, position=“9/1/7+<11/1/7”, increaseDecrease=“2/1/7”, frequency=8 ]
Type switch : ZSW “Zentral Schalten” [ ga=“0/1/1”]
Type contact: ERR “Geraetefehler” [ ga=“21/0/2”]

Guess there a many different schemes people use, but for my installation this worked out handy.

As for the items, her an example of the items linked to A,B and C:

Dimmer EG_WZ_Wandlicht “Wandlicht Wohnzimmer” (gWohnzimmer, gLWZ, gLDWZ, gLighting) [ “Lighting” ] {channel=“knx:device:bridge1:Dimmaktor1_1_3:C”}
Dimmer EG_WZ_Deckenlicht_Fenster “Deckenlicht Wohnzimmer Fenster” (gWohnzimmer, gLWZ, gLDWZ, gLighting) [ “Lighting” ] {channel=“knx:device:bridge1:Dimmaktor1_1_3:B”}
Dimmer EG_WZ_Deckenlicht_Mitte “Deckenlicht Wohnzimmer Mitte” (gWohnzimmer, gLWZ, gLDWZ, gLighting) [ “Lighting” ] {channel=“knx:device:bridge1:Dimmaktor1_1_3:A”}

The “Lighting” tag ensures the hue emulation is working and Alexa discovers them.
I can address them saying "Alexa, turn on “Wandlicht Wohnzimmer”, or "Alexa, set “Wandlicht Wohnzimmer to 50 percent”.

Hope this gives you some useful guidance. Everybody does it differently, but this way it works for me.


PS: I do not claim copyright on the typos, feel free to fork and reuse them :wink:


That’s extremely helpful,

This is my KNX.thing file so far:

Bridge knx:ip:INSIDECONTROL “Knx Inside Control Ip Gateway”[
localSourceAddr=“0.0.0” ]
Thing device SW2 “Knx Switch SW2 First Floor” [ address=“1.1.17”, fetch=true, pingInterval=600, readInterval=0 ]
Type switch : Channel_21 “Channel 2.1” [ ga=“0/1/15+<1/1/18” ]
Thing device D3 “Knx Dimmer D6 First Floor” [address=“1.1.32”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_22 “First Floor Bath Lights” [switch=“0/1/12”,position=“0/1/14”,increaseDecrease=“0/1/13”]
Thing device D4 “KNX Dimmer D4 First Floor” [address=“1.1.34”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_23 “Middle Bed Main Lights” [switch=“0/1/0”,position=“0/1/2”,increaseDecrease=“0/1/1”]
Type dimmer: Channel_24 “Channel 2.4” [switch=“0/1/3”,position=“0/1/5”,increaseDecrease=“0/1/4”]
Thing device D5 “Knx Dimmer D5 First Floor” [address=“1.1.35”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_25 “Channel 2.5” [switch=“0/1/6”,position=“0/1/8”,increaseDecrease=“0/1/7”]
Type dimmer: Channel_26 “Channel 2.6” [switch=“0/1/9”,position=“0/1/11”,increaseDecrease=“0/1/10”]
Thing device SW3 “Knx Switch SW3 Second Floor” [address=“1.1.16”, fetch=true, pingInterval=600,readInterval=0 ]
Type switch: Channel_31 “Basin Lights Ensuite Bath” [ga=“0/2/0”]
Type switch: Channel_32 “Second Floor Stair Lights” [ga=“0/2/16”]
Thing device D7 “Knx Dimmer D7 Second Floor” [address=“1.1.37”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_33 “Ensuite Bath Lights” [switch=“0/2/1”,position=“0/2/3”,increaseDecrease=“0/2/2”]
Type dimmer: Channel_34 “Mast Bed Main Lights” [switch=“0/2/4”,position=“0/2/6”,increaseDecrease=“0/2/5”]
Thing device D8 “Knx Dimmer D8 Second Floor” [address=“1.1.36”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_35 “Mast Bed Bed Light RH” [switch=“0/2/7”,position=“0/2/9”,increaseDecrease=“0/2/8”]
Type dimmer: Channel_36 “Mast Bed Bed Light LH” [switch=“0/2/10”,position=“0/2/12”,increaseDecrease=“0/2/11”]
Thing device D9 “Knx Dimmer D9 Second Floor” [address=“1.1.35”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_37 “Mast Bed Bed Light 1” [switch=“0/2/13”,position=“0/2/15”,increaseDecrease=“0/2/14”]
Type dimmer: Channel_38 “Mast Bed Bed Light 2” [switch=“0/2/26”,position=“0/2/30”,increaseDecrease=“0/2/27”]
Thing device SW4 “Knx Switch SW4 Third Floor” [address=“1.1.12”, fetch=true, pingInterval=600,readInterval=0 ]
Type switch: Channel_41 “Kitchen Cabinet Lights”[ga=“0/3/9”]
Type switch: Channel_42 “Kitchen Toilet Lights” [ga=“0/3/10”]
Type switch: Channel_43 “Kitchen Lobby Lights” [ga=“0/3/111”]
Type switch: Channel_44 “Roof Terrace Lights” [ga=“0/6/3”]
Thing device D10 “Knx Dimmer D10 Third Floor” [address=“1.2.10”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_45 “Kitchen Centre Lights”[switch=“0/3/0”,position=“0/3/2”,increaseDecrease=“0/3/1”]
Type dimmer: Channel_46 “Kitchen Door Lights” [switch=“0/3/3”,position=“0/3/5”,increaseDecrease=“0/3/4”]
Thing device D11 “Knx Dimmer D11 Third Floor” [address=“1.2.9”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_47 “Kitchen Window Lights”[switch=“0/3/6”,position=“0/3/8”,increaseDecrease=“0/3/7”]
Type dimmer: Channel_48 “Third Floor Stair Lights” [switch=“0/3/3”,position=“0/3/5”,increaseDecrease=“0/3/4”]
Thing device D12 “Knx Dimmer D12 Third Floor” [address=“1.2.6”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_49 “Lounge Wall Lights 1”[switch=“0/4/0”,position=“0/4/2”,increaseDecrease=“0/4/1”]
Thing device D13 “Knx Dimmer D13 Third Floor” [address=“1.2.5”, fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_50 “Lounge Wall Lights 2”[switch=“0/4/6”,position=“0/4/8”,increaseDecrease=“0/4/7”]
Type dimmer: Channel_51 “Lounge Wall Lights 3”[switch=“0/4/9”,position=“0/4/11”,increaseDecrease=“04/11”]
Thing device D14 “Knx Dimmer D14 Third Floor” [address=“1.2.4”,fetch=true, pingInterval=600,readInterval=0 ]
Type dimmer: Channel_52 “Lounge 5A Lights 1” [switch=“0/4/12”,position=“0/4/14”,increaseDecrease=“0/4/13”]
Type dimmer: Channel_53 “Lounge 5A Lights 2” [switch=“0/4/15”,position=“0/4/17”,increaseDecrease=“0/4/16”]

I have named and listed each actuator, with its PA, and then added channels?

Hi Oggerschummer,

Whats the ‘Frequency=8’ used for?

Take a look here - just search for frequency.