Passive BLE Monitor integration

Got it

Apparently shared MAC and UUID are common on these BLE sensors.

Yes, it turns out that the MAC rotates. Iā€™ll need to create a fix for the jaalee, will look into that soon. Jaalee is sending both manufacturer specific data as well as iBeacon data, which is a bit weird (why would you send you two different formats?)

Edit: found out that tempeature humidity can actually be calculated with (almost) the same formula as in the iBeacon parser.

1 Like

Jaalee should be using the UUID in stead of the MAC address in BLE monitor 11.3.2. You might have to delete your old devices. I also updated the formulas.

1 Like

Great!

Now, this might be a newbie question, but how do I differentiate between my various sensors in the HA, since itā€™s the same entity/same UUID with rotating MAC?

And the values are still odd. Maybe itā€™s calculating a mean from distinct sensors values:

image

Donā€™t you have a normal temperature sensor? You should not look at the cypress temperature sensor, but only look at the normal temperature sensor. Same for humidity. Cypress temperature can be neglected. If you only have cypress sensors, it is only broadcasting in iBeacon format. Perhaps this can be changed in the app?

Are you saying that different sensors have the same uuid?

Itā€™s a Jaalee JHT.

Thereā€™s only cypress sensors in the BLE Monitor panel.

ConfiguraƧƵes-ā€“-Home-Assistant-Google-Chrome-2023-01-15-16-24-29

And seems to be the same UUID for all devices or some kind of rotating MAC.

I donā€™t find any broadcast config in app. But by Bluetooth LE Scanner, they are broadcasting Manuf and iBeacon data.

Device Name: null
Device Address: D3:35:02:E5:FA:DC

Services:--------------------------
GAP (00001800-0000-1000-8000-00805f9b34fb)
 Device Name (00002a00-0000-1000-8000-00805f9b34fb)
 Appearance (00002a01-0000-1000-8000-00805f9b34fb)
 Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)


GATT (00001801-0000-1000-8000-00805f9b34fb)
 Service Changed (00002a05-0000-1000-8000-00805f9b34fb)


Device Information (0000180a-0000-1000-8000-00805f9b34fb)
 Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
 Model Number String (00002a24-0000-1000-8000-00805f9b34fb)
 Firmware Revision String (00002a26-0000-1000-8000-00805f9b34fb)
 System ID (00002a23-0000-1000-8000-00805f9b34fb)


Unknown service (0000fff0-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff1-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff2-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff3-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff4-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff5-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff6-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff7-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000fff8-0000-1000-8000-00805f9b34fb)


Unknown service (0000ff70-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (00002a80-0000-1000-8000-00805f9b34fb)


IMMEDIATE_ALERT (00001802-0000-1000-8000-00805f9b34fb)
 Alert Level (00002a06-0000-1000-8000-00805f9b34fb)


Unknown service (0000ffb0-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000ffb1-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000ffb2-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000ffb3-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000ffb4-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (0000ffb5-0000-1000-8000-00805f9b34fb)


Unknown service (0000ff30-0000-1000-8000-00805f9b34fb)
 Ringer Control Point (00002a40-0000-1000-8000-00805f9b34fb)


Unknown service (0000ff60-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (00002a70-0000-1000-8000-00805f9b34fb)


TX_POWER (00001804-0000-1000-8000-00805f9b34fb)
 Tx Power Level (00002a07-0000-1000-8000-00805f9b34fb)


Unknown service (0000ff80-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (00002a90-0000-1000-8000-00805f9b34fb)


Unknown service (0000ff50-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (00002a60-0000-1000-8000-00805f9b34fb)


Unknown service (0000ff40-0000-1000-8000-00805f9b34fb)
 PNPID (00002a50-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (00002a51-0000-1000-8000-00805f9b34fb)


Unknown service (0000180f-0000-1000-8000-00805f9b34fb)
 Unknown characteristic (00002a19-0000-1000-8000-00805f9b34fb)


--------------------------

Hmmm, I donā€™t understand yet how someone can distinguish between sensors, all have the same UUID, and each individual sensor is rotating its MAC address, so not fixed. How on earth can an app than know which sensor is whichā€¦

Anyway, Iā€™ll first try to understand why you donā€™t get the temperature sensor.

Still not sure why you donā€™t see the temperature sensor. Your BLE message should return 'temperature': 27.57, 'humidity': 73.8, 'battery': 96,

image

Did you delete the device from the BLE monitor settings, after you updated BLE monitor?

Yes. Btw itā€™s a fresh RPi HA install Iā€™m using for tests.

I noted my Device Info section on left shows:

iBeacon
By Apple

Firmware: iBeacon

And no info with Jaalee brand. Maybe my sensor device are a fake one or needs a new firmware?

@kroma Lets continue this discussion about this issue on github in this issue

1 Like

Hi Kroma,

Try looking for an app called eBeacon by Jaalee (the iPhone version of the app has a lowercase letter e in the logo). You might be able to use that to change the UUIDs to make each device unique. (UUID means ā€œUniversal Unique Identifierā€, right? :laughing:)

Another option is an app called CheckBlue by a company called MeeBlue. It might also be able to use it to adjust the UUID on your device.

I think that Jaalee and MeeBlue are basically the same company. Sometimes they also use the name Ankhmaway. No idea though why they are always switching names.

FYI, itā€™s normal for manufacturers to send out all small orders of beacons with the same UUID at the start; itā€™s the best way to be able to give new users instructions how to use the beacon (i.e. the instructions will include the correct UUID of the brand new beacon). But they will usually also offer free config apps for adjusting the UUIDs for users of multiple beacons.

As for rotating MACs, that really is weird! I would tend to say that there is no way that is happening with these simple devices. But maybe they added this ā€œfeatureā€ for some sort of security reason?

1 Like

Jaalee sensors are now working correctly in BLE monitor 11.4.1. Had some trouble adding it, but it should now work fine.

Itā€™s cool how you two are working on this issue together but your HA screens are completely different languages! :+1:

One point to mention: Typically these temp sensors are basically iBeacons that also are measuring the temp and humidity. But they donā€™t constantly broadcast the temperature and humidity data. You need to send them a scan request and then receive back a scan response that will contain that extra data for you. The Jaalee app is doing that behind the scenes. Whatever integration you are using to get this in HA should also be doing the same scan request/response process.

To reiterate, the iBeacon data packet is not carrying this temperature and humidity data. Thereā€™s no place for this to be stored in a legit iBeacon protocol packet. I know there used to be a couple manufacturers that will put this extra data in the major minor fields, but those are rare.

One other point: I often tell people to turn OFF active scanning when they are using beacons. In other words, set the scan to passive. This means the scanner will just scan and wait to see the beacon broadcast. It will not send any scan requests. This is good for regular beacon usage since it saves the beaconā€™s battery power (i.e. the beacon is not bothered needlessly over and over again with scan requests from the scanner).

But for beacons that have additional data to send (such as temperature and humidity), you need to set the scanner to active scanning so it will ask the beacon for this additional data.

Just for reference for other possible users using beacons like this.

This integration is adding so many entires into my influxdb database. I donā€™t fully understand the sensors, but my influx has entries for V, dBm, Ā°, Ā°C, Ā°F, and of course state as well. How do I prevent all of these extra measurements from being inserted into my database?

The influxdb integration has an option to exclude entities from the database. InfluxDB - Home Assistant

I see that this integration has support for these bands (heart monitoring), but i cant find any tutorial on how to do it. iā€™ve ready extracted the band key & mac address then entered them as mi band device in the integration, but nothing shows up even after 3 days. ive tried that with and without linking the band with the mi zepp app and notify app, still doesnā€™t work.

It should automatically appear, if not something is wrong. Try to enable debug logging for this MAC address and post the logs in an issue on github and I will have a look.

1 Like

Should i fill the encryption key field or it is not necessary? iā€™ve extracted that key using the notify app (in kinda strange methode).

You can send it to me in a private message. You are able to regenerate a new one later, by removing/rea-adding it to the app, if you feel saver by that.

I meant when adding the device in the integration?.
I will try to mess with the settings, and then making an issue on github if it didnā€™t work.