Closed DunkyDaMonkey closed 1 year ago
Yeah, I was actually meaning to do that. Sounds like ble is very prone to connection failures. There's chit-chat about the bleak_retry_connector, but the docs are very sparse. I need to get on discord and see if some of the HA bluetooth gurus can help...
Anyhow, I've updated the timeout to 10s for now. See if it has any effect...
Thanks for making the change, i've tested and checked the logged, i'm still occasionally getting responses at 10-12sec, but I've seen more than a few at the 4-8 sec make it through.
I'm still getting a whole bunch of disconnects and "unavailable" on the sensors, so I think still probably the connection stability.
I'm not sure if this is the actual cause, but while debugging I noticed a 10sec delay on the response values from the Astral chlorinator resulted in the values going to "Unavailable" on the home assistant side.
I suspect that this is the intermittent cause for the value, if understand the code correctly its might just be a case of increasing the timeout=3 to 10 or 15sec.![image](https://user-images.githubusercontent.com/130259686/230748815-4c816919-c7e6-4f8e-bcd0-30dc696e5656.png)
Here are the two lines with timeout=3
https://github.com/pbutterworth/pychlorinator/blob/85b78ebc12f1f09a57d2bbf9c88e05e839bf6130/pychlorinator/chlorinator.py#L95
https://github.com/pbutterworth/pychlorinator/blob/85b78ebc12f1f09a57d2bbf9c88e05e839bf6130/pychlorinator/chlorinator.py#L136
I was going to update mine, but the pychlorinator must have been compiled and installed?