Smart Home openHAB 2 KNX Alexa Speech Recognition

Hinweis: Diese Seite enthält Werbelinks

Smart Home – openHAB 2 KNX Alexa Speech Recognition

In this post I will tell you how to set up a KNX Alexa speech recognition with openHAB 2. You do not have to pay a lot of money like for other KNX products. I will tell you what you need and how to set it up step by step.

You no KNX but a different smart home technology? That is no problem with the Hue Emulation Service you may control or your Z-Wave, Homematic and Zigbee Stuff.

openHAB 2 – KNX Alexa Speech Recognition – Prerequisite

KNX Alexa Speech Recognition – Prerequisite – openHAB 2 Server Set Up

First of all you should follow my post about how to set up a openHAB 2 server. You will find an instruction how to get it running on Windows in the same post. If you pick preferred hardware like a Raspberry Pi you should directly read how to Set Up openHAB 2 on a Raspberry Pi.

KNX Alexa Speech Recognition – Prerequisite – KNX IP Gateway

Of course you will need a KNX installation in your home. If you are lucky and have KNX, you should check if you have a KNX IP Interface or Router installed. If so, you only need to get your IP configuration of the KNX device. I will tell you later in the post how to do that.

You should choose a rooter, if you wan to access your KNX bus with more than one Server. If only openHAB 2 connects to your KNX bus, a IP Interface is all you need.

I have made good  experience with the following KNX Router.

  • Product
  • Photos

Gira 216700 IP Router KNX EIB REG

Last update was on: 15. October 2021 17:12

If you pick a IP Interface. You should go with:

  • Product
  • Photos

ABB Stotz S&J IP-Schnittstelle IPS/S 2.1

Last update was on: 15. October 2021 17:12

If you are not familiar with ETS and programming KNX components, you will need an electrician to install the gateway in your home.

KNX Alexa Speech Recognition – Prerequisite – Amazon Echo

The next gadget you will need is an Amazon Echo Dot or an Amazon Echo. You not need the big version, if you do not want to play music a lot. Even if you pick the dot you may connect via Bluetooth or audio jack to your HiFi Equipment.

  • Product
  • Features
  • Photos

Echo Dot (2nd Generation) - Black

Usually ships in 24 hours & Free shipping
Last update was on: 15. October 2021 17:12

  • Product
  • Features
  • Photos

Amazon Echo - Black

Usually ships in 24 hours & Free shipping
Last update was on: 15. October 2021 17:12

Connect your Amazon Echo to your network and follow the Set-Up Instruction of the Alexa App.

openHAB 2 – KNX Alexa Speech Recognition – Configuration

After setting up the needed hardware and the basic installation of openHAB 2 you are ready to go with your configuration.

KNX Alexa Speech Recognition – Configuration – KNX IP Gateway

As mentioned above you will need the correct parameter in your KNX IP Gateway or get the data from there if you already own a KNX IP Gateway.

If you own a gateway, ask you electrician to send you the configuration of your gateway. Tell him you need the IP Address he configured in your IP Gateway. If you do not have a gateway you can tell your electrician what kind of configuration he should do.

The images down below might differ a bit, because I have an old ABB IPR/S2.1 Router. But it is out of stock most of the time. So pick your device for example from the recommendations above.

First of all he should set the IP Setting so you will have a fixed IP. It does not make sense to use DHCP, because you always want the same address. Go to your Device and click IP Settings (1). Then choose fixed (2)


No you should go to IP address (1). Choose a unique good to remember  IP address for your KNX IP Device (2) e.g. . Put in a Subnet Mask. That should typically be (3). The last Address (Standard Gateway) will be filled with your Router IP (3) e.g.

KNX Alexa Speech Recognition – Configuration – KNX Binding and Configuration

Now you will have to connect your KNX IP Gateway to openHAB 2. First of all go to the PaperUI into the Add Ons. Replace <openHAB_IP> with the IP of your openHAB 2 device.

Scroll down and you will find the KNX Binding (ignore the rectangle around Hue Binding). Click Install on the right side.


After the installation was successful, the item should show a blue circle in front of the binding and the INSTALL will change to UNINSTALL.


If you use Windows, simply go to your configuration folder within the Smart Home Designer and open the services folder. Double Click on knx.cfg to open the file.


Now you have to change some lines to connect openHAB 2 to your KNX Bus. Some guys mentioned, that it should work with simply changing the connection type to type=ROUTER.

But in my set up it did not work. I had to put in the IP address that was configured in the KNX IP Gateway. So you will change the following. Replace <KNX_Gateway_IP> with the KNX IP Gateway address from above:

If you are using openHABian you will have to change an additional line . The Local IP (<openHAB_IP>) will be replaced by your openHAB 2 device IP. So this is only optional, if you do not use openHABian leave the line as is.

KNX Alexa Speech Recognition – Configuration – Hue Emulation Service

Call your Addons again (1). Goto Misc (2) and Install (3) the Hue Emulation Service.


After you have installed the Hue Emulation Service in openHAB 2 go to.

Click the tab IO. You should see a box wit Hue Emulation. Click Configure and now you have to choose “Pairing Enabled”. Do not forget to SAVE.


KNX Alexa Speech Recognition – Configuration – Sitemap and Items

Now you have to configure your items to control your KNX installation by speech. We will pick two simple items. A Switch (on/off) and a Dimmer (Percentage Value, On/Off).

Open your Smart Home Designer and add the following lines in your .items file:

Configuration – Sitemap and Items – Groups

Configuration – Sitemap and Items – Items

The simple Tag [ “Lighting” ] will now lead to recognition in the Hue Emulation Service. Save your .items file.

KNX Alexa Speech Recognition – Configuration – Alexa, discover devices

Now tell say “Alexa, discover devices”. It should identify the two new items. You could also use the Alexa app. Goto Smart Home and click Discover Devices.

Here is one Example, how it should look with your items.


If nothing is discovered, double check your Settings in the Hue Emulation Service by calling this address in your browser.

No you are ready to go and the following examples should work.

  • “Alexa, turn on/off Kitchenlight”
  • “Alexa, set Kitchen Ceiling to 50%”
  • “Alexa, turn off Kitchen Ceiling”

Video is in German, but it will give you an impression.


By loading the video, you agree to YouTube's privacy policy.
Learn more

Load video


This solutions is a lot cheaper than other devices for KNX and you are much more flexible. If you want to get Updates, subscribe to the quarterly Newsletter. If you saved money, spend me a coffee. Thnx!



Thomas has build its own Smarthome in 2010. In 2016 he started a German blog about Smarthome to share his knowledge. 2017  he started consulting customers that needed help setting up their own Smarthome. In 2018 the first German course about cloudless Smarthome was launched at Udemy. This course became one of the top rated Smarthome courses. This Smarthome course is now also available in English.

We will be happy to see your thoughts
  1. […] Smart Home openHAB 2 KNX Alexa Speech Recognition […]

    Leave a reply

    Smarthome Training and Tutorials