Passive BLE Monitor integration

I use a TP-link UB400 with a raspberry pi, which is working fine. But haven’t tried on a VM.

Hi,
I have been trying to add the MCCGQ02HL device to home assistant. I have retrieved the bindkey via the Mi Home Mod app (and via Token Extractor to verify the result). The device is is discovered by the Passive BLE integration, but even when I input the bindkey the entities are still marked as unknown and no data is received. I have tried with 2 different MCCGQ02HL devices with the same result.
I can’t seem to find anything in the HA log either.
Any ideas?

Additionally I do have some LYWSD03MMC devices integrated successfully (with ATC firmware).

Please open an issue on github and attach a log with debug enabled at debug level. Instructions can be found in the FAQ

New Release
In the latest release(s), we have added support for Yeelight remote (YLYK01YL) and Yeelight dimmers (YLKG07YL and YLKG08YL). Please note that these 3 devices require a different encryption key (24 characters) in stead of the usual 32 characters. Instructions how to get your encryption key are added in the FAQ.

If someone finds an easier way to get the key, let us know.

I just wanted to say a big THANK YOU, this integration is awesome. It works without any problems and support for new devices is being added constantly - for example, the latest release enabled me to fully integrate 5 Yeelight remotes (from ceiling lights) into HA. They haven’t been used much in the past because they could only be paired with one ceiling light, but now via this integration - a single remote can do ‘anything’ - control multiple lights, roller-shutter blinds, start scenes, control switches, anthing really - like a proper smart remote.

I had to get this off my chest. :slight_smile: Respect!

Thanks for your kind words, much appreciated.

We recently added some more Yeelight remotes for Yeelight ceiling fan (YLYK01YL-FANRC), Yeelight ventilator fan (YLYK01YL-VENFAN) and in the next update we will add a remote for a Yeelight Bathroom heater (YLYB01YL-BHFRC).

image image image image

Future plans to be expected are

I seem to have the integration setup with my Xiaomi LYWSD03MMC, but it is polling so infrequently that’s its sometime hours between updates in HA. I can see if constantly updatying in the Xiaomi home app so I think it’s on the HA end.

I’ve notice that often when I run Bluetoothctl in terminal I get a "Failed to start discovery: org.bluez.Error.NotReady

Any ideas on how I fix this or if it is even the problem?

Most of the time, this is a reception issue. Xiaomi MiHome is relying of the connection between sensor and a gateway (or phone?), but BLE monitor is relying on the connection between your sensor and Home Assistant (e.g. a raspberry Pi). So your sensor has to be within the range of the bluetooth radio of your Rapsberry (or whatever you use). Other known sources of disturbance are SSD drives close to your Bluetooth radio, they seem to block the Bluetooth signal. Also check the FAQ on github for tips and tricks to improve reception.

Thanks for the feedback.

that definitely makes sense, especially with a SSD being very close by. The sensor is only about 10 inches from the raspberry pi but of course the SSD is right in there too.

Is it as simple as moving the sensor farther away or do I need to move the SSD a bit further away and even shield it?

FAQ gives me some great advice, thanks again.

Hopefully I can devise a suitable method to avoid the interference.

Awesome integration BTW, thanks for all your work

In my case a 20-30 cm (10 inches) long cable between Pi and SSD was sufficient to solve the problem. But you have to play with it a bit.

But you can first test if it is more responsive with the sensor next to the Pi and the SSD as far away as possible. If that works, you at least know its a reception problem. External dongles can also help improving.

Hi all,

I have purchased some of the LYWSD03MMC temperature/humidity sensors. Despite them being very close to my raspberry Pi and having good reception, the update frequency is extremely low. Like once every 10 minutes only. This is the case with the original firmware as well as with the improved firmware by pvvx.

What am I doing wrong here?

PS, I have now put it right on top of the Raspberry Pi which slightly increases signal strength according to shown RSI and now it is frequently updating. Nontheless, shouldn’t this also work with the sensor in the next room if RSI still shows a decent strength of -70 or so??

Normally, it would also update frequently at RSSI -70 dBm. Factory firmware is only sending data once in 10 minutes for the LYWSD03MMC sensor. ATC firmware can be set to whatever interval you want. So please check the settings of the firmware in the ATC webtool and use one of the custom advertising formats (not Mi-Like). It this is all set ok, I again suspect an SSD drive blocking the bluetooth radio reception (see the posts above yours).

These are the firmware settings. Any suggestion what I could change? What is strange is that it is working for a couple of minutes with frequent updates, then it stops updating alltogether.

Looks ok, interval is 10 seconds (it sends every 2500 ms, but 4 messages will have the same packet number). So in Home Assistant, it should receive about 6 unique messages per minute with these settings).

Do you have an SSD Drive close to the Bluetooth receiver (e.g. Raspberry Pi)?

Yes, I have an SSD drive in my other room (with my main desktop computer) from where I have been testing this, but it is not between the sensor and the raspberry Pi.

I moved the sensors into different rooms now and despite weak RSSI it seems to be working better now:

image

What is the issue with SSDs?

Several users who were reporting issues with receiving data, found out that an SSD drive apparently blocks the Bluetooth signals. We added this in the FAQ. I’m not into the details, it might also be the USB3 connection, but it somehow interferes. I experienced the same myself. It was solved by using a cable of 20-30 cm, placing the SSD as far away as possible from the Bluetooth radio inside the Raspberry Pi.

1 Like

Moving the SSD makes a huge difference. Getting regular readings from both my Xiaomi standard firmware device and my other one with the ATC firmware. Thanks for all the assistance

Hello,

After months working without problems, today I received following error:

HCIdump thread: Runtime error while sending scan request on hci0: Event loop stopped before Future completed.

I’m running built-in bluetooth in the RPI3. The problem started after reboot of host (automatic at 04:00 each 3 days). I didn’t make any changes recently.

I restarted the host manually again, and now it’s working.

Any clue on what was wrong?