TheRealKillaruna / nano_pk

Home Assistant integration of Hargassner Nano-PK
Apache License 2.0
21 stars 17 forks source link

Again telnet connection problems #38

Open anderl78 opened 1 month ago

anderl78 commented 1 month ago

Hello!

I'm having telnet connection errors again. I've been using @skrue's fix for a while now and haven't had any problems since this fix. Which is very good! But sadly this is over now, i get around 1 or 2 connection lost a day (only fix is a reboot of HA)... I suspect the new firmware V14.0HAR.p1 is causing this. Has anyone had similar experiences? I'm using the latest Homeassistant 2024.9.2....

At the moment I'm playing around with longer timeouts for the connection and for the update frequency of the sensors. At the momentI can't say if this really helps. Other thing I'm thinkingabout is to make the telnet connectionmake even more robust , perhaps with complete stop and restart the connectionif errors occur - or something like that....

anderl78 commented 1 month ago

Ok... Since changing the timeouts, I haven't had any connection problems for 3 days. I therefore suspect that the regular timeouts are set relatively tightly and that this may cause problems depending on the system, network, etc. Slightly longer timeouts should not be a problem for functionality and may make the connection a little more stable. I will therefore not make any further changes at the moment, but I will continue to monitor this issue.

For documentation purposes, I have changed the following parameters (all values ​​are seconds):

const.py: BRIDGE_TIMEOUT = 2.0 --> 10.0 sensor.py: SCAN_INTERVAL = timedelta(seconds=5) --> 30 hargassner.py: SCAN_INTERVAL = timedelta(seconds=5) --> 30

anderl78 commented 3 weeks ago

OK, I've tried it for a while now. I have disconnections every now and then every few days. A repair is only possible by restarting Homeassistant. I have therefore extended the code again to catch this error and write additional LOG messages. It has been more stable for a few days and has been running without any problems so far. I'll check it out a bit more and then post a pull request when it's stable...