KNXD uses 6720 per default. Strange thing.
I switched back to using the IP Interface from MDT. Although i have a similar problem there since i switched to the knx2 binding of OH. It also stops working but with a different error.
Worked with the knx1 binding before without problems
Will update here with the new error.
Similar problem when using the Remote MDT interface.
2018-06-27 22:04:43.675 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is disconnecting from the KNX bus
2018-06-27 22:04:43.688 [DEBUG] [nx.internal.client.AbstractKNXClient] - The KNX network link was detached from the process communicator
2018-06-27 22:04:43.706 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is connecting to the KNX bus
2018-06-27 22:04:43.715 [DEBUG] [binding.knx.internal.client.IPClient] - Establishing connection to KNX bus on 192.168.188.29:3671 in mode TUNNEL.
2018-06-27 22:04:43.746 [ERROR] [net/IP Tunneling 192.168.188.29:3671] - establishing connection failed, null
2018-06-27 22:04:43.760 [DEBUG] [nx.internal.client.AbstractKNXClient] - Error connecting to the bus: null
java.lang.InterruptedException: null
at java.lang.Object.wait(Native Method) ~[?:?]
at tuwien.auto.calimero.knxnetip.ConnectionBase.waitForStateChange(ConnectionBase.java:541) ~[?:?]
at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:190) ~[?:?]
at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.<init>(KNXnetIPTunnel.java:159) ~[?:?]
at org.openhab.binding.knx.internal.client.IPClient.getConnection(IPClient.java:107) ~[?:?]
at org.openhab.binding.knx.internal.client.IPClient.createKNXNetworkLinkIP(IPClient.java:90) ~[?:?]
at org.openhab.binding.knx.internal.client.IPClient.establishConnection(IPClient.java:77) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.connect(AbstractKNXClient.java:178) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.connectIfNotAutomatic(AbstractKNXClient.java:164) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.readNextQueuedDatapoint(AbstractKNXClient.java:272) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.lambda$1(AbstractKNXClient.java:199) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
2018-06-27 22:04:43.991 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is disconnecting from the KNX bus
Stopping and restarting the KNX bundle solves the problem. For some hours at least.
The old knx1 binding worked with this hardware and gateway setup without problems.
I don’t know what could be wrong…configs look good
It could be a bug with the binding, it could be a comms issue…
Double check networking stuff between the OH2 host and the MDT interface (swap UTP cables, Ports on the Switch, ethernet card on the host, go direct for testing if possible). What hardware are you running OH2 on? (rPi or something else?).
Can you test the KNX2 binding connectivity on another host running OH2 ?
Try to enable TRACE on the tuwien.auto.calimero also to see if anything interesting comes up.
Hardware is the same as with OH2 and knx1 (beaglebone connected to GBIT Switch).
With knx1 it just worked.
2018-06-29 21:02:29.078 [DEBUG] [nx.internal.client.AbstractKNXClient] - The KNX network link was detached from the process communicator
2018-06-29 21:02:29.081 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:MDT is disconnecting from the KNX bus
2018-06-29 21:02:29.095 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:MDT is connecting to the KNX bus
2018-06-29 21:02:29.292 [DEBUG] [binding.knx.internal.client.IPClient] - Establishing connection to KNX bus on 192.168.188.29:3671 in mode TU
NNEL.
2018-06-29 21:02:29.085 [DEBUG] [.knx.handler.AbstractKNXThingHandler] - An error occurred while testing the reachability of a thing 'knx:dev
ice:MDT:ug_sa1'
tuwien.auto.calimero.link.KNXLinkClosedException: link closed
at tuwien.auto.calimero.link.AbstractLink.send(AbstractLink.java:348) ~[?:?]
at tuwien.auto.calimero.link.KNXNetworkLinkIP.sendRequestWait(KNXNetworkLinkIP.java:222) ~[?:?]
at tuwien.auto.calimero.mgmt.TransportLayerImpl.sendData(TransportLayerImpl.java:372) ~[?:?]
at tuwien.auto.calimero.mgmt.ManagementClientImpl.send(ManagementClientImpl.java:797) ~[?:?]
at tuwien.auto.calimero.mgmt.ManagementClientImpl.sendWait2(ManagementClientImpl.java:824) ~[?:?]
at tuwien.auto.calimero.mgmt.ManagementClientImpl.readDeviceDesc(ManagementClientImpl.java:447) ~[?:?]
at tuwien.auto.calimero.mgmt.ManagementProceduresImpl.isAddressOccupied(ManagementProceduresImpl.java:310) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.isReachable(AbstractKNXClient.java:338) ~[?:?]
at org.openhab.binding.knx.handler.AbstractKNXThingHandler.pollDeviceStatus(AbstractKNXThingHandler.java:144) ~[?:?]
at org.openhab.binding.knx.handler.AbstractKNXThingHandler.lambda$1(AbstractKNXThingHandler.java:184) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
2018-06-29 21:02:29.334 [ERROR] [net/IP Tunneling 192.168.188.29:3671] - establishing connection failed, null
2018-06-29 21:02:29.345 [DEBUG] [nx.internal.client.AbstractKNXClient] - Error connecting to the bus: null
java.lang.InterruptedException: null
at java.lang.Object.wait(Native Method) ~[?:?]
at tuwien.auto.calimero.knxnetip.ConnectionBase.waitForStateChange(ConnectionBase.java:541) ~[?:?]
at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:190) ~[?:?]
at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.<init>(KNXnetIPTunnel.java:159) ~[?:?]
at org.openhab.binding.knx.internal.client.IPClient.getConnection(IPClient.java:107) ~[?:?]
at org.openhab.binding.knx.internal.client.IPClient.createKNXNetworkLinkIP(IPClient.java:90) ~[?:?]
at org.openhab.binding.knx.internal.client.IPClient.establishConnection(IPClient.java:77) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.connect(AbstractKNXClient.java:178) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.connectIfNotAutomatic(AbstractKNXClient.java:164) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.readNextQueuedDatapoint(AbstractKNXClient.java:272) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.lambda$1(AbstractKNXClient.java:199) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
2018-06-29 21:02:29.579 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:MDT is disconnecting from the KNX bus
:
enabled debug - not really helpful - right?
considering to migrate back to KNX1 binding now
Completely purged my openhab2 installation, wiped all configs, etc.
reinstalled a fresh 2.3 - now everything seems to be fine with using the knx2 binding
No KNX disconnect any more for 4 days now.
Jep, everything still working. I completely wiped everything, in my old installation i had some config files from knx1 binding left - thought that would be no problem cause the binding was inactive.
Thanks, also reinstalled openhab and it seems to work fine. No problems for 24h, never had that since using the knx2 binding.
Would be really interesting what causes the problem. I uninstalled the old knx binding, cleared the cache,… but it didn’t help. Uninstall and a fresh openhab2 install and it seems to work fine.
Wanted to add some information. The clean openh2 installation worked fine, so no more disconnects from knx.
However, after about 3 weeks I found out that querying of my Kostal Pico inverter does not work anymore because I forgot to reinstall the HTTP binding. After reinstalling it it seems the problem reoccurred. The next day openhab disconnected again. I removed the HTTP binding and everything works fine.
I have to do another check, might have been a coincidence, but maybe there is some side effect between those bindings…
I have several fresh OH 2.3 installations and have the same problem. For some of them problem appeared after few months of work and for others after few days.
For now I have workaround - rule that restarts bundle when knx ip bridge thing changed status to UNINITIALIZED. Since KNX binding is the most important to me I’m interested in the final solution.
Are you using file thing configuration or PaperUI?
Import the public key (sudo -u openhab cat openhab.id_rsa.pub) into /var/lib/openhab2/etc/keys.properties like
openhab=AAAAB3NzaC1kc3M…XWKpeyW789IBpcZfyYQ=,g:admingroup
Be aware that the leading “ssh-key” and trailing “user@server” has to be omitted.
Hello all,
I have just set up a fresh openhabian install and now I encounter the same problems. On my bus system I do have a GIRA X1 (which can act as an KNX/IP Gateway) and also a GIRA KNX-IP GW.
I do not have a knxd running because it was my understanding that this is only an intermediate service between the bus and the openhab2 instance which is not needed.
This set up has been working on openhab pre 2.4 flawlessly.
Are there any new thoughts regarding the root cause of this problem?
My situation is exactly as desribed here: knx works fine for about 2 hours, then it disconnects and cannot reconnect.
Hello
Same issue on my Raspi. I’m using MDT’s «SCN-IP000.02 IP Interface».
It works like i charm but only for a few hours, then the KNX is disconnected.
All other bindings are not affected, only the KNX Binding (binding-knx - 2.4.0).
I have absolute no clue what to change in my config. (see some excerpts and netstat below)
Is there anyone who solved the issue?
Thanks to all in advance who provide any hints or solution…
BR, urs
openHABianPi
Ip = 192.168.10.23
Release = Raspbian GNU/Linux 9 (stretch)
Kernel = Linux 4.14.79+
Platform = Raspberry Pi Model B Rev 2
Updates = 0 apt updates available.
not a solution yet. But I installed knxd on the raspi running openhabian. I have set up knxd so that I can connect to the bus manually (knxtool commandline). However, I did not change my thing definition. This means, I do not use knxd for openhabian, but I have a constantly working connection right now.
Dear,
I’ve the same problem. Are there news about it?
I’m try to restart knx binding as write from andrzej_szymkowicz but I’m using sendCommand without good results because I receive a message where OH say to me problems with accessing permission of rsa file. I’m using openhabian and I don’t understand because there the openhab and the openhabian users. I think I need to use openhab user but I don’t fine its password on intenet.
Can you help me? My porting work for upgrate to KNX2 from KNX1 is not usable if KNX2 stop working.
rule "Restart KNX"
when
Time cron "0/10 * * ? * *"
then
val allThings = sendHttpGetRequest("http://192.168.1.81:8080/rest/things")
if(allThings.indexOf('BRIDGE_OFFLINE"},"editable":false,"label":"KNK [ATT] 1.1.4')>0){
logInfo("KNX", "KNX Autorestart")
var String esito = executeCommandLine("/etc/openhab2/scripts/restartknx.sh",5000)
if(esito!=''){
logInfo("KNX", "Autorestart completed (" + esito +")")
}
}
end
In the sh file I check offline thing status searching “BRIDGE_OFFLINE”},“editable”:false,“label”:“KNK [ATT] 1.1.4” string into json sendHttpGetRequest result. This is a specific string of a my knx thing and you must search a your specific different string.
Remember to change [YOUR_SYSTEM_USER] and [YOUR_SYSTEM_PASSWORD] with your openhabian credentials of a my knx thing and you can search a your specific different string.