Scanning bluetooth devices

Hi,

Running Home Assistant 0.91.3 on RaspberryPi.

I’m trying to get Xiaomi BLE Temperature and humidity sensor connected.

I fail on the first step: BLE scanning in order to get MAC address of the sensor. What should be done before that? I have tried both of the commands in terminal but either one of the commands are not found.

Side note about the sensor: Temperature is quite exact but humidity is unfortunately about 5% too high. The sensor is very sensitive: Just taking it on hand the values start changing -> Averaging is needed if I ever get the connection working…

1 Like

just got the same device yesterday and looking on how to scan it. I tried hcitool and bluetoothctl command but they dont seem to be installed in my HASSIO.

waiting for someone for assistance :slight_smile:

Cheers

It didn’t work for me. If you got android phone, try Bluetooth scanner app from play store. It shows the mac instantly. I did not have any problems after that. Well, the Xiaomi sensor is not very accurate but no problems with the integration.

1 Like

Thanks, i will give that a try. I was about to go down the esphome with esp32 way (bought the board for this purpose) however if i can get the Pi to do it, then it’s better. So I can use the esp32 for something else.

https://esphome.io/components/sensor/xiaomi_mijia.html

i got it working, thanks
i found the BLE temp and humidity sensor to be quite accurate. I have the sensor side by side with my xiaomi airpurifier, not too much of a difference.

image

hey just wondering, i was able to scan and retrieve the information from the xiaomi sensor. but then it stopped.
have you ever experience that? i cant get it to update the temp/humidity now.
cheers

So far it works for me. Is your sensor too far away? If there is a closed door or something else on the way, then it might not work.

that works, thanks very much. the range isnt that great, so have to move it closer to the raspi.
thanks