Xiaomi BLE Sensor Not Updating

Hi all,

Have read through a few threads that seem to have the same issue from a while ago, but nothing recent and they all mention an older version of HA.

I have the Xiaomi BLE temperature sensor and have configured as per the instructions Mitemp_bt integration

After a couple of hours maximum the sensors do not update, and only begin working again after a restart of HA.

I have moved the sensor right next to the raspberry pi and still the same issue.

Anyone have any avenues to go down to fix?

The only fix that worked for me was buying an ESP32 board, installing the ESPHome addon and forwarding the data to HA (a process that was actually easy enough, and cheap)…BLE support in HA itself seems completely broken.

I have the same issue and found this thread by googling it.

I’m on 0.101.3 and after awhile the sensor stops updating. If I search for nearby Bluetooth devices on my Pi, both of my sensors are immediately found, so it’s not a range problem.

Let’s hope someone finds a solution for this that doesn’t require buying additional hardware or using additional software.

Same issue.

I’m testing 3 sensors that are at maximum 1 meter from my Raspberry 4.
Even with a timeout set to 30 seconds, I get :

< Polling error Could not read data from Mi Temp sensor 58:2D:34:xx:xx:xx >

What can be the problem ?

  • mitemp_bt addon ?
  • HomeAssistant ?
  • BT on Raspberry ?

I spent already 2 days just to configure … 3 sensors :’( and it still does not work.

I fixed the issue by using the alternative plugin available via HACS

Witch one ?

Xiaomi BLE Monitor Sensor Platform under plugins on HACS

Awesome. Yesterday I set up my HA again after a break of 1 year.

"I’ll be back" :slight_smile:
Then I setup again with the default mitemp_bt but after the night my 4 sensors just do not update the temp/hum. With this config:

sensor:
  - platform: mitemp_bt
    mac: 4C:65:A8:MYHIDDENMAC
    name: Stube Mi Sensor Temp und Luftfeuchte
    median: 1
  - platform: mitemp_bt
    mac: 4C:65:A8:MYHIDDENMAC
    name: Balkon Mi Sensor Temp und Luftfeuchte
    median: 1
  - platform: mitemp_bt
    mac: 4C:65:A8:MYHIDDENMAC
    name: Kueche Mi Sensor Temp und Luftfeuchte
    median: 1
  - platform: mitemp_bt
    mac: 4C:65:A8:MYHIDDENMAC
    name: Flur Mi Sensor Temp und Luftfeuchte
    median: 1

So I setup HACS today with this help here.
The result: Awesome!
This is my configuration.yaml for my all 4 sensors now:

sensor:
  - platform: mitemp_bt
    rounding: True
    decimals: 2
    period: 5

When my temp or humidity changed now I get the results within 5 to 10 seconds on my interface!

Hi everybody. Great !
It’s OK for me also.
Thank you very much @JamieMe
System :
arch: armv7
channel: stable
hassos: 3.12
homeassistant: 0.106.5
hostname: hassio
logging: info
machine: raspberrypi3
supervisor: 209
supported_arch:

  • armv7
  • armhf
1 Like

Interesting! I have never seen anyone use such a short period. Can you say, what about the CPU load? And which hardware do you use?

Is is a raspberry pi 4 (4gb) with the official buster image. Homeassistant is running with the official pi4 docker image.

CPU load… Puh how can I check this. htop told me “Load average: 0.33 0.37 0.35” and in the moment I checked it the system used 237mb of my 4GB ram. At the moment I run deconz in another docker container.

Thank you. I thought maybe you are collecting load stats. I’m curious about the effect of the period option on the load. Never mind, I’ll do my own experiment.

Any results? How do you collect stats?

Here I published all the information about the test system. Today I switched the period from one minute to 10 - tomorrow / the day after tomorrow I will compare if there is a noticeable difference.

Had terrible trouble with mitemp_bt on rp3, lots of broken pipes.
After switching to running HA on a dell machine (that itself is running Ubuntu server), i decided to give mitemp another crack.
Got myself a Bluetooth adapter compatible with linux and a usb extension cable. Put mitemp back into my config yml and after 3 days, no broken pipes. Success!!
Adapter and xiaomi sensor are roughly 4 metres apart

Why I get this error:
Invalid config for [sensor.mitemp_bt]: [rounding] is an invalid option for [sensor.mitemp_bt]. Check: sensor.mitemp_bt->rounding. (See ?, line ?).

just show us your config?