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
152 stars 34 forks source link

Reconnect issue #132

Closed heleon19 closed 3 years ago

heleon19 commented 3 years ago

Hello Massimo How are you? Haven't heard from you for a long time.

We have the problem on two installations that very likely after a network interruption the connection is no longer established correctly. The nodes are all green, so they do not show any error. However, writing and reading does not work. The watchdog which writes to a group address recognizes the error. After a deploy, the connection works again.

Attached is the log from this morning, and the configuration of the interface.

We are using the KNX Ultimate 1.2.14, since then there seems to have been no releases that fix my problem.

Thanks for your help

nodes connected

watchdog watchdog_flows.txt 2021-08-11.log

heleon19 commented 3 years ago

Still the same. I disconnect for one two seconds. While the values are then initially read out, I disconnect again, after which the connection never recovered.

Yes around 40 values is possible.

heleon19 commented 3 years ago

Delay between each telegram (in milliseconds) 50 and further multiply delay only between -read- telegrams 5x

Supergiovane commented 3 years ago

Ok, i'll set same like you and i'll test again. Until i cannot reproduce the issue, i'm in the blind.

heleon19 commented 3 years ago

Yes I understand, maybe we have to spend you some holidays in Switzerland? ;-)

Supergiovane commented 3 years ago

Not only mine reconnects after disconnection, but also it performs again the read status. I'm keeping addin nodes, to see if there is a link between node numbers and issue.

https://user-images.githubusercontent.com/37666636/129565747-2d5bee9e-2301-4052-987d-b786cc01c838.mov

heleon19 commented 3 years ago

Your nodes change to gray, mine to red

Supergiovane commented 3 years ago

Can you send me again your TXT log please?

heleon19 commented 3 years ago

2021-08-16.log

Supergiovane commented 3 years ago

Despite your video was "4K high resolution Dolby video", i wasn't able to read the status of your nodes when they becomes grey. What do they say?

heleon19 commented 3 years ago

It never changes to grey! So it changes to red and it says: Disconnected

Supergiovane commented 3 years ago

Yes, sorry, my mistake. Very interesting. After briefly switching to red, the nodes should change to grey and telling you the something line "Will connect again in xx secs." (xx is a random number). Do you see that?

heleon19 commented 3 years ago

No it changes from red to green

Supergiovane commented 3 years ago

knxUltimate-config.js.zip Can you try this? I've added some logs to allow me to see what happen. Then try and i need again your log.

heleon19 commented 3 years ago

2021-08-16-2.log

Supergiovane commented 3 years ago

In the point 2., it lacks the "Will connect in 6 secs. with ZB xyz" message, thus the "ZB xyz connected" message. On what are you running node-red? Raspberry PI ? Do you consider the hardware slow or not?

heleon19 commented 3 years ago

Yes it runs on a PI, but it all runs fast. It is also rather a small project.

Supergiovane commented 3 years ago

Ok, please unzip this and restart knxUltimate-config.js.zip Then add these two nodes:

Node-RED

Then set the STATUS node to report status of only one of your knx-ultimate nodes.

Node-RED

And set the debug node so:

Node-RED

You'll be filled with tons of node statuses in the log. Please do a test and post here again the log. Thanks

Supergiovane commented 3 years ago

PS: In the knx-ultimate gateway node, select an ethernet interface, don't leave "AUTO".

Node-RED 2
heleon19 commented 3 years ago

2021-08-16-3.log

Still the same, had to deploy again

Supergiovane commented 3 years ago

Ok, we may be there. I'll send you two files. First, try with this:

knxUltimate-config.js.zip

No need for log, only test it and see if it works.

heleon19 commented 3 years ago

Now it seems to work, what did you change? Until now it has always worked, hope it stays that way.

Supergiovane commented 3 years ago

Thanks to your last log, i noticed that, for an unknown reason, it seems that the KNX interface fails to raise an error if i send a telegram to it without a proper connection setup. We'll see if this will continue to work. I've another file ready for you, with a more specific handling of that "timeout" state, but if it works so, we can postpone this furhter udate.

heleon19 commented 3 years ago

Thank you, we will test some more times, and report to you. If you made a release of it, I could test it at more systems.

Supergiovane commented 3 years ago

Yes, i'll release it tomorrow, because now i must do my life-job. I've about 40 Mails to reply to! ;-)

Supergiovane commented 3 years ago

Version 1.2.39 is out.

heleon19 commented 3 years ago

Thank you again! Up to now it seems to work. We will test it on some systems and let you know, if something unexpected happens.