Passive BLE Monitor integration

It works on my system (HA Os), but that’s not a guarantee. Bluetooth can be a PITA sometimes.

1 Like

Hello I have a YLKG07YL/YLKG08YL which I would like to integrate. So far installed HACS and added the sensor which seems to stop working after a while. I read that I have to get the encryption key somehow. However, I neither have an android nor a ceiling lamp to connect to. Is there any alternative or any more detailed guidelines for this? Many thanks and apologies for by newbie questions!

Yes there is, check the faq of BLE monitor. You can use method 5 (or 6/7).

Is it possible to track iBeacons with randomising mac addresses but static UUIDs?

No, not at this moment. Maybe in the future

1 Like

6.0.1 Release

We have released a new version with support for the following new sensors

  • iNode care sensor 1 till 6, T, HT, PT, PHT
  • Qingping CGPR1 motion sensor (Qingping advertisement format)

The Qingping sensor was already supported when it was added to MiHome. In that situation, the sensor is using the Xiaomi BLE format. But, when not connected to MiHome, the sensor is using the Qingping BLE format, which is not encrypted. BLE monitor is now supporting both BLE formats, the docs give instructions on how to switch between the two formats.

I also added an new option to enable/disable the automatic restart of the Bluetooth adapter (bt_auto_restart), in case of failures. For those who needed this function, you will have to turn it on in the options, as it is turned off by default.

The option menu in the UI now also shows the HCI number, next to the MAC address of your BT adapter, to make it easier to select the right Bluetooth adapter.

image

1 Like

This really is an excellent integration! Added a MiScale the other day - just connected!

Adding in the hci bit will be really useful. Must try a second dongle again and see if it works now (HA OS issue I think).

Nice to see correct use of semantic versioning as well :slight_smile:

1 Like

Hello all,

I’m a bit lost!

I have some temperature sensors from Xiami (LYWSD03MMC) that I would like to integrate. The sensors are encrypted, so I have to find out the bind key first.

To do this, I used the method mentioned first here: FAQ - Passive BLE Monitor integration I registered the sensors via the Xiaomi app and then used a tool to access the cloud and retrieve the key.

After I added all the info in configuration.yaml (see picture below), the device appears and also the sensors (temperature, humidity and so on) appeared, but they only show the value “unknown”. Does this mean that the decryption did not work? What could be the reason for this?

grafik

Many greetings

matclou

the LYWSD03MMC is rather slow on sending updates (once per 10 minutes, battery once an hour). So wait a while to see if it shows up. Also try to move the sensor closer, to see if there is an issue with the range. SSD drives can also cause issues with the reception, as it blocks the Bluetooth reception. Do you have other sensors that do work? Any errors in the log?

The option batt_entities has to be removed BTW, this is deprecated.

Hi,

thanks!

Okay, I will wait a bit to see if something will appear. The sensors lies beneath the server (which is a Rasperry pi). There are also other sensors that work.

Otherwise: I removed the device from the Xiami app after I added it to Home Assistant. Could this potentially cause problems because of a new bind key? I thought it wouild be the best to delete them so that not two different devices try to access the same device via Bluetooth.

EDIT: I also deleted the batt_entitities option

EDIT2: Well, still no change…

Yes, removing it from MiHome could cause a change in the encryption key. Try to add it again to MiHome and check the key again in the cloud with the token extractor. It probably has changed.

Hi all!

I’ve installed the intrgration with HACS and with UI method (not configuration.yaml).
The devices were detected but with no values showed
image

When i try to add a card, it gives me an error saying that the entity is non numeric.

Any ideas?
Thanks

Which sensor do you have? Given the MAC address, I think you have a LYWSD03MMC. This sensor needs an encryption key, did you add this in the configuration? You can get the key with one of the methods described here

Hello Ernst, do you think it could ve possible adding xiaomi scooters on ble monitor scope, having into account they communicate with mi home via BLE? :relaxed:

@Carlos-HA I don’t thing this will work, as BLE monitor only listen passively to BLE advertisements. In other words, it does not connect to the sensor/scooter, nor can it send something to the sensor/scooter, it only listens passively. But you can try by using the report_unknown option in BLE monitor, to collect some data. I can check if there is something useful in it (e.g. a battery state).

Hello, Thanks for the response!. I’ve tried as you has told me and I’ve got a ble tracker device!. It get at home or out of home options. No more information about km, battery level and so on…

Thank you very much for your great work!

It won’t add sensors (yet). With the option report_unknown: Other or report_unknown: Xiaomi you can collect all the BLE advertisements in you HA log. See the FAQ for instructions. You will have to enable this option and you will have to tell the logger to log messages at info level. After a restart, it will put the advertisements in your HA log. Copy these to an issue on Github and I will have a look. Also mention the MAC address of the scooter, this will make it easier to filter the advertisements.

Thank you @Ernst for the answer!

The only configuration that i find is this:
image

Here i find this MAC adress that has nothing to do with the equipment MAC:
image

Despite that, below i see this option to select one device. Should i select any?

Thanks

You need the last one, devices. Select the MAC address of your sensor and click on submit. This will open a new window where you can enter the encryption key

Hi @Ernst, a small point, it should be instead instead of “in stead” :slight_smile: