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

Calling delete every ~220 seconds #24

Closed
DanielMajoinen opened this issue Aug 1, 2021 · 6 comments
Closed

Calling delete every ~220 seconds #24

DanielMajoinen opened this issue Aug 1, 2021 · 6 comments
Labels

Comments

@DanielMajoinen
Copy link

I'd like to understand the logic behind the connection loop eventually calling delete. From my understanding of hub.py a discovery is called, which loops on failure to connect until a connection is made, at which point it waits 220 seconds and then forces a disconnect. Why is a disconnect necessary once a connection is established? This is causing instability to the point I had to comment out the code to get it working reliably. Is this intentional?

@bremor
Copy link
Owner

bremor commented Aug 1, 2021

Hello! Thanks for raising this issue.

On my system, the wifi module will disconnect the open session after about 240 seconds. I found it to be more reliable to control exactly when this disconnect occurs, rather than waiting for the wifi module to close the connection. I would love to take a look at your logs (maybe you have a different hardware version?) and for you to share what changes you have made to the code to see how my system behaves.

I'm also happy to help you troubleshoot your stability issues. I have found that every 6 months or so I need to power cycle the wifi-module in my ceiling, it seems to have some weird memory leak issues where it will stop responding to discovery broadcasts and ignore the commands I am sending.

@DanielMajoinen
Copy link
Author

Ah okay, thanks for the insight, I knew there had to be a reason for it!

I've taken some time to do my own testing as I found my connection was too unstable for use with this force disconnect then reconnect pattern. I've noticed the TCP connection times out after 5 minutes, but I haven't been able to force a disconnect and successfully reconnect reliably.

I've taken to looping a 10 second interval after connection, requesting zone info. Once the TCP connection is lost by the server timeout, this then triggers and repeats the discovery loop which seems to connect as reliably as forcing it, but by not forcing a disconnect I at least have a longer active connection.

I've noticed my router version is 1.2.3, is that the same as yours? I am getting fairly high latency when pinging the router, around ~200ms, is that what you get? I've also noticed the official app does nothing to combat this 5 minute timeout, with the logs showing exceptions being thrown which doesn't give me much hope.

@bremor
Copy link
Owner

bremor commented Aug 11, 2021

My hardware verison is also 1.2.3. I have had high response times just like that. The device eventually becomes unresponsive after a period of months, I feel like it has some kind of memory issue. I have found that a power cycle will get it running back to normal for a while and I will go back to getting normal ping response times. It was a while ago, but I actually found initiating a disconnect with a delete request helped with long term stability, rather than letting the connection be terminated by the device. I felt that triggering a delete request, ensured the device did some kind of 'cleanup'. This is all speculation though and not backed up with actualy evidence. You should definately power down your whole unit, wifi module and heating/cooling system for a couple of minutes to see if that helps.

You shouldn't have to poll it every 10 seconds, if you change the settings using the navigator remote, it will publish the changes pretty quickly through the wifi module. I also experimented with polling, hoping that it would act as a 'keepalive', but no such luck.

@mikz-t
Copy link

mikz-t commented Nov 29, 2021

I've taken to looping a 10 second interval after connection, requesting zone info. Once the TCP connection is lost by the server timeout, this then triggers and repeats the discovery loop which seems to connect as reliably as forcing it, but by not forcing a disconnect I at least have a longer active connection.

@DanielMajoinen could you share your modified hub.py? I'm having similar issues and would like to see if your changes improve my setup.

Thanks,

@boc-the-git
Copy link
Collaborator

Hey friends! I've recently jumped on to help bremor with the maintenance of the integration moving forward.

Most of the open issues are 2+ years old and obviously the information on them is a bit stale.
Can you please provide any update on this issue, giving as much detail as possible?

If this isn't confirmed to still be an issue, it'll be automatically closed in a week or two ❤️

Tagging the people I can see who have contributed to the issue over the years:
@DanielMajoinen @mikz-t

@mikz-t
Copy link

mikz-t commented Sep 26, 2024

@boc-the-git to be honest i can't recall what i did to resolve this issue, I've recently replaced my heating and cooling with ducted RCAC so I'm no longer using the integration. Best of luck with maintaining this and thanks again to @bremor for developing this, it served us well for a number of years

@github-actions github-actions bot removed the stale label Sep 27, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants