HowTo: GIRA KNX/IP Router

1. Intro
This is a short tutorial on how to install and configure the GIRA KNX/IP Router to be able to connect your OpenHab deployment to the KNX Bus over Internet Protocol (IP).

2. Basics
A KNX IP Router connects the KNX/EIB lines via data networks using IP. It uses the KNXnet/IP standard so that KNX/EIB telegrams can be forwarded to the IP network and also give KNX Bus access from a PC or other data processing device. The KNX/IP router can also be used as an IP data interface for the ETS (Engineering Tool Software from KNX Association).

The main differences between a KNX IP Router and a KNX IP Interface are:

  • Routers can be also used to create an IP Backbone for the KNX System (for area/line coupling)
  • Routers support multiple (4) concurrent connections from a PC/device to the KNX/EIB.
    Note: Some modern IP Interfaces allow more than 1 concurrent connection.

3. The GIRA KNX/IP Router
Manufacturer’s Product ID: 2167 00
Product Webpages: Features & Downloads
Retail Price: ~350 EUR

4. Initial Setup
a. Mount and connect the Router to the external power supply, the IP Network as well as the KNX Bus
`- You need a power supply connection 24…30V DC ±10% for the Router (this model does not have PoE support). This can be either the non-choked output of a KNX/EIB power supply unit (PSU) or another external PSU

  • You need a KNX Bus connection in order to fully configure the Router Apps. Without a KNX Bus connection, you will receive an error message in ETS when you try to download the application to the device (Error Code: “Incompatible BCU version 091A (required: 07B0)”`

b. Upgrade to the latest firmware (version 3.1.3683.0) on the Router
- Use either the Gira Update Tool (easier & preferred) or the Gira Project Assistant and the downloadable firmware file.

c. Open up ETS, import the Product database file (V3.0) and add the Router
- Add both the "KNX/IP Router V3.0.901B30" as well as the "Router Applications V3.0.901A10" products to your project devices.

d. Configure both of the 2 new devices and program (download) their configs via ETS
`- Assign a line address to each of the 2 new devices (their factory defaults are: Router 15.15.0 & Router Apps 15.15.255). These addresses have to be reprogrammed in order to be able to use the Router.

  • To program the Router device, shortly press (<4s) the programming button for the LED to light up red.
  • To program the Router Apps, press the programming button for a long time (>4s) for the LED to light up yellow.
  • (optional) Change the IP Address settings (factory default: DHCP) of the Router and the NTP settings (factory default: UTC+1 TZ and no time function) of the Apps from their Parameter tabs.`

Important Notes:

  • Set the line address of the Router to be of the type: “X.Y.0” (example: 1.1.0) in order for it to act as a line coupler.
  • Do not enable “Reliable Communications” in the settings of the Router Applications

e. (optional) Check the info on the web page of the device by browsing to http://<ipaddress_of_router>

5. OpenHab 2 Setup
Assuming an apt-get installation
a. Using Paper UI, navigate to Extensions -> Bindings and install KNX Binding
b. Edit /etc/openhab2/services/knx.cfg file and set: “type=ROUTER” (no other setting is mandatory)
c. Monitor /var/log/openhab2/openhab.log for KNXnet/IP Routing messages (example: “Established connection to KNX bus on 224.0.23.12:3671 in mode ROUTER.”

Good Luck with the next steps (adding things, items, links, etc) and playing with your KNX devices using OH2 ! :sunglasses:

For further reading on the KNX Binding, see here:

BR,
Angelos
Ps: I will update this small HowTo with more info in the future. Comments are always welcome!
Ps2: Main source of info: Router Manual

5 Likes

Hi

Very useful overview for getting started with KNX!

Do you know if its possible to configure the KNX setup without the ETS software? Or use the demo or lite versions to just configure the devices addresses so that it can all then be accessed by Openhab?

Basically trying to figure out if I could do a home sized KNX setup without having to pay the 1000 euros for the full ETS software package.

Cheers
Mitch

1 Like

(unfortunately) I think not…

The ETS demo license has some limitations (e.g. 20 devices max or something similar… I don’t remember)

I will send you a PM about this.

hi angelos, you are my hero, thanks for tutorial.
can you help me
i have knx router like image ( ip of it is 100.100.100.15)

i connect my raspi( setup openhabian) with that router
so can i config in knx.cfg like that
knx:ip=100.100.100.15 ( the ip op router like image)
knx:type= TUNNEL
knx:busaddr=100.100.100
knx:localIp=100.100.100.20( the ip of my raspi)
knx:serialPort= ??? ( i don’n know to config)

or i must config knx.cfg
knx:ip= 224.0.23.12
knx:type= ROUTER
knx:busaddr=???
knx:localIp=???
knx:serialPort= 3671

Thanks you

Hi @thetrung,

If you are using openHAB 2, your /etc/openhab2/services/knx.cfg should look like:

# KNX gateway IP address
ip=224.0.23.12
# KNX gateway port
port=3671
# KNX IP connection type
type=ROUTER
# Local KNX Binding bus address
busaddr=0.0.0
# Local endpoint
localIp=100.100.100.20
# Ignore local KNX Events
ignorelocalevents=true

The IP subnet that you are using (100.100.100.x) is a strange one (meaning that it is not a private one - see RFC 1918). That’s ok and it will work but I wouldn’t use it.

Good Luck!

thanks you so much.
i follow you but when i check /var/log/openhab2/openhab.log It does not record any events.
then i try again with
knx:ip=192.168.30.15 ( the ip op router like image)
knx:type= TUNNEL
#knx:busaddr=100.100.100 ( i not config here)
knx:localIp=192.168.30.104( the ip of my raspi)
knx:serialPort= 3671
and check /var/log/openhab2/openhab.log it record events when i Click on the button ( it connect via KNX with router)
now i have trouble with KNX-binding 1.19.0 but i will try slove it.
thanks for help
if you have idea with my trouble, i very happy to learn

Don’t use ‘knx:’ in front of the config options.
See my example
Also bus address cannot be 100.100.100. It should be anything from 0.0.0 to 15.15.255 (a free address on the knx bus)

I know this is an old thread, but only to clarify…

A knx bus address is a.b.c where

  • a is 1 (!) to 15
  • b is 0 to 15 and
  • c is 0 to 255

like 0 or 255 in an IP4 address, the 0 in knx bus addresses has a special meaning.

a.b.0 -> this is a line coupler -> up to 15 lines per area
a.0.0 -> this is an area coupler -> up to 15 areas

as a line is restricted to up to 64 bus couplers, you can use up to 3 line repeaters per line, which will have typically the addresses

  • a.b.64
  • a.b.128 and
  • a.b.192

or you could setup the line repeaters to use

  • a.b.1
  • a.b.2
  • a.b.3

but of course, you could use other addresses as well (but that would be an uncommon way).
Each section of knx bus needs it’s own power supply.

dear community,
I tried to get up a working communication using openhab 2.2 and a Gira KNX Ip Router.
The router itself had a fixed IP address (192.168.2.93) and a physical KNX address 1.0.0
I am able to use calimero gui with a direct connection. then i see everything that happens on KNX bus (e.g. Light switch). i did not get it working via openhab 2.2 (running on my local PC)
I setup the knx.cfg with the following values

ip=224.0.23.12
busaddr=1.0.0
type=ROUTER

in the openhab logfile i see
[nx.internal.connection.KNXConnection] - Established connection to KNX bus on 224.0.23.12:3671 in mode ROUTER.

but on the Webui nothing i listed in the “Inbox”, or any other log entry is created.
Could someone give me some hint what i did wrong?
Thanking you very much in advance

Shane

Hi,

Are you using the knx1 or knx2 binding?

With knx1 you will not see anything in the Inbox section of the PaperUI since the binding does not support auto-discovery of nodes. You will have to configure your stuff using config (items) files.

Also: It’s better to open up a new thread for your case since not many people will monitor an old HowTo thread :slight_smile:

thanks for your very fast answer :slight_smile:

I installed the knx binding via paper UI. Its called “binding-knx1 - 1.11.0” therefore i asume its knx1.
does the knx2 binding support auto-discovery of nodes?

Br
Shane

From what I know: not :slight_smile: (you still need to use manually defined things and items with knx2)
I haven’t migrated my setup from knx1 to knx2 yet, so I am not the best to answer this question

No, knx2 does not provide auto discovery. The simple reason is, that knx itself does not provide a mechanism for auto discovery.
There is an advanced knx2 binding in the line, which will provide automatic data copy from knxproj (ETS5). I’m not sure if this will make configuration more easy, though :wink:

In question of IP Router: Did you set localIp to the interface, which is connected to the Gira Router?

# ip=224.0.23.12 this is default
# busaddr=1.0.0 should not be necessary
type=ROUTER
localIp= # ip of your openHAB computer

Please keep in mind, that every value, which was set once through a *.cfg file, will not be unset, even if the whole parameter is deleted from the file. Instead you must use the karaf console:

openhab-cli console (login as openhab, default password is habopen)

openhab > config:edit org.openhab.binding.knx
openhab > property-list
.
.
.
openhab > property-delete busaddr
openhab > config:update

As I already switched to knx2, I don’t know what the output of property-list will be like :wink: but I think you got the point.

1 Like

migration pain level rating (from 0 to 10? … 10 being worst :))

I have 100 items now on KNX1 defined… I am too lazy to reconfigure and define things and items :stuck_out_tongue:

Hehe… :slight_smile:

Well, I have about 160 knx items, all defined through a knx.things file. This was quite a bit of work, but a lot of copy&paste (and slightly change the labels and GAs, I have a well organized GA table…)
After all channels were defined, I used VSCode “Create Items from Channels” to generate the items. Worked pretty well :slight_smile:
So, all in all, I would say Pain level 3 to 4 .

1 Like

it’s stays the same :slight_smile: (pid is org.openhab.knx)

openhab> config:list "(service.pid=org.openhab.knx)"
----------------------------------------------------------------
Pid:            org.openhab.knx
BundleLocation: null
Properties:
   autoReconnectPeriod = 30
   busaddr = 1.2.200
   ignorelocalevents = true
   ip = 224.0.23.12
   localIp = 172.16.13.100
   maxRefreshQueueEntries = 10000
   numberOfThreads = 5
   pause = 50
   readRetries = 3
   scheduledExecutorServiceShutdownTimeoutString = 5
   service.pid = org.openhab.knx
   timeout = 10000
   type = ROUTER
openhab> config:edit org.openhab.knx
openhab> property-list
   autoReconnectPeriod = 30
   busaddr = 1.2.200
   ignorelocalevents = true
   ip = 224.0.23.12
   localIp = 172.16.13.100
   maxRefreshQueueEntries = 10000
   numberOfThreads = 5
   pause = 50
   readRetries = 3
   scheduledExecutorServiceShutdownTimeoutString = 5
   service.pid = org.openhab.knx
   timeout = 10000
   type = ROUTER

This post was flagged by the community and is temporarily hidden.