Passive BLE Monitor integration (Xiaomi Mijia BLE MiBeacon monitor)

Did you also remove the line with encryptors:?

I have to keep it if I want to put MAC adress no ?

No, you can remove it. If you only want to receive this specific device, you can use the whitelist option.

What HassOS version are you running?
I was running the beta version hassOS 4.14 and this was the reason for the same issues i experienced. Leaving the beta program and rolling back to 4.13 everything works fine again.

can explain how to downgrade to 4.13, thnks

Havent tried, but i think with the following ssh command.

ha os update --version 4.13

See instructions here

Well, I followed this tutorial: GitHub - custom-components/ble_monitor: BLE monitor for passive BLE sensors

Still not working, if someone can help me…

Tried with original firmware, I have this error on logs:

Logger: custom_components.mitemp_bt.sensor
Source: custom_components/mitemp_bt/sensor.py:139
Integration: mitemp_bt ([documentation](https://github.com/custom-components/sensor.mitemp_bt))
First occurred: 17:40:52 (1 occurrences)
Last logged: 17:40:52

HCIdump thread: OS error: [Errno 19] error while attempting to bind on interface 1: No such device

@Soni Looks like you are running HassOs 4.14. There is an issue with Bluetooth, as others have reported. You have the same error as @ghassan. Please downgrade to 4.13 for now with

ha os update --version 4.13

Keep an eye on this issue, till someone has a solution.

If you are running the Beta channel:

  • Go to: Supervisor – System tab, and click "Leave Beta Channel
  • restart Hassio
  • a while later, updating to version 4.13 will be available in the supervisor

Hope i works for you :slight_smile:

This issue seems to occur on Raspberry pi 3 only and affects all Bluetooth related components. A fix of Home Assistant OS is proposed on github, so it will most likely be fixed soon.

Hi @ghassan,

did you manage to find out how to get the bind_key from that? I have the same problem: getting a 52 characters long answer without any bind_key present.

Hi André,

Use the TelinkFlasher as described here: https://github.com/custom-components/sensor.mitemp_bt/blob/035bda0956737ce584514a89a017353c0209cd15/faq.md#my-sensors-ble-advertisements-are-encrypted-how-can-i-get-the-key

This is much easier, but it works only from Android device or newer PC with built in BLE.

Actually, I also uploaded the Telink custom firmware, which now is supported by the mitemp_bt custom component, and you can use it without encryption keys. If you do so, you move the mac address to the whitelist section instead.

Good luck :slight_smile:

HassOs 4.15 seems to be released yesterday, which should solve the issue with Bluetooth not working on Raspberry Pi 3.

I have problems with battery value for my LYWSD03MMC sensors.

HA on Raspberry Pi 4

Home Assistant 0.116.4

BLE monitor sensor 0.7.4

HassOS 4.14

Supervisor 249

bug_entity_bt_2

You don’t have the batt_entities: True in your config. You can also remove the entity with sensor.mi_batt_xxxxxxxx, this is an old one. The other one should reappear after changing your config.

Also note that it is not needed to have your sensors both in encryptors and in whitelist. When added under encryptors they are automatically added to the whitelist.

1 Like

Anyone interested to control start/stop of Xiaomi Mija Mosquito Repellent (WX08ZM)? me too…

for a couple of days home assistant no longer displays the status of the battery. it used to detect it normally but now it does not recognize it

I have problems with my LYWSD03MMC sensors.
HA on Raspberry Pi 4
|arch|armv7l|
|dev|false|
|docker|false|
|hassio|false|
|installation_type|Home Assistant Core|
|os_name|Linux|
|os_version|5.4.72-v7l+|
|python_version|3.8.6|
|timezone|Europe/Moscow|
|version|0.116.4|
|virtualenv|true|
Error:
Logger: root
Source: custom_components/mitemp_bt/sensor.py:136
First occurred: 10:41:55 (1 occurrences)
Last logged: 10:41:55

Uncaught thread exception
Traceback (most recent call last):
File “/usr/local/lib/python3.8/threading.py”, line 932, in _bootstrap_inner
self.run()
File “/home/homeassistant/.homeassistant/custom_components/mitemp_bt/sensor.py”, line 136, in run
mysocket = aiobs.create_bt_socket(self._interface)
File “/srv/homeassistant/lib/python3.8/site-packages/aioblescan/aioblescan.py”, line 1280, in create_bt_socket
sock = socket.socket(family=socket.AF_BLUETOOTH,
AttributeError: module ‘socket’ has no attribute ‘AF_BLUETOOTH’

@strannik-pi Did you upgrade your python recently. Than you haven’t included bluetooth support in python. See this issue for instructructions how to solve it.

Note that also HassOs 4.14 has this issue. Upgrading to HassOs 4.15 solves it as well, but I think you don’t use HassOs.

@max83cb Are you using the batt_entities: true option?

Battery sensors are called sensor.mi_battery_MAC, so they might have changed names compared to earlier versions.