Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFLink TCP mode does not implement ping to keep connection alive - connection times out #41251

Closed
genestealer opened this issue Oct 4, 2020 · 6 comments · Fixed by #46438
Closed

Comments

@genestealer
Copy link

genestealer commented Oct 4, 2020

The problem

HA RFLink does not perform connection maintenance in TCP mode to keep connection alive. It should periodically perform the "ping" command keep connection, else after 300 seconds the connection times-out. RFlink implements a hello-protocol (see http://www.rflink.nl/blog2/protref) where if the client sends “10;PING;” RFlink replies back with “20;99;PONG;”.

Raised in forum: Implement RFlink ping

Environment

  • Home Assistant Core release with the issue: 0.115.6
  • Last working Home Assistant Core release (if known): N/A
  • Operating environment (OS/Container/Supervised/Core): HassOS 4.13
  • Integration causing this issue: RFLink
  • Link to integration documentation on our website: https://www.home-assistant.io/components/rflink/

Problem-relevant configuration.yaml

image

Traceback/Error logs

2020-10-05 00:13:59 INFO (MainThread) [rflink.protocol] disconnected because of close/abort.
2020-10-05 00:14:00 DEBUG (MainThread) [rflink.protocol] connected

image

Additional information

Workaround:

# Example configuration.yaml entry
sensor:
  - platform: command_line
    name: RFLink Keep Alive Command
    command: 'echo "10;PING;" | nc 192.168.2.22 23'
    scan_interval: 60 #seconds
@genestealer
Copy link
Author

Tagging @lbschenkel and @aequitas

@javicalle
Copy link
Contributor

I think that an approach like this can be implemented for RFLink serial connections (when host: None).

@github-actions
Copy link

github-actions bot commented Feb 6, 2021

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 6, 2021
@genestealer
Copy link
Author

This is still an open issue

@github-actions github-actions bot removed the stale label Feb 6, 2021
@cpainchaud
Copy link
Contributor

cpainchaud commented Feb 7, 2021

I can only upvote this! actually it may be easier to tweak TCP KeepAlive settings, I would have done it myself if I was able to tell where TCP socket is created in the code!

@genestealer
Copy link
Author

Fantastic, thank you so much for implementing this.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants