jdeath / rd200v2

RadonEye RD200 Version 2 Integration for Home Assistant
MIT License
73 stars 17 forks source link

Remove async in the request for disconnection #5

Closed arpia49 closed 1 year ago

arpia49 commented 1 year ago

Resolves #3

With this single change I've been able to have 100% availability on all 4 entities for more than two hours (previous record was 10min).

Running on raspberry pi 4 with Home Assistant Operating System.

My RD200 is from Spain so FR:RE.

I strongly suggest to test it on other hardware, especially if there was no issues before.

image

JayNewstrom commented 1 year ago

I can test this too, if you'd like @jdeath

jdeath commented 1 year ago

I am checking with the experts on discord. If they say it is ok, I'll merge the PR.

jdeath commented 1 year ago

I am told the await is required, so I'm going to keep it in my version. You can remove it in your local version.

You may get the same functionality if you remove the entire disconnect() line, because removing the await effectively keeps the line disconnect() from even running.

arpia49 commented 1 year ago

I am told the await is required, so I'm going to keep it in my version. You can remove it in your local version.

You may get the same functionality if you remove the entire disconnect() line, because removing the await effectively keeps the line disconnect() from even running.

Yes, I understand your point, in fact I see on my RD200 that the connection is always stablished (kind of like the official Android APP).

I will keep my fork but, still, try to find another (cleaner) solution. I will try to merge any commit from this repo ( https://github.com/jdeath/rd200v2/ ) into mine ( https://github.com/arpia49/rd200v2 ) in case @colinmcintosh or others want to keep with the workaround without loosing any possible improvement.