Knx in Homekit

Tags: #<Tag:0x00007fe05e4d6a98>

(Marco Castellano) #1

Hello everyone and sorry in advance for the banality of my questions, unfortunately I do not know Linux
and I am very new to OpenHab fantastic world, I am a KNX Certificate and a very appassionate in domotic world.
My goal is to integrate my KNX devices in Homekit
I installed openHAB 2.3.0-1, KNXD, on my RB 3 b+ and followed the tutorials to let OH works
Via PaperUI, I created Things starting from KNX BINDING, configured channels of my KNX objects and created Items.
Quite surely, I have a communication problem with my KNX IP router interface (EKINEX EK-BC1-TP with static ip

I can see the ONLINE status in Things menu in Paper UI… but the is no activity to the bus
I used knxtool vbusmonitor1 ip: in terminal without result (Open failed: Connection refused)
I added tags “lighting” to things (I just have lighting in my house) with openHAB REST API
I also tried to connect to HomeKit app, I can see the OH server, but not the things. I also have an error “not supported” under the OH server in Homebridge.
Could someone help me? Where am I wrong?
Thank you for your support!!!


(Angelos) #2

Welcome Marco to OH2 :slight_smile:

Let’s fix one by one the stuff: First, reliable communications to the KNX world.

You mention KNXD and a KNX/IP Router.
You don’t need to use the KNXD since you have a dedicated KNX/IP Router device.
Just configure the KNXv2 binding in OH2 to connect directly to your KNX/IP Router and get rid of KNXD.

I recommend (personal opinion) text based configurations using flat files.

For example:

Bridge	knx:ip:EK-BC1-TP "EKINEX KNX/IP Router" @ "KNX" [
	localSourceAddr="0.0.0" ]
		Thing device Some_Actor_1 "Switch Actuator 1" @ "KNX" [ address="x.y.z", fetch=false, pingInterval=600, readInterval=0 ]
			Type	switch	:	Ch_11		"Channel 1.1"		[ ga="1/0/8+<1/2/8" ]
			Type	switch	:	Ch_12		"Channel 1.2"		[ ga="1/0/9+<1/2/9" ]
			Type	switch	:	Ch_13		"Channel 1.3"		[ ga="1/0/10+<1/2/12" ]
			Type	switch	:	Ch_14		"Channel 1.4"		[ ga="1/0/11+<1/2/11" ]

and a sample /etc/openhab2/items/KNX.items

Switch	P11_Small_LED		"P11 Small LED"		<switch>	(gGF_P11_Living,gGF_Lights,gKNX)	{ channel="knx:device:EK-BC1-TP:Some_Actor_1:Ch_11" }
Switch	P11_Large_LED		"P11 Large LED"		<switch>	(gGF_P11_Living,gGF_Lights,gKNX)	{ channel="knx:device:EK-BC1-TP:Some_Actor_1:Ch_12" }
Switch	P11_Light			"P11 Dining Light"	<switch>	(gGF_P11_Living,gGF_Lights,gKNX)	{ channel="knx:device:EK-BC1-TP:Some_Actor_1:Ch_13" }
Switch	P11_Terrace_Light	"P11 Terrace Light"	<switch>	(gGF_P11_Living,gGF_Lights,gKNX)	{ channel="knx:device:EK-BC1-TP:Some_Actor_1:Ch_14" }

Afterwards, you can tackle Homekit (and it will work :slight_smile: )

Ps: If you don’t want to edit files in Linux, you can invest some time to install Samba in your rPi3b+ and modify files from your windows machine. It may take some time to fix this but the investment will pay off in the long run :slight_smile:

(Marco Castellano) #3

Thank you for your reply,
I made a lot of editing work :man_student: , but the KNX IP Router doesn’t work… :thinking:
This is the things file edited in /etc/openhab2/things/KNX.things

And this is the /etc/openhab2/items/KNX.items
Where do I add the homekit tag? [ switchable ] ?

I have some questions…
In Things, what is the right parameter for this voice?
localIp=“192.168.1.X” is the IP to the RB or IP router?

    localSourceAddr="15.15.0" is it the physical address of the Ekinex interface?

I also tried to reconnect the RB to the Home app on my iPhone, but all I can see is the only RB (“Not supported”, i think it’s due to the fact there is no device connected)

Thank for your patience and help


(Angelos) #4

Wait for completing 1 task (the reliable KNX Comms) and then you can add the tag :slight_smile:
Anyway, to answer your question: tags [ "" ] are applied after the group () and before the binding {}


The (virtual) PA of the RB (of the KNX Binding of OH2 to be more specific)
This is to identify the RB on the KNX Bus so that the KNX Binding can receive info and replies
Use 0.0.0 or another free PA on your KNX Bus
Since you know KNX & ETS: make sure that the telegrams can be routed back & forth from/to the IP world (RB) to/from the KNX Bus on your KNX/IP Router. Check with ETS this and the filter table of the KNX/IP Router.
You can use a dummy App to represent the openHAB2 system in your KNX configuration and link this PA to the GAs that you want (or allow full routing on the KNX/IP Router)


Wait :slight_smile: We will fix this later

Ps: How to use code fences . It makes it easier to read & post logs & configs

(Marco Castellano) #5

Now knx.things sounds like this

Bridge  knx:ip:EK-BC1-TP "EKINEX KNX/IP Router" @ "KNX" [
        localSourceAddr="1.0.50" ]
                Thing device GW90836_1 "1.0.18" @ "KNX" [ address="1.0.18", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_181          "Channel 18.1"          [ ga="1/1/13+<1/1/14" ]
                        Type    switch  :       Ch_182          "Channel 18.2"          [ ga="1/2/15+<1/2/16" ]
                        Type    switch  :       Ch_183          "Channel 18.3"          [ ga="1/2/17+<1/2/18" ]
                        Type    switch  :       Ch_184          "Channel 18.4"          [ ga="1/2/19+<1/2/20" ]
                Thing device GW90836_2 "1.0.19" @ "KNX" [ address="1.0.19", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_191          "Channel 19.1"          [ ga="1/2/27+<1/2/28" ]
                        Type    switch  :       Ch_192          "Channel 19.2"          [ ga="1/2/25+<1/2/26" ]
                        Type    switch  :       Ch_193          "Channel 19.3"          [ ga="1/2/2+<1/2/3" ]
                        Type    switch  :       Ch_194          "Channel 19.4"          [ ga="1/1/21+<1/1/22" ]
                Thing device GW90836_3 "1.0.23" @ "KNX" [ address="1.0.23", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_234          "Channel 23.4"          [ ga="1/1/25+<1/1/25" ]
                Thing device GW90740 "1.0.16" @ "KNX" [ address="1.0.16", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_161          "Channel 16.1"          [ ga="1/0/6+<1/0/7" ]
                        Type    switch  :       Ch_162          "Channel 16.2"          [ ga="1/1/9+<1/1/10" ]
                        Type    switch  :       Ch_163          "Channel 16.3"          [ ga="1/1/11+<1/1/12" ]
                        Type    switch  :       Ch_164          "Channel 16.4"          [ ga="2/0/0+<2/0/1" ]
                Thing device GW90740_2 "1.0.15" @ "KNX" [ address="1.0.15", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_151          "Channel 15.1"          [ ga="1/1/13+<1/1/14" ]
                        Type    switch  :       Ch_152          "Channel 15.2"          [ ga="1/1/5+<1/1/6" ]
                        Type    switch  :       Ch_153          "Channel 15.3"          [ ga="1/1/3+<1/1/4" ]
                        Type    switch  :       Ch_154          "Channel 15.4"          [ ga="1/1/1+<1/1/2" ]
                Thing device GW14796_1 "1.0.34" @ "KNX" [ address="1.0.34", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_341          "Channel 34.1"          [ ga="4/0/2" ]
                Thing device GW10796_1 "1.0.22" @ "KNX" [ address="1.0.22", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_221          "Channel 22.1"          [ ga="1/1/23+<1/1/24" ]
                Thing device GW90836_4 "1.0.30" @ "KNX" [ address="1.0.30", fetch=false, pingInterval=600, readInterval=0 ]
                        Type    switch  :       Ch_301          "Channel 30.1"          [ ga="1/0/0+<1/0/1" ]
                        Type    switch  :       Ch_302          "Channel 30.2"          [ ga="1/0/2+<1/0/3" ]
                        Type    switch  :       Ch_303          "Channel 30.3"          [ ga="1/0/4+<1/0/5" ]

(Angelos) #6

does the Bridge and the Things appear as Online in PaperUI->Configuration->Things?

(Marco Castellano) #7

The bridge is on line, buI saw it even before.
Not seeing things on line, I suppose it doesn’t not communicate
Do I have to try to insert a dummy in ETS?
In ETS I notice that the actuators have the object flag “R” Read only on the state.

(Angelos) #8

correct. something is not working
you can try to reconfigure the KNX/IP Router to allow route for Group Telegrams to see if things improve (and come online). Do this for both options (Bus -> IP and IP -> Bus). If this works, then it’s the filter table and you can go back to filter and use a dummy app.

You can troubleshoot the comms by using ETS in Bus Monitoring diagnostic mode

That’s normal. The status (aka state) object should be R. The switch object should be W.
From OH2, you will control (write) the switch object via the associated GA and read the status object via its associated GA.

(Marco Castellano) #9

I worked on ETS and now every device is ON LINE!!!:partying_face:
I can also switch light!!!
Now the last part… The tags to make Items visible in homekit… the last step!!

Thank you one more time!


I am very happy!

(Marco Castellano) #10

This is my actual knx.items file

/* GW90836_1 */
Switch  Sala Pranzo             "Sala pranzo"           <switch>        (gGF_Sala_da_pranzo,gGF_Lights,gKNX)            [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_1:Ch_181" }
Switch  Bimbi                   "Bimbi"                 <switch>        (gGF_Camera_Bimbi,gGF_Lights,gKNX)              [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_1:Ch_182" }
Switch  Vale                    "Vale"                  <switch>        (gGF_Camera_Vale,gGF_Lights,gKNX)               [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_1:Ch_183" }
Switch  Pianerottolo            "Pianerottolo"          <switch>        (gGF_Ingresso,gGF_Lights,gKNX)                  [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_1:Ch_184" }
/* GW90836_2 */
Switch  Bagno Sopra             "Bagno Sopra"           <switch>        (gGF_Bagno_primo_piano,gGF_Lights,gKNX)         [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_2:Ch_191" }
Switch  Camera Matrimoniale     "Camera Matrimoniale"   <switch>        (gGF_Camera_matrimoniale,gGF_Lights,gKNX)       [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_2:Ch_192" }
Switch  Scala                   "Scala"                 <switch>        (gGF_Ingresso,gGF_Lights,gKNX)                  [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_2:Ch_193" }
Switch  Ingresso                "Ingresso"              <switch>        (gGF_Ingresso,gGF_Lights,gKNX)                  [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_2:Ch_194" }
/* GW90836_3 */
Switch  Caldaia                 "Caldaia"               <switch>        (gGF_Bagno piano terra,gGF_Lights,gKNX)         [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_3:Ch_234" }
/* GW90740_1 */
Switch  Pergola                 "Pergola"               <switch>        (gGF_Esterno,gGF_Lights,gKNX)                   [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_1:Ch_161" }
Switch  Applique Finestra       "Applique Finestra"     <switch>        (gGF_Sala,gGF_Lights,gKNX)                      [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_1:Ch_162" }
Switch  Sopra divano            "Sopra divano"          <switch>        (gGF_Sala,gGF_Lights,gKNX)                      [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_1:Ch_163" }
Switch  Led Sala                "Led Sala"              <switch>        (gGF_SalaGuest,gGF_Lights,gKNX)                 [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_1:Ch_164" }
/* GW90740_2 */
Switch  TV Pranzo               "TV Pranzo"             <switch>        (gGF_Sala_da_pranzo,gGF_Lights,gKNX)            [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_2:Ch_151" }
Switch  Cucina                  "Cucina"                <switch>        (gGF_Cucina,gGF_Lights,gKNX)                    [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_2:Ch_152" }
Switch  Antibagno               "Antibagno"             <switch>        (gGF_Bagno_piano_terra,gGF_Lights,gKNX)         [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_2:Ch_153" }
Switch  Bagno sotto             "Bagno Sotto"           <switch>        (gGF_Bagno_piano_terra,gGF_Lights,gKNX)         [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90740_2:Ch_154" }
/* GW14796_1 */
Switch  Lavatrice               "Lavatrice"             <switch>        (gFF_Bagno_piano_terra,gFF_Lights,gKNX)         [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW14796_1:Ch_341" }
/* GW10796_1 */
Switch  Specchio bagno          "Specchio bagno"        <switch>        (gFF_Bagno_piano_terra,gFF_Lights,gKNX)         [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW10796_1:Ch_221" }
/* GW90836_4 */
Switch  Luce Cani               "Luce Cani"             <switch>        (gFF_Esterno,gFF_Lights,gKNX)                   [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_4:Ch_301" }
Switch  Luci esterne casetta    "Luci esterne casetta"  <switch>        (gFF_Esterno,gFF_Lights,gKNX)                   [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_4:Ch_302" }
Switch  Plafoniere casetta      "Plafoniere casetta"    <switch>        (gFF_Casetta,gFF_Lights,gKNX)                   [ "Switchable" ]        { channel="knx:device:EK-BC1-TP:GW90836_4:Ch_303" }

(Marco Castellano) #11

Pairing with Homekit will not allow to see items in Home app… what’s wrong with the knx.items configuration file?

(Angelos) #12

I don’t use the Homekit addon, but your items file looks good

try to enable debug and check the logs of

(Marco Castellano) #13

My happiness lasted little time.
The items are all visible, as well as things in OH2.
Everything is online and controllable from OH2.
The problem arises from the moment I can not see items in Homekit. :sob:
I think the config file is ok… but if it’s not working with Home app, there’s something wrong.
I’m one step away from the result … and I have no idea what the final problem may be now …

How can I do that? I have no “OSGi console” to clear pairings or launch debug. HELP!
Thanks again for your precious help!!


(Angelos) #14

Check on how to access the console. Post some logs here to see what is going on.

I would suggest that you go through thoroughly and make 100% sure that every step has been performed correctly.

I had Homekit installed in the past and it was working ok for me.

(Marco Castellano) #15

There was some errors in knx.things & knx.items files.
editing them and adding OH2 server with Home app, every object is controllable with Siri!!!
(I have some “bugs” to solve, but everything is OK!!!

Thank you VERY MUCH for your precious help!

After this, I’d like to add IP CAMS and other things in HK with fantastic OpenHab!!!

I hope to hear from you very soon


(Angelos) #16

Have fun Marco! :slight_smile: