This issue finally forced me to look into ESPhome. I just took spare ESP32 a made it esentially into bluetooth to wifi bridge. Now my thermometers are connected to ESP32 and ESP32 transmitts the values over wifi to Home Assistant. It looks more solid than using integrated BT in rPi.
Also I can now move rPi anywhere in my apartment as only the ESP32 has to be in range to receive signal from those thermometers.
How it works in a nutshell that took me some time to understand - you have addon in home assistant where you manage all your ESPhome devices. You write code for them and this addon compiles firmware for them. There are multiple ways how to upload the firmware to the target device - you either download .bin to your computer and use ESPHome-Flasher or you connect USB directly to your rPi.
Later updates to your code can be uploaded wirelessly to the device directly.
My summary - installed ESPhome addon to home assistant. Opened this addon and added new device. Filled in necessary details about my wifi etc.
Added following code, saved, uploaded
Last thing to do was go (in home assistant) to configuration, integrations, add, find ESPhome, fill-in IP address of the ESP32 and save. And now simply those sensors appeared in home assistant
For those who have problems with the stability of the sensor reading, the information I found here may be very useful.
Briefly: Xiaomi BLE Temperature and Humidity sensor does not require a poll, it already sends readings about once a second. That is, even if in conditions of poor communication you successfully receive only 1 reading of 60, then this will give you an update once a minute! The user who published this information (via the provided link) has a solution for this kind integration (albeit for now a test, but working).
Battery life not affected, because this sensor is designed so that it sends data once a second itself, without the need to poll it. The only problem this code can lead to - is the fast increase in database size, especially if you have a lot of these sensors… Sorry for bad English.
That looks like ultra shitty router I can understand that is looses connection but requiring restart? That weird… Try changing wifi channel to different one.
This is an issue with the mitemp_bt_poller.py, namely the way the outhor parses the string. It assumes two digits without a sign. As soon as you get below 10C it will fail.
Confirmed, i have a blue cave too. It’s a router issue. I’ve tried that too but same result, I’ve searched logs and I only found a thread with no solution, and I’ve reported to Asus but I have not received answer. You can connect esp32 without ble tracker?
@DendelX, yes, I’m able to connect esp32 w/o ble tracker to the bluecave, its stable for a long time.
issue. Btw: I’ve searched online and saw it happens w/other ASUS and Netgear models.
There should be a configuration switch, perhaps in the advance settings… checking
I have tried all settings that I can, but not all that I could because my home network is full of domotic devices and I can’t take some risks. If you found something would be fantastic, remember me please