Passive BLE Monitor integration

Hello @Ernst , I must say you did an incredible job in this integration and the supported device list is amazing. This is only integration I found that supports the new Inkbird IBS-TH2 devices.

I am currently setting it up first time and I have few of the Xiaomi custom firmware sensors and also two Inkbird IBS-TH2 sensors. One is the temp and humidity (identified as sps, and one is temperature only identified as tps). The sps sensor got integrated and discovered easily with the integration. However the tps sensor is not found. Maybe you encountered this issue beforeā€¦

What I tried:
1 . adding the sensor via the UI in integration configure, then way for 24hrs. I do not see it in debug logs nor in the list of devices. It was never parsed.
2. I tried to add it via the ESP BLE Gateway and its automation. The mac address is scanned and packet is passed for parsing. But as in previous case, I do not see the device appearing nor any error in logs.
The only difference is that the device not picking up, is temperature only version of the same Inkbord IBS-TH2

Is there something I can try to dig in the logs that would help why is it not showing up ? Can I somehow parse the packet easily to see if there is any issue with that ? But I don;t see errors in logs, so not sure where to look now.

Itā€™s this product: https://www.amazon.ca/gp/product/B08S32598J

In the FAQ on github there are instructions how to add a new device. I remember that the ble parser filters on ā€œspsā€, so thatā€™s probably the reason it isnā€™t found. If you can give some ble advertisements of this device, I can add it, most likely

1 Like

That would be stunning. Should I use the btmon, or which format would you like the advertisements ?
The ESP BLE Gateway provides this info:

[13:28:27][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFF0908000000FA613306B1
[13:28:27][D][esp32_ble_tracker:723]: Found device 49:42:07:00:1D:56 RSSI=-79
[13:28:27][D][esp32_ble_tracker:744]:   Address Type: PUBLIC
[13:28:27][D][esp32_ble_tracker:746]:   Name: 'tps'
[13:40:35][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFF0700000031603306B2
[13:40:53][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFF0700000031603306B0
[13:40:54][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFF0700000031603306B0
[13:40:55][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFF0700000031603306B0
[13:41:14][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFF0700000031603306B0
[13:41:14][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFF0700000031603306B0
[15:46:03][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFF00700000065613306B4
[15:46:22][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFF10700000058A13306B0
[15:47:02][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFE070000000CA03306B2
[15:47:20][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFE070000000CA03306B1
[15:47:39][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFE070000000CA03306AE
[15:47:40][D][ble_gateway:063]: [49:42:07:00:1D:56] Packet 043E2302010000561D00074249170201060302F0FF04097470730AFFFE070000000CA03306B4

Let me know how can I help. I see few different packets sent.

And these are ones I believe come from the unknown advertisements of the integration

2022-03-04 15:53:48 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c2
2022-03-04 15:53:49 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc7
2022-03-04 15:53:49 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c8
2022-03-04 15:53:50 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc8
2022-03-04 15:53:50 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c7
2022-03-04 15:53:51 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc7
2022-03-04 15:53:51 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c7
2022-03-04 15:53:52 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc5
2022-03-04 15:53:52 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c5
2022-03-04 15:53:52 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc7
2022-03-04 15:53:52 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c6
2022-03-04 15:53:53 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc2
2022-03-04 15:53:53 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c2
2022-03-04 15:53:53 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc8
2022-03-04 15:53:53 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c7
2022-03-04 15:53:54 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc2
2022-03-04 15:53:54 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c2
2022-03-04 15:53:55 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc2
2022-03-04 15:53:55 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c2
2022-03-04 15:53:55 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc7
2022-03-04 15:53:57 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc5
2022-03-04 15:53:57 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c5
2022-03-04 15:53:57 INFO (MainThread) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e2302010000561d00074249170201060302f0ff04097470730affff0700000031603306b4
2022-03-04 15:53:58 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc5
2022-03-04 15:53:58 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc2
2022-03-04 15:53:58 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c2
2022-03-04 15:53:59 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc2
2022-03-04 15:53:59 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c2
2022-03-04 15:54:00 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc5
2022-03-04 15:54:00 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c5
2022-03-04 15:54:00 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc2
2022-03-04 15:54:00 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c2
2022-03-04 15:54:02 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc8
2022-03-04 15:54:02 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1c02010400561d000742491004097470730affff0700000031603306c7
2022-03-04 15:54:02 INFO (Thread-7) [custom_components.ble_monitor.ble_parser] Unknown advertisement received: 043e1302010000561d00074249070201060302f0ffc2

based on the reverse MAC address embedded.

By the way when I just manually changed the custom component in HA

(complete_local_name == "sps" or complete_local_name == "tps")

it picked it up. of course it tries to parse humidity, which this sensor does not support (only temperature). But the message format appears to be same.

so i got this working for one inkbird sensor and works great but has anyone got this working with other non supported inkbird sensors or even the inkbird gateway IBS-M!? currently have the gateway working through local tuya but temps are never accurate for some reason so maybe this would be better option

@OscarHanzely this is enough information, will add it this weekend.

@randr we can most likely add that one as well. Can you send me similar BLE messages as @OscarHanzely did?

@OscarHanzely Do you have a link to this device. Is it really called a IBS-TH2? Iā€™m asking as I have to add a device type, and TH stands for Temperature and Humidity. If it doesnā€™t support Humidity, its probably called something else.

Edit: As I read here, a firmware fix could fix the missing Humidity and make your device a proper TH2.

I will work on getting BLE messages

Hi Ernst, yes it is the IBS-TH2, itā€™s essentially the same device. The box and stickers are the same.

Honestly, I bought it as a temperature sensor because it goes into my freezer and I only care about the temperature, so I am not going to be soldering and upgrading firmware at the moment. But youā€™re right the HW is the same, itā€™s likely just the firmware. They sell it cheaperā€¦

I may do a firmware upgrade later down the road, but its not important for me at the moment.

@OscarHanzely Iā€™ve added support for the IBS-TH2 temperature only sensors in 7.9.5

Also added support for Relsib Hygro thermometer with CO2 sensor (model: EClerk Eco)

1 Like

Thank you so much! I see the code got updated and the temperature sensor works. Appreciate your incredibly fast response. By the way is there a way to support project other than the github sponsorship ? I had hard time getting that through and it is only $2 one time support.
Thanks

The GitHub sponsor buttons the only way. But donā€™t feel obliged to donate, Iā€™m just doing it as a hobby. Donate to charity instead.

1 Like

No worries, we do that too. If you ever set it up as recurring sponsorship on Github, not just a one-time fee, I will join for sure. Itā€™s just an appreciation and support of creators in the open-source community. You are really maintaining a pretty important plugin.

1 Like

ok, you convinced me :slight_smile: Added more possibilities to sponsor me with custom amounts and monthly amounts. Thanks for your appreciation for the work that has been done, also by others.

3 Likes

Hey! Because of a problem with hacs I have to reinstall every custom_component. I want to know if itā€™s possible to get either the encryption keys or all devices which are already set up in the BLE integration, so I donā€™t have to reset every device after the reinstall.
Thanks in advance!

You can enable debug logging for BLE monitor at debug level, which will show your settings in the log. This will show your settings, including the encryption keys, if the integration is still working. But you will have to add them sensor by sensor, if you donā€™t have a HA backup.

New sensors

:tada: In the last few releases, the following sensors have been added :tada:

  • Air Mentor pro 2
  • Switchbot Meter TH S1
  • Relsib EClerk Eco
  • IBS-TH2 without humidity (temperature only)
  • Govee H5071 (was recognized as H5051 earlier)

Enjoy!

2 Likes

Hi @Ernst, Thanks so much for all of your effort! Itā€™s amazing.
Iā€™m trying to integrate a Smoke sensor (JTYJGD03MI) and it seems itā€™ll be too far away from the RPI running HA.

Is it possible using an ESP32 as a relay? if so, is it possible using ESPHome?
Thanks!

Yes, that is possible, by using ESPhome BLE Gateway. The is even a special page on BLE monitorā€™s GitHub, see Parse data from ESPHome - Passive BLE Monitor integration. It forwards BLE messages from the ESPhome to BLE monitor over WiFi.

Thanks @Ernst, Iā€™ve seen this but Iā€™m probably missing something.
The packet itself is received in ESP32 and is printed in the log itself. Moreover, I see the automation being triggered in HA - but thatā€™s it.

Calling the service both from the automation and manually does not seem to do anything. I could not find documentation that would explain whatā€™s the service (parse_data) output, and so I canā€™t tell where the issue is.
Moreover, I could not find where in this service call I should add the BLE encryption key, as itā€™s needed for decoding the advertisements of this deviceā€¦ Can you please advise?

Thanks!

As far as I know, it doesnā€™t need an encryption key. But if you see an error in the logs about a missing encryption key in the logs, I might be wrong.

Anyway, can you create an issue on github to discuss further? Also post a BLE advertisement in that issue, so I can look into it.

The service needs an BLE advertisement as input, the output is that the sensor in HA is added and/or updated