Hi all, I have been playing with settings of knx binding because of those issues (instability) and I came across one very bizarre behavior of the binding. when I inspect my knxd daemon config, it is clearly visible it is configured to listen to TCP port 6720. Also verified (with telnet), the machine listens on 6720, but not listening at all at 3671 (connection refused).
However, openhab knx binding only likes the port 3671, if I configure it to 6720, gateway is offline (communication error). This is very strange, I dont know how it works with this configuration, it probably in the background goes to the correct port as that is the only logical explanation…
now the reason I’m asking, as I have these episodes of gateway going offline every few days, and it comes back online after a minute. I’m lucky that it auto-recovers, as other people have to restart openhab, or binding, or disable enable the things…there is scripts for rules doing this job circulating on the forum
I noticed many threads with this issues, and no solution…other then try ROUTER mode instead, which unfortunately does not work for me. knxd allegedly supports it, and things come online, but I cannot switch any device.
I have exhausted all attempts of playing with configuration, (define local source, dont define, timeouts, bla blah…) Basically I don’t expect any solution, just starting a discussion about possible causes.
People usually mention that on knx1 binding everything was perfect, and their problems started on knx2.
I Noticed it happens to people running openhab on:
- windows
- linux
- vm
- docker
- rpi, openhabian…
knx gateway can be:
- gira IP interface gateway
- mdt usb
- tpuart usb
- various other brands of IP or USB interfaces
knx ip gateway can be knxd daemon with USB knx interface running either on openhab host itself or a separate machine, standalone IP interface device…
all of these scenarios have the same issue - gets randomly disconnected.
then again, I am sure there is a lot of people with those scenarios that have no issues at all
I cannot find any common thing in all those cases
I think it also happens to both UI things and file based .things.
I noticed it’s mentioned maybe that its better to have a direct serial connection configured, so there is no IP gateway business. But I am not sure I can configure this with USB interface, I guess it should be TPUART, proper serial…
here are my configs just for reference
knxd
/usr/lib/knxd_args --eibaddr=0.0.1 --client-addrs=0.0.2:10 --error=0 --listen-tcp=6720 --Name=KNX2 --Routing --Tunnelling --Discovery --Server=224.0.23.12 --listen-local=/var/run/knxd --trace=0 -b usb:1:2:1
knx.things
Bridge knx:ip:bridge [
ipAddress="192.168.4.1",
//portNumber=6720,
portNumber=3671,
localIp="192.168.4.2",
type="TUNNEL",
//type="ROUTER",
readingPause=50,
responseTimeout=50,
readRetriesLimit=3,
autoReconnectPeriod=60,
localSourceAddr="0.0.0"
] {
Thing device generic [
fetch=false,
pingInterval=300,
readInterval=3600
] {
Type switch : Foyer "Light" [ ga="1/5/26+<1/5/27" ]
Type switch : Dining "Light" [ ga="1/5/33+<1/5/35" ]
Type dimmer : DiningDimmer "Light" [ position="5.001:1/5/36+<1/5/70" ]
Type switch : Living "Light" [ ga="1/5/29+<1/5/31" ]
Type dimmer : LivingDimmer "Light" [ position="5.001:1/5/32+<1/5/69" ]
Type switch : Entrance "Light" [ ga="1/5/24+<1/5/25" ]
Type switch : Corridor "Light" [ ga="1/5/20+<1/5/21" ]
Type switch : Balcony1 "Light" [ ga="1/5/38+<1/5/39" ]
Type switch : Balcony2 "Light" [ ga="1/5/6+<1/5/7" ]
Type switch : KidsEntrance "Light" [ ga="1/5/12+<1/5/13" ]
Type switch : KidsRoom "Light" [ ga="1/5/14+<1/5/16" ]
Type dimmer : KidsDimmer "Light" [ position="5.001:1/5/19+<1/5/68" ]
Type switch : Dressing "Light" [ ga="1/5/4+<1/5/5" ]
Type switch : Bedroom "Light" [ ga="1/5/1+<1/5/3" ]
Type dimmer : BedroomDimmer "Light" [ position="5.001:1/5/11+<1/5/67" ]
Type number : LivingTemp "Temperature" [ ga="9.001:<1/5/44" ]
Type number : RoomsTemp "Temperature" [ ga="9.001:<1/5/55" ]
Type dimmer : ACLiving1 "Temperature" [ position="5.001:1/5/48+<1/5/49" ]
Type number : ACLiving2 "Temperature" [ ga="9.001:<1/5/45+<1/5/53" ]
Type switch : ACLiving3 "Switch" [ ga="1/5/46+<1/5/47" ]
Type number : ACLiving4 "Temperature" [ ga="9.001:<1/5/53" ]
Type dimmer : ACRooms1 "Temperature" [ position="5.001:1/5/59+<1/5/60" ]
Type number : ACRooms2 "Temperature" [ ga="9.001:<1/5/56+<1/5/64" ]
Type switch : ACRooms3 "Switch" [ ga="1/5/57+<1/5/58" ]
Type number : ACRooms4 "Temperature" [ ga="9.001:<1/5/64" ]
Type number : LivingOff "Temperature" [ ga="5.001:<1/5/22" ]
Type number : CommonOff "Temperature" [ ga="5.001:<1/5/28" ]
Type number : WelcomeOff "Temperature" [ ga="5.001:<1/5/50" ]
Type number : HomeSleep "Temperature" [ ga="5.001:<1/5/43" ]
}
}