Supergiovane / node-red-contrib-knx-ultimate

Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer.
https://youtu.be/egRbR_KwP9I
MIT License
154 stars 34 forks source link

Auto reconnect every seconds #358

Closed ldelberg closed 5 months ago

ldelberg commented 5 months ago

Hi Supergiovane,

since the last two versions I have an issue with the connection to my ip-interface (Gira X1). The nodes change from:

I've looked in the logs and found this message:

node-red-1 | 8 Jun 12:11:45 - [info] Started flows node-red-1 | [info] 6/8/2024, 12:11:49 PM.372 KNXUltimate-config: Bind KNX Bus to interface (Auto). Node Gira X1 node-red-1 | [info] 6/8/2024, 12:11:49 PM.375 knxUltimate-config: perform websocket connection on Gira X1 node-red-1 | [info] 6/8/2024, 12:11:49 PM.375 KNXUltimate-config: Connecting... Gira X1 node-red-1 | [info] 6/8/2024, 12:11:49 PM.378 KNXUltimate-config: Bind KNX Bus to interface : en9 (Interface's name selected from dropdown list). Node 224.0.23.12 node-red-1 | [info] 6/8/2024, 12:11:49 PM.378 knxUltimate-config: No nodes linked to this gateway 224.0.23.12 node-red-1 | 8 Jun 12:11:50 - [red] Uncaught Exception: node-red-1 | 8 Jun 12:11:50 - [error] Error: Service name is already in use on the network node-red-1 | at Registry._onProbeComplete (/data/node_modules/bonjour-hap/lib/Registry.js:108:27) node-red-1 | at Prober.done (/data/node_modules/bonjour-hap/lib/Prober.js:67:10) node-red-1 | at Prober.onMDNSresponse (/data/node_modules/bonjour-hap/lib/Prober.js:61:102) node-red-1 | at EventEmitter.emit (node:events:517:28) node-red-1 | at Socket. (/data/node_modules/multicast-dns/index.js:49:43) node-red-1 | at Socket.emit (node:events:517:28) node-red-1 | at UDP.onMessage (node:dgram:942:8) node-red-1 | Starting node-red node-red-1 | node-red-1 | > node-red-docker@3.1.3 start node-red-1 | > node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS --userDir /data node-red-1 | node-red-1 | 8 Jun 12:11:51 - [info] node-red-1 | node-red-1 | Welcome to Node-RED node-red-1 | =================== node-red-1 | node-red-1 | 8 Jun 12:11:51 - [info] Node-RED version: v3.1.3 node-red-1 | 8 Jun 12:11:51 - [info] Node.js version: v18.19.0 node-red-1 | 8 Jun 12:11:51 - [info] Linux 6.5.11-8-pve x64 LE`

logs.txt

I've only one node-red instance with nodes-red-contrib-knx-ultimate running. It's running on promox in a docker container - alone. With older Versions of node-red-contrib-knx-ultimate I hadn't this issue.

I'm running node-red 3.1.3 with knx-ultimate 2.5.1

Please have a look at the attached video, it shows the cycle of reconnecting.

https://github.com/Supergiovane/node-red-contrib-knx-ultimate/assets/67010888/13fcd0d8-cf3d-4223-9098-9167c6abc871

Thanks for your support in advance. Best regards, Lars

P.S: Here is a bigger log file with Debug enabled: logs_Debug.txt

Supergiovane commented 5 months ago

Hi Two things:

  1. Are you sure about the ip 224.0.23.12? Is the Gira X1 a router?
  2. I see node red crashing and restart due to a bonjour call fail (homekit node). Can you check and verify if that node is correctly configured?
ldelberg commented 5 months ago

Sorry for my late reply. This isn't the configured ip.

Bildschirmfoto 2024-06-09 um 22 37 50

All nodes worked fine since two years or so. Suddenly after a update of knx-ultimate this issue appeared

Supergiovane commented 5 months ago

Hi Node-Red keeps restarting because of an error in Bonjour prober. As far as i can tell, multicast-dns raises an uncaught error due to a duplicated name in the network. This is usually related to the homekit node. You should report this error to the homekit node's dev.

` node-red-1 | 8 Jun 12:37:22 - [red] Uncaught Exception: node-red-1 | 8 Jun 12:37:22 - [error] Error: Service name is already in use on the network node-red-1 | at Registry._onProbeComplete (/data/node_modules/bonjour-hap/lib/Registry.js:108:27) node-red-1 | at Prober.done (/data/node_modules/bonjour-hap/lib/Prober.js:67:10) node-red-1 | at Prober.onMDNSresponse (/data/node_modules/bonjour-hap/lib/Prober.js:61:102) node-red-1 | at EventEmitter.emit (node:events:517:28) node-red-1 | at Socket. (/data/node_modules/multicast-dns/index.js:49:43) node-red-1 | at Socket.emit (node:events:517:28) node-red-1 | at UDP.onMessage (node:dgram:942:8) node-red-1 | Starting node-red

`

ldelberg commented 5 months ago

Just to recap. I've used a backup from the node-red files with knx-ultimate, recreated the docker container and did an update to knx-ultimate 2.5.1. Now everything is working fine again. I think someting went wrong in the update path. Thanks for your work and support!

Supergiovane commented 5 months ago

Glad it works now. Thank you for the feedback.