Use long lived TCP connection to hub and add heartbeat/ping sensor#50
Merged
tonyroberts merged 5 commits intomainfrom Oct 24, 2025
Merged
Use long lived TCP connection to hub and add heartbeat/ping sensor#50tonyroberts merged 5 commits intomainfrom
tonyroberts merged 5 commits intomainfrom
Conversation
Owner
tonyroberts
commented
Oct 13, 2025
- Keep alive a single TCP connection for each hub instead of constantly opening a new one for each request
- Add a heartbeat sensor that pings the hub periodically to check it's alive
Instead of creating a new connection for each HTTP request, keep a long lived TCP connection alive and use it for all requests. This should use fewer resources on the hub and hopefully avoid stability problems that can occur when the hub has been up for many months.
Periodically ping the hub to check it's still responding. This should help keep the hub's network interface awake.
Elsewhere it's assumed that unavailable values are either not set in state dictionary or are None. Where empty strings are used it's logging some warnings about float conversions which aren't needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.