aioesphomeapi icon indicating copy to clipboard operation
aioesphomeapi copied to clipboard

Adjust ble timeouts to be longer than bleak timeouts

Open bdraco opened this issue 2 years ago • 4 comments

The default timeouts were shorter than the timeout used by bleak and the surrounding stack which could lead to unexplained timeout failures.

fixes #286

bdraco avatar Oct 24 '22 01:10 bdraco

I'm able to successfully pair the eve motion with the adjusted timeouts.

bdraco avatar Oct 24 '22 02:10 bdraco

Looks very promising. I restarted few times and even if I had to reload the integration for a few devices, once it starts is very stable. Also it recovers very well from the esp32 disconnect problem.

Thank you!

virtualm2000 avatar Oct 24 '22 07:10 virtualm2000

thanks for testing

It looks like we also need to raise bleak error when the device disconnects in the middle of an op but that probably needs to happen on the esphome bleak client instead of here.

bdraco avatar Oct 24 '22 11:10 bdraco

This should fix the missing retries https://github.com/home-assistant/core/pull/80885

This should improve the handling of running of connection slots https://github.com/Bluetooth-Devices/bleak-retry-connector/pull/56

bdraco avatar Oct 24 '22 13:10 bdraco