I recently migrated from domoticz to HomeAssistant and I’ve noticed that I loose connectivity to my RFlink gateway every 5 minutes. I’m using an ESP8266 with ESP-link (https://github.com/jeelabs/esp-link) to connect to RFlink over tcp. Most likely the issue is that the gateway doesn’t receive any data for a long time and the TCP connection times out after 300 seconds. However RFlink implements a hello-protocol (see http://www.rflink.nl/blog2/protref) where the client sends “10;PING;” and RFlink replies back with “20;99;PONG;”. Domoticz implements this (pinging every 30 or 60 seconds) and my connection was very reliable.
Is there any chance this could be implemented in the RFlink component to make RFlink connections over TCP more reliable? It doesn’t seem that the python rflink package implements this natively - however it does now to discard the PONG reply, so all it would take is for the RFlink to send “10;PING;” every 30 seconds
I added an entry to my crontab to send the ping command once every minute and it solves the disconnect issue - however it would be better to have it as an integrated part of HA
* * * * * echo "10;PING;" | /bin/nc -N <ip-of-rflink> 23