KNX does not work anymore with my items

System: raspberry openhabian
I have installed the latest Binding KNX 2.3.0
But now the devices under knx do not work anymore:
Her is an example for the items (which have worked for a long time without problems):

Switch Licht_Arbeitszimmer “Lampe Arbeitszimmer” (gF_Licht,gR_AZ)[ “Switchable”] { knx="<2/0/2" }

Switch Steckdose_Arbeitszimmer “Steckdose Arbeitszimmer” (gF_Steckdose,gR_AZ) [ “Switchable”] { knx=“3/0/2” }

You need to read the documentation since you need to migrate your Items to link to the 2.x Channels

See:

  1. https://www.openhab.org/addons/bindings/knx/
  2. KNX1 to KNX2 Migration Steps

Yes I have tried to read it, but i do not know what I have to write into items and things:
E.G. What is localSourceAddr=??
What is Thing device generic [
address=“1.2.3” ???
What I have to write into it?
The examples are not very helpful, as there are compared to 1.1. new expressions which I do not understand.
What does this mean? { channel=“knx:device:bridge:generic:demoSwitch” }

Here you are right… the docs entry needs improvement (see: https://github.com/openhab/openhab2-addons/pull/4115#issuecomment-438153408)

The other questions can be answered if you read (carefully) the 2 links that I provided :stuck_out_tongue:

Thank you for your help.
I have in my ETS:
1.1.4 IP Interface Physical Address 15.15.254
So localSourceAddr=“15.15.254” - is that correct?

I am sorry, but I do not find anything I have to write for:
Thing device generic [
address=“1.2.3”,
Which address number I have to use?

I think the other things I have understood (although I am nearly 70 and my KNX System in my Home is from 1994 it was the first private home in the region - and still works perfectly !)

Which KNX/IP interface are you using? Does it support Routing or Tunneling?

This (Physical Address) PA (15.15.254) is the factory default one for the KNX/IP interface. In theory, you should change (with ETS).

For the localSourceAddr you should set a free PA in your BUS (if using Router) or one from the pool that the Tunneling interface provides (usually they provide up to 4)

This localSourceAddr will “represent” the openHAB system in the KNX Bus

By default, it is set to 0.0.0. Try this for now and see if it works as is.

This is the PA of one of your KNX Actuators (switch, rollershutter, dimmer, etc)

If you have ETS access to it, then you can make it work in OH2 also :slight_smile:

Continuing the discussion from KNX does not work anymore with my items:

Thank you very much for your quick answer.
It is Tunneling with a Siemens interface N148
(in my old formerly working knx.cfg Type=TUNNEL)
Do I have to reboot the openhabian Raspberry after making all the changes?
Do I have to delete the old knx.cfg?

This is the PA of one of your KNX Actuators (I have a lot of actuators which one?)
Up to now I have:

Bridge knx:ip:bridge [
ipAddress=“192.168.178.20”,
portNumber=3671,
localIp=“192.168.178.58”,
type=“TUNNEL”,
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=1,
localSourceAddr=“0,0,0”
// “1.1.4” physikalisch 15.15.254
] {
Thing device generic [
address="?",
fetch=true,
pingInterval=300,
readInterval=3600
] {

   Type switch          : Licht_Arbeitszimmer       "Lampe Arbeitszimmer"           [ ga="<2/0/2" ]
   Type switch          : Steckdose_Arbeitszimmer   "Steckdose Arbeitszimmer"       [ ga="3/0/2" ] 

and in items:
Switch Licht_Arbeitszimmer “Lampe Arbeitszimmer” (gF_Licht,gR_AZ) { channel=“knx:device:bridge:generic:Licht_Arbeitszimmer” }

Switch Steckdose_Arbeitszimmer “Steckdose Arbeitszimmer” (gF_Steckdose,gR_AZ) { channel="knx:device:bridge:generic:Steckdose_Arbeitszim

Ok, it supports up to 4 KNXnet/IP Tunneling connections so you will be fine. What did you use in knx.cfg for the busaddr parameter? (this is the same as the new localSourceAddr and it defaults to 0.0.0 in both KNXv1 as well as KNXv2)

No, you are on the Linux world where uptime is important :slight_smile: No need for reboots. Just service restarts if needed.

Yes. Keep a backup and make sure that you have uninstalled the old KNXv1 binding.

Try this:

Bridge	knx:ip:bridge [
   		ipAddress="192.168.178.20",
   		portNumber=3671,
   		localIp="192.168.178.58",
   		type="TUNNEL",
   		readingPause=50,
   		responseTimeout=10,
   		readRetriesLimit=3,
   		autoReconnectPeriod=1,
   		localSourceAddr="0.0.0" ]
   		{
   			Thing device generic [ address="1.2.3", fetch=true, pingInterval=300, readInterval=0]
   			{
   				Type switch : Channel_1_2_3_1 "Lampe Arbeitszimmer" [ ga="2/0/2" ]
   				Type switch : Channel_1_2_3_2 "Steckdose Arbeitszimmer" [ ga="3/0/2" ] 
   			}
   		}

and items:

Switch Licht_Arbeitszimmer "Lampe Arbeitszimmer" (gF_Licht,gR_AZ) { channel="knx:device:bridge:generic:Channel_1_2_3_1" }
Switch Steckdose_Arbeitszimmer "Steckdose Arbeitszimmer" (gF_Steckdose,gR_AZ) { channel="knx:device:bridge:generic:Channel_1_2_3_2" }

don’t use the same name for the Items and for the Channels. It is better to use different names.

You have to define a Thing (with it’s channels) for each Actuator. Set their PA in the address="1.2.3" of each Thing.

Note: Do you have status GAs also?
In your switch type of Channels you used only 1 (command) GA (2/0/2 and 3/0/2)
If you have status GAs then use them like this:

...
   				Type switch : Channel_1_2_3_1 "Lampe Arbeitszimmer" [ ga="2/0/2+<Status_GA" ]
   				Type switch : Channel_1_2_3_2 "Steckdose Arbeitszimmer" [ ga="3/0/2+<Status_GA" ] 
...

So I have for each actuator e.g. PA 1.1.5 to define all the group addresses which belong to this actuator?
So I have to repeat:
Thing device generic [
address=“1.1.4”, (the physical address in the ETS
fetch=true,
pingInterval=300,
readInterval=3600
] { … switches

Thing device generic [
address=“1.1.7”,
fetch=true,
pingInterval=300,
readInterval=3600
] { …switches
for each actuator?

What if to one PA has more than one actuators? becuase it is a binary exit with four relais.
Kind Regards
bernd

yes, for each Physical device having it’s own PA, you need to define a separate Thing with its channels and put the GAs in the Channels (like in your example)

Question: Why do you need the readInterval ? Your actuators don’t have Status GAs configured?

Explain please. Which relay actuator model do you have?
I don’t think that you can have 2 physical devices (KNX Actuators) sharing the same PA in the KNX Bus.

a) I have some (newer) actuators which have a status GA, some old ones not
I also have other devices like motion detectors (but they are no actuators). Do I have to define the corresponding GA too although they are integrated in group addreses of the actuators?
Some group addresses switch more than one PAs. So I have to define these GAs in all PAs
b) I have e.g. one PA 1.1.5 which has 4 exits - but it is one device

I would not like to have cryptical names for the things (Channel _1_1_3) - so i would prefer to add a “T” to the things compared to the group address like Licht_ArbeitszimmerT (Thing) and Licht_Arbeitszimmer (item). Is that OK?

Then I have a question:
How can I delete the old KNX Binding (which was not installed by PaperUI)

Thank you so much for your help

You can define a “generic” Thing without specifying a PA and list there the Channels and their corresponding GAs.

This means that you will define 1 Thing with 4 Channels

Of course. You can use any naming convention that you want. You can also use the same name for the Channel (not Thing) as for the Item… but you may get confused if you use exactly the same.

See how <Bridge_Name>, <Thing_Name> & <Channel_Name> work below

Bridge	knx:ip:<Bridge_Name> "<Bridge_Label>" [
...
   			Thing device <Thing_Name> "<Thing_Label>" [ address="1.2.3", fetch=true, pingInterval=300, readInterval=0]
   			{
   				Type switch : <Channel_Name> "<Channel_Label>" [ ga="2/0/2" ]
   				Type switch : <Channel_Name> "<Channel_Label>" [ ga="3/0/2" ] 
   			}

In your items, it will look like this:

channel="knx:device:<Bridge_Name>:<Thing_Name>:<Channel_Name>"

This stuff within the double quotes is called the Channel UID (Unique Identifier) and it shows up in PaperUI also

If you installed it manually, remove the *.jar file from /usr/share/openhab2/addons/ and clean Cache & tmp folders
If you installed it using the /etc/openhab2/services/addons.cfg, remove the knx1 entry from the bindings = line
Remove also (after you keep a backup) the /etc/openhab2/services/knx.cfg file

Hello Dim,
I am a little confused now.
But I will first write the Things-File and then send to you.
Can I send the file (not so Big about 10 actuators) to you by mail?
Kind Regards
Bernd

I know… it’s a lot of new stuff to learn with the new KNXv2 binding… but it works fine (better than KNXv1)

You can post your configs here if you would like. Make sure that you enclose the configs in code fences (```) to make them easier to read.

There are many other KNXv2 users here who can also help

What is confusing? Better to clarify in the beginning instead of correcting your KNX.things and KNX.items files later :slight_smile:

Hello Dim,
Everything is always very easy afterwards (after you have understood the principles)

So here is my KNX.things content:
‘’'Bridge knx:ip:bridge [
ipAddress=“192.168.178.20”,
portNumber=3671,
localIp=“192.168.178.58”,
type=“TUNNEL”,
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=1,
localSourceAddr=“0,0,0”

] {
Thing device generic [
address=“1.1.5”,
fetch=true,
pingInterval=300,
readInterval=3600
] {
Type switch : Licht_WohnzimmerT “Licht Wohnzimmer” [ ga=“2/0/0” ]
Type switch : Licht_ArbeitszimmerT “Lampe Arbeitszimmer” [ ga="<2/0/2" ]
Type switch : Steckdose_WohnzimmerT “Steckdose TV Wohnzimmer” [ ga=“3/0/0” ]

}

Thing device generic [
    address="1.1.19",
    fetch=true,
    pingInterval=300,
    readInterval=3600
] {
   Type switch         : Steckdose_EcktischLampeT "Steckdose Lampe Ecktisch"            [ ga="3/0/11+<3/1/11" ]
   Type switch         : Steckdose_EcktischT "Steckdose Ecktisch"                       [ ga="3/0/10+<3/1/11" ]

}

Thing device generic [
    address="1.1.20",
    fetch=true,
    pingInterval=300,
    readInterval=3600
] {
   Type switch          : Steckdose_OkiT             "Oki Drucker"                   [ ga="3/0/4+<3/1/4" ]
   Type switch          : Steckdose_GalerieT         "Licht Bildergalerie"           [ ga="3/0/5+<3/1/5" ]

}
    Thing device generic [
            address="1.1.18",
            fetch=true,
            pingInterval=300,
            readInterval=3600
    ] {
    Type switch         : Steckdose_obenTelefonLinksT "Steckdose am Telefon links"   [ ga="3/0/8" ] 
    Type switch         : Switch Steckdose_obenTelefonRechtsT "SteckdoseTelefonrechts"   [ ga="3/0/9" ]

    }

    Thing device generic [
            address="1.1.14",
            fetch=true,
            pingInterval=300,
            readInterval=3600
    ] {
     Type switch         : Lampe_TerrasseT "Licht an der Terrasse"                        [ ga="1/0/0" ] 
    Type switch         : Lampe_GarageT "Licht an der Garage"                            [ ga="1/0/1" ] 
    Type switch         : Lampe_EingangT "Licht an der Haustür"                          [ ga="1/0/2" ] 
    Type switch         : Lampen_AussenT "Alle Außenlampen"                              [ ga="1/0/4" ] 
    Type switch         : BW_AlarmT      "Bewegungsmelder angeprungen"                    [ ga="1/0/41 ]  

    }

    Thing device generic [
            address="1.1.6",
            fetch=true,
            pingInterval=300,
            readInterval=3600
    ] {
     Type switch         : Steckdose_SchlafzimmerT "Lampe auf Sideboard"                  [ ga="3/0/1" ]
     Type switch          : Steckdose_ArbeitszimmerT   "Steckdose Arbeitszimmer"         [ ga="3/0/2" ]

    }

    Thing device generic [
            address="1.1.3",
            fetch=true,
            pingInterval=300,
            readInterval=3600
    ] {
      Type switch         : Switch Rolladen_SchlafzimmerT "Rolladen im Schlafzimmer"       [ ga="4/0/2" ]
      Type switch         : Rolladen_WohnzimmerT "Rolladen Wohnzimmer"                     [ ga="4/0/0" ]
       Type switch         : Rolladen_KuecheT "Rolladen in der Küche"                       [ ga="4/0/4" ]

    }

    Thing device generic [
            address="1.1.17",
            fetch=true,
            pingInterval=300,
            readInterval=3600
    ] {
      Type switch         : Lampe_SchlafzimmerT "Lampe am Kleiderschrank"                  [ ga="2/0/1" ]

    }

    Thing device generic [
            address="1.1.15",
            fetch=true,
            pingInterval=300,
            readInterval=3600
    ] {
      Type switch         : Steckdose_KellerT "Steckdose Keller (rote Lampe)"               [ ga="0/0/7" ] 

    }

    Thing device generic [
            address="1.1.13",
            fetch=true,
            pingInterval=300,
            readInterval=3600
    ] {
      Type switch         : FlurObenSofaLinksT "FlurObenLinks"               [ ga="3/0/6" ] 
      Type switch         : FlurObenSofaRechtsT "FlurObenRechts"               [ ga="3/0/7" ] 

    }

}
‘’’

and here is an example from the Item-File:
‘’’
Switch Licht_Arbeitszimmer “Lampe Arbeitszimmer” (gF_Licht,gR_AZ) { channel=“knx:device:bridge:generic:Licht_ArbeitszimmerT” }
‘’’
Kind Regards
bernd

I took a quick look and it looks ok. I would use different names for my Things (now you have used the name generic for all of them… I think that it’s going to work but I am not sure)

I will double check it later.

when adding code fences, start (first line) with (```) and end (last line) with (```) (without parenthesis) to enclose properly all the lines.

I see that you added the T to your Channel names. That’s fine and it will work… remember that you are naming a Channel (not a Thing), so you may want to use C instead :slight_smile:

[quote=“BLg, post:16, topic:56714”]

Dear Dim,
I have changed the names to C at the end
Partly Success:
Only one Item ist Working:
This one
Type switch : Licht_ArbeitszimmerC “Lampe Arbeitszimmer” [ ga="<2/0/2" ]

belongs to
‘’’{
Thing device generic [
address=“1.1.5”,
fetch=true,
pingInterval=300,
readInterval=3600
] {
Type switch : Licht_WohnzimmerC “Licht Wohnzimmer” [ ga=“2/0/0” ]
(THIS ONE IS NOT WORKING)
Type switch : Licht_ArbeitszimmerC “Lampe Arbeitszimmer” [ ga="<2/0/2" ]
(THIS ONE IS WORKING)
Type switch : Steckdose_WohnzimmerC “Steckdose TV Wohnzimmer” [ ga=“3/0/0” ]
(THIS ONE IS NOT WORKING)

}''''

But Licht_WohnzimmerC and Steckdose_ArbeitszimmerC do not work.
Very Curious - is there something wrong - may be some special brackets or so.
I have also tried to change the name generic to e.g.PA11105 etc.
But the same result only the light in my home office works.
But nevertheless the first step is made… thank you

By the way I do not find the jar File to delete the KNX 1.
Kind regards
Bernd

REMARK: Now nothing works - there has been suddenly an additional KNX 1.12. in the Bindings (Paper UI) - I have deinstalled it and knx.cfg deleted. If I go to the HABadmin page I do not see knx.things in the configuration . I think the file knx.things is not loaded.

Now I have made the most simple installation with only 1 actor and Group address, but it does not work:
knx.things
‘’'Bridge knx:ip:bridge [
ipAddress=“192.168.178.20”,
portNumber=3671,
localIp=“192.168.178.58”,
type=“TUNNEL”,
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=0,
localSourceAddr=“0.0.0”

] {
Thing device generic [
address=“1.1.1”,
fetch=true,
pingInterval=300,
readInterval=3600
] {
Type switch: Licht_ArbeitszimmerC “Lampe Arbeitszimmer” [ ga="<2/0/2" ]
} ‘’’
My Problem: what to write into address="…
Next
rUebung.items
Switch Licht_Arbeitszimmer “Lampe Arbeitszimmer” <light> (gF_Licht,gR_AZ) { channel=“knx:device:bridge:generic:Licht_ArbeitszimmerC” }

and sitemap
sitemap rUebung label=“Uebung KNX” {
Frame label=“Items” {
Switch item=Licht_Arbeitszimmer
}
}

It does not work.
When I start openhab and take BasicUI there is on the left side of the rUebung-Sitemap (to choose) a grey exclamation mark. Maybe that is a hint that there is something not OK

As you used knx1: what’s your last working knx.cfg?

Please be aware, that each thing must be named unique, you named every thing beneath the bridge as “generic”.
Every channel name has to be unique, but only within the thing. This configuration is correct:

Bridge knx:ip:bridge "My knx/IP Bridge" [  // 'bridge' is the actual name of the bridge
    type="TUNNEL",                         // set mode of IP connection
    ipAddress="192.168.178.20",            // IP of knx/IP Gateway
    localIp="192.168.178.58",              // IP address of openHAB
    autoReconnectPeriod=30                 // please don't set this to 1!
  ] {
    Thing device generic1_1_5 [
        address="1.1.5"
     ] {
        Type switch : ch1 "Licht Wohnzimmer"        [ ga="2/0/0" ]
        Type switch : ch2 "Lampe Arbeitszimmer"     [ ga="<2/0/2" ]
        Type switch : ch3 "Steckdose TV Wohnzimmer" [ ga="3/0/0" ]
     }

    Thing device generic1_1_19 [
        address="1.1.19"
     ] {
        Type switch : ch1 "Steckdose Lampe Ecktisch" [ ga="3/0/11+<3/1/11" ]
        Type switch : ch2 "Steckdose Ecktisch"       [ ga="3/0/10+<3/1/11" ]
     }
}

while this is not:

Bridge knx:ip:bridge "My knx/IP Bridge" [  // 'bridge' is the actual name of the bridge
    type="TUNNEL",                         // set mode of IP connection
    ipAddress="192.168.178.20",            // IP of knx/IP Gateway
    localIp="192.168.178.58",              // IP address of openHAB
    autoReconnectPeriod=30                 // please don't set this to 1
  ] {
    Thing device generic [
        address="1.1.5"
     ] {
        Type switch : Licht_WohnzimmerT     "Licht Wohnzimmer"        [ ga="2/0/0" ]
        Type switch : Licht_ArbeitszimmerT  "Lampe Arbeitszimmer"     [ ga="<2/0/2" ]
        Type switch : Steckdose_WohnzimmerT "Steckdose TV Wohnzimmer" [ ga="3/0/0" ]
     }

    Thing device generic [
        address="1.1.19"
     ] {
        Type switch : Steckdose_EcktischLampeT "Steckdose Lampe Ecktisch" [ ga="3/0/11+<3/1/11" ]
        Type switch : Steckdose_EcktischT      "Steckdose Ecktisch"       [ ga="3/0/10+<3/1/11" ]
     }
}

You have many typos and issues in your configuration, such as Keyword Switch in front of the channel name. Rollershutters have more than one GA! Rollershutters are of type rollershutter and not switch

Please do not set fetch=true or readInterval=3600 without knowing of the consequences.
Please use as few as possible parameters for the first try, so only type, ipAddress and localIp

Please, always use code fences. It’s possible to edit your postings, and there is a preview to see the posting before saving it.

If not using code fences (the correct way), your postings may be forged by discourse (the platform used for this forum), like doubled and single quotes:
‘test’

'test' vs. ‘test’ and
"test" vs. “test”

Every single char in configuration has to be correct, every single or double quote, upper and lower case, order of parameters.
Please use VSCode with openHAB plugin to get code correction. But to be honest, setting up VSCode correct to work with openHAB server and provide error highlightning, is not that easy…

1 Like