Strange behavior of KNX binding in OH3.1

, ,

Hi all,

I transferd my knx items and things files to oh3.
These files look as they are working.

With OH2.10 my knx_01_01_002 device is online and working correctly.
(i can give a picture of that becaus i reinstalled my rpi3 with full new os and oh3)

And i get stranger when i create a new thing and items with files. This one is not working.

my tunnel.things file

Bridge knx:ip:tunnel108 "KNX tunnel" @ "Bridge"
[
    ipAddress="192.168.3.100",
    portNumber=3671,
    localIp="192.168.3.103",
    type="TUNNEL",
    readingPause=50,
    responseTimeout=10, 
    readRetriesLimit=3, 
    autoReconnectPeriod=1,
    localSourceAddr="1.1.108"
]
{

}

my knx device.things file

 Thing knx:device:knx0101002 "KNX_01_01_002" (knx:ip:tunnel108) @ "WC"
    [
        address="1.1.2",
        fetch=false,
        pingInterval=300,
        readInterval=3600
    ]
    {
         // bediening
        Type switch     :   sw09    "licht wc (sw09)"                   [ga="0/1/1+<0/1/101"]
        Type switch     :   sw10    "licht boven spiegel (sw10)"        [ga="0/1/2+<0/1/102"]
        Type switch     :   sw11    "ventilator (sw11)"                 [ga="0/1/3+<0/1/103"]
        

        // status terugmelding
        Type switch    :   st09    "status licht wc (st09)"             [ga="0/1/101"]
        Type switch    :   st10    "status licht boven spiegel (st10)"  [ga="0/1/102"]
        Type switch    :   st11    "status ventilator (st11)"           [ga="0/1/103"]
        
    }

my knxdevice.items file

Switch      sw09    "licht wc (sw09) [%s]"                      <button01>    {channel="knx:device:knx0101002:sw09"}
Switch      sw10    "licht boven spiegel (sw10) [%s]"           <button01>    {channel="knx:device:knx0101002:sw10"}
Switch      sw11    "ventilator (sw11) [%s]"                    <button01>    {channel="knx:device:knx0101002:sw11"}

Switch      st09    "status licht wc (st09) [%s]"               <lampgeel>    {channel="knx:device:knx0101002:st09"}
Switch      st10    "status licht boven spiegel (st10) [%s]"    <lampgeel>    {channel="knx:device:knx0101002:st10"}
Switch      st11    "status ventilator (st11) [%s]"             <lampgeel>    {channel="knx:device:knx0101002:st11"}

my new added device.things file

Thing knx:device:knx0101050 "KNX_01_01_050" (knx:ip:tunnel108)  @ "Badkamer beneden"
    [
        address="1.1.50",
        fetch=false,
        pingInterval=300,
        readInterval=3600
    ]
    {
        Type contact    :   lock        "Lock=0 Unlock=1"           [ga="1.017:<0/5/3"]

        Type switch     :   sw100       "sw100 O1"                  [switch="0/5/5+<0/5/6"]
        Type switch     :   st100       "st100 O1"                  [switch="0/5/6"]
        Type contact    :   lock100     "lock100 lock=1 unlock=0"   [ga="1.017:<0/5/7"]
        Type number     :   seconds100  "seconds100"                [ga="13:100:<0/5/8"]
        Type number     :   hours100    "hours100"                  [ga="7:007:<0/5/9"]
        Type number     :   nrsw100     "nr of switches 100"        [ga="12:001:<0/5/25"]
        Type number     :   nrsw100min  "nr of switches 100/min."   [ga="7:001:<0/5/27"]

        Type switch     :   sw101       "sw101 O2"                  [switch="0/5/10+<0/5/11"]
        Type switch     :   st101       "st101 O2"                  [switch="0/5/11"]
        Type contact    :   lock101     "lock101 lock=1 unlock=0"   [ga="1.017:<0/5/12"]
        Type number     :   seconds101  "seconds101"                [ga="13:100:<0/5/13"]
        Type number     :   hours101    "hours101"                  [ga="7:007:<0/5/14"]
        Type number     :   nrsw101     "nr of switches 101"        [ga="12:001:<0/5/28"]
        Type number     :   nrsw101min  "nr of switches 101/min."   [ga="7:001:<0/5/29"]

        Type switch     :   sw102       "sw102 O3"                  [switch="0/5/15+<0/5/16"]
        Type switch     :   st102       "st102 O3"                  [switch="0/5/16"]
        Type contact    :   lock102     "lock102 lock=1 unlock=0"   [ga="1.017:<0/5/17"]
        Type number     :   seconds102  "seconds102"                [ga="13:100:<0/5/18"]
        Type number     :   hours102    "hours102"                  [ga="7:007:<0/5/19"]
        Type number     :   nrsw102     "nr of switches 102"        [ga="12:001:<0/5/29"]
        Type number     :   nrsw102min  "nr of switches 102/min."   [ga="7:001:<0/5/30"]

        Type switch     :   sw103       "sw103 O4"                  [switch="0/5/20+<0/5/21"]
        Type switch     :   st103       "st103 O4"                  [switch="0/5/21"]
        Type contact    :   lock103     "lock103 lock=1 unlock=0"   [ga="1.017:<0/5/22"]
        Type number     :   seconds103  "seconds103"                [ga="13:100:<0/5/23"]
        Type number     :   hours103    "hours103"                  [ga="7:007:<0/5/24"]
        Type number     :   nrsw103     "nr of switches 103"        [ga="12:001:<0/5/31"]
        Type number     :   nrsw103min  "nr of switches 103/min."   [ga="7:001:<0/5/32"]
    }

my new added device.items file

Contact     lock    "Lock module [%s]"      <signalrood>        ["Point"]   {channel="knx:device:knx0101050:lock"}

Switch      sw100       "O1 sw100 [%s]"         <button01>      ["Point"]   {channel="knx:device:knx0101050:sw100"}
Switch      st100       "O1 st100 [%s]"         <lampgeel>      ["Point"]   {channel="knx:device:knx0101050:st100"}
Contact     lock100     "O1 lock 100 [%s]"      <signalrood>    ["Point"]   {channel="knx:device:knx0101050:lock100"}
Number      seconds100  "O1 seconds 100 [%s]"                   ["Point"]   {channel="knx:device:knx0101050:seconds100"}
Number      hours100    "O1 hours 100 [%s]"                     ["Point"]   {channel="knx:device:knx0101050:hours100"}
Number      nrsw100     "O1 nr of sw 100 [%s]"                  ["Point"]   {channel="knx:device:knx0101050:nrsw100"}
Number      nrsw100min  "O1 nr of sw / min 100 [%s]"            ["Point"]   {channel="knx:device:knx0101050:nrsw100min"}

Switch      sw101       "O2 sw101 [%s]"         <button01>      ["Point"]   {channel="knx:device:knx0101050:sw101"}
Switch      st101       "O2 st101 [%s]"         <lampgeel>      ["Point"]   {channel="knx:device:knx0101050:st101"}
Contact     lock101     "O2 lock 101[%s]"       <signalrood>    ["Point"]   {channel="knx:device:knx0101050:lock101"}
Number      seconds101  "O2 seconds 101 [%s]"                   ["Point"]   {channel="knx:device:knx0101050:seconds101"}
Number      hours101    "O2 hours 101 [%s]"                     ["Point"]   {channel="knx:device:knx0101050:hours101"}
Number      nrsw101     "O2 nr of sw 101 [%s]"                  ["Point"]   {channel="knx:device:knx0101050:nrsw101"}
Number      nrsw101min  "O2 nr of sw / min 101 [%s]"            ["Point"]   {channel="knx:device:knx0101050:nrsw101min"}

Switch      sw102       "O3 sw102 [%s]"         <button01>      ["Point"]   {channel="knx:device:knx0101050:sw102"}
Switch      st102       "O3 st102 [%s]"         <lampgeel>      ["Point"]   {channel="knx:device:knx0101050:st102"}
Contact     lock102     "O3 lock 102 [%s]"      <signalrood>    ["Point"]   {channel="knx:device:knx0101050:lock102"}
Number      seconds102  "O3 seconds 102 [%s]"                   ["Point"]   {channel="knx:device:knx0101050:seconds102"}
Number      hours102    "O3 hours 102 [%s]"                     ["Point"]   {channel="knx:device:knx0101050:hours102"}
Number      nrsw102     "O3 nr of sw 102 [%s]"                  ["Point"]   {channel="knx:device:knx0101050:nrsw102"}
Number      nrsw102min  "O3 nr of sw / min 102 [%s]"            ["Point"]   {channel="knx:device:knx0101050:nrsw102min"}

Switch      sw103       "O4 sw103 [%s]"         <button01>      ["Point"]   {channel="knx:device:knx0101050:sw103"}
Switch      st103       "O4 st103 [%s]"         <lampgeel>      ["Point"]   {channel="knx:device:knx0101050:st103"}
Contact     lock103     "O4 lock 103[%s]"       <signalrood>    ["Point"]   {channel="knx:device:knx0101050:lock103"}
Number      seconds103  "O4 seconds 103 [%s]"                   ["Point"]   {channel="knx:device:knx0101050:seconds103"}
Number      hours103    "O4 hours 103 [%s]"                     ["Point"]   {channel="knx:device:knx0101050:hours103"}
Number      nrsw103     "O4 nr of sw 103 [%s]"                  ["Point"]   {channel="knx:device:knx0101050:nrsw103"}
Number      nrsw103min  "O4 nr of sw / min 103 [%s]"            ["Point"]   {channel="knx:device:knx0101050:nrsw103min"}

some one any idea what is going wrong ?

regards
Ronny

have you tried to manually add the knx device with the gui also?
I did first steps of the knx migration today and everything is working fine .

Things - Add - KNX Binding - KNX Device

I’m also using experiencing problems with my KNX:

  1. Using “Weinzierl 730 IP-Interface” in “TUNNEL” mode
  2. Adding the IP-interface in the OH3 GUI leads to an online Bridge
  3. all actuators are “OFFLINE”
  4. fetch won’t work either
  5. I can manually add Channels and they work

Is there something I have to configure in ETS to get “ONLINE” actuators and perhaps “fetch” to work?

Hi Thomas,

Is this setup working with OH2??
I am wondering why you are adding all actuators instead working with one generic device and add all needed GA with Channels?

Hi,

On my rpi3 with oh2.9 is the binding working correctly
I mygrated my rpi3 with new os and start from scratch with oh3 (3.0.0~S2096/ )

When i copy my knx things and items files to oh3 the are working, only the overview says offline

when creathing things and items files from scratch, then i get “error:handler”

when looking to openhab.log i find this error message

2020-12-21 17:49:39.338 [INFO ] [nternal.handler.IPBridgeThingHandler] - autoReconnectPeriod for knx:ip:tunnel108 set to 1s, allowed range is 0 (never) or >30
2020-12-21 17:49:39.419 [ERROR] [t.ide.server.concurrent.WriteRequest] - Error during request: 
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Illegal character in path at index 36: file:///etc/openhab/things/knx_1_1_0 tunnel.things
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331) ~[?:?]
	at java.util.concurrent.CompletableFuture.andTree(CompletableFuture.java:1452) ~[?:?]
	at java.util.concurrent.CompletableFuture.allOf(CompletableFuture.java:2337) ~[?:?]
	at org.eclipse.xtext.ide.server.concurrent.RequestManager.cancel(RequestManager.java:114) ~[?:?]
	at org.eclipse.xtext.ide.server.concurrent.RequestManager.runWrite(RequestManager.java:80) ~[?:?]
	at org.eclipse.xtext.ide.server.LanguageServerImpl.runBuildable(LanguageServerImpl.java:453) ~[?:?]
	at org.eclipse.xtext.ide.server.LanguageServerImpl.didOpen(LanguageServerImpl.java:379) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 36: file:///etc/openhab/things/knx_1_1_0 tunnel.things
	at java.net.URI.create(URI.java:883) ~[?:?]

the knx_1_1_0_tunnel.things file

Bridge knx:ip:tunnel108 "KNX tunnel" @ "Bridge"
[
    ipAddress="192.168.3.100",
    portNumber=3671,
    localIp="192.168.3.103",
    type="TUNNEL",
    readingPause=50,
    responseTimeout=10, 
    readRetriesLimit=3, 
    autoReconnectPeriod=1,
    localSourceAddr="1.1.108"
]
{

}

eror message is not clear wath is the Illegal character in path at index 36

regards
Ronny

autoReconnectPeriod for knx:ip:tunnel108 set to 1s, allowed range is 0 (never) or >30

change auto reconnect to 30.

Hi,

i changed to 30, no difference

i have error on line 9, pos 68 : is spaces ? (i was using latest binding in oh2.10)

2020-12-21 18:01:25.611 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'knx_1_1_50.things' has errors, therefore ignoring it: [9,68]: extraneous input '"Point"' expecting ']'
[9,78]: mismatched input '[' expecting '}'
[9,79]: no viable alternative at input 'ga'
[11,41]: mismatched input '"sw100 O1"' expecting ':'
[11,68]: extraneous input '"Point"' expecting ']'

i removed the spaces

now i get following message

2020-12-22 15:03:51.357 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'knx_1_1_50.things'
2020-12-22 15:10:07.579 [INFO ] [st.core.internal.thing.ThingResource] - Received HTTP PUT request for update at 'things/knx:device:knx0101050' for an unmanaged thing 'knx:device:knx0101050'.

For each knx device i made a separted things file so i keep overview of my hardware in oh3 (oh2.10)
Regards
Ronny

yes, it was, but I use KNX1 binding there, so there is this… :wink:

I hoped to get the “fetch” command up and running and use the auto-discovered channels from there. AND for better checking on issues, so I know where to look for channels and linked items… Better idea?

Hi all,

i found what give the offline:

After reading the definition of bridges and things i changed my thing connection

Before:

Thing knx:device:knx0101002 "KNX_01_01_002" (knx:ip:tunnel108) @ "WC"

change to:

Thing knx:device:tunnel108:knx0101002 "KNX_01_01_002" (knx:ip:tunnel108) @ "WC"

The bridge name has to be insert in the thing defenition, see " Defining Bridges Using Files"

regards
Ronny

Hi all,

In version 3.1.0~20201223075651 it is working

In version 3.1.0~S2100 the are back offline and my items files are not loaded.


something changend or not working anymore ?

regards
Ronny

current installed version : ( 3.1.0~S2102/)

OFFLINE is back

KNX binding is working with following file settings:

Things:

Thing knx:device:tunnel108:knx0101015 "KNX_01_01_015" (knx:ip:tunnel108)  @ "Eetkamer"

    [
        address="1.1.15",
        fetch=false,
        pingInterval=300,
        readInterval=3600
    ]

    {

        // bediening
        Type switch     :   sw21    "sw21 8B"           [ga="0/1/16+<0/1/116"]
        Type switch     :   sw22    "sw22 8AC-9B"       [ga="0/1/17+<0/1/117"]
        Type switch     :   sw23    "sw23 13ABC"        [ga="0/1/18+<0/1/118"]
        Type switch     :   sw24    "sw44 9A"           [ga="0/1/19+<0/1/119"]

        // status terugmelding

        Type switch    :   st21    "st21 8B"            [ga="0/1/116"]
        Type switch    :   st22    "st22 8AC-9B"        [ga="0/1/117"]
        Type switch    :   st23    "st23 13ABC"         [ga="0/1/118"]
        Type switch    :   st24    "st24 9A"            [ga="0/1/119"]

    }

Items:

Switch      sw21    "sw21 8B [%s]"      <button01>  {channel="knx:device:tunnel108:knx0101015:sw21"}
Switch      sw22    "sw22 8AC-9B [%s]"  <button01>  {channel="knx:device:tunnel108:knx0101015:sw22"}
Switch      sw23    "sw23 13ABC [%s]"   <button01>  {channel="knx:device:tunnel108:knx0101015:sw23"}
Switch      sw24    "sw24 9A [%s] 9A"   <button01>  {channel="knx:device:tunnel108:knx0101015:sw24"}
Switch      st21    "st21 8B [%s]"      <lampgeel>  {channel="knx:device:tunnel108:knx0101015:st21"}
Switch      st22    "st22 8AC-9B [%s]"  <lampgeel>  {channel="knx:device:tunnel108:knx0101015:st22"}
Switch      st23    "st23 13ABC [%s]"   <lampgeel>  {channel="knx:device:tunnel108:knx0101015:st23"}
Switch      st24    "st24 9A [%s]"      <lampgeel>  {channel="knx:device:tunnel108:knx0101015:st24"}

When adding thing as equipment to the model, there are extra points generated and the items are not used in the equipment model

is this normal ?

How to get textual files into the model ?

Hi Ronny,

I used ‘relative’ thing names in my config:

Thing knx0101002 "KNX_01_01_002" (knx:ip:tunnel108) @ "WC"

which created the right things for me:

knx:device:tunnel108:knx0101002

Hope this helps,

Klaus