Integrate Bluetooth battery monitoring devices (cars, motorbikes etc.)

I am looking for a solution to get the values (at least current voltage and bulk load of history data (as those devices are not constantly in range of course), maybe current percentage, connection strength) of those quite simple battery monitoring devices:


They use Bluetooth and seem to not be encrypted or something.

Basically any app can connect to them without authentication - sounds perfect for integrating it into HA. Apps e. g. ‎Battery Monitor BM2 im App Store

Unfortunately I have no idea what the original name of those devices is as there are many (only?) white labels out there so neither looking at BTHome pages nor in this community was helpful/effective so far.

Either there already is an existing specific integration OR the data can be grabbed using a default BLE monitor integration.

As I‘m new in the Bluetooth-with-HA-business I would be thankful for any hints of you out there.

1 Like

No idea?

Did I really find the first group of devices not possible to get integrated into HA?
Unbelievable, I want my picture in Guinness World Records book, where can I apply for :wink:

We integrated the percentage value into Theengs and OpenMQTTGateway

The other parameters requires a connection to the sensor.

1 Like

Interesting. Will need to have a closer look at this to better understand

  1. How it works for the percentage (my goal is zu use an ESP32 next to the BM2 sensor to send data to HA, hopefully with a configurable refresh rate to not stress the vehicle‘s battery)
  2. What is meant by

other parameters requires a connection to the sensor

Can you elaborate on that a bit more please?

The refresh rate is configurable, nevertheless, if the sensor works with a passive scan (I can check) it will not impact the 12V battery.

The BM2 publicly broadcasts the battery percentage without requiring a connection to the sensor.
Regarding the other parameters we did not find them in the broadcasting, so they likely require a connection to the sensor, which will have an impact on the battery.

1 Like

Oh first of all: I am reading through the project‘s docs, sounds fantastic! Also the variety of other sensors, really great.

Exactly that‘s the hardware I was looking for:

I will definitely give it a try once I found out how to (in theory: flash OMG to an ESP32, run it next to the BM2, (some magic), et voila data is in HA). I‘ll read the docs.

But I am also highly interested (my original motivation) in the voltage value. Also as that’s much more accurate than the percentage. I don’t know anything about the great OMG project yet, but: isn’t it possible to set a „data collection interval“ so e. g. the data is retrieved only once every few hours by actively connecting to the sensor? Is OMG basically capable to do that?

Just flash the ESP32 from here, choose esp32dev-ble

I would need to dig into this sensor a bit to see how to retrieve the voltage. But yes should be possible

Can I help you on that somehow? By cross-checking or testing things maybe?

New ESP32s are ordered.

As I’m the only one that tested it your feedback with the ESP32 will be greatly appreciated

Of course. Think next weekend mine with OMG should be running. Just tell me what you need.

Upload OMG to an ESP32 esp32dev-ble:
https://docs.openmqttgateway.com/upload/web-install.html

Configure it

And let’s see if you get the sensor into your Settings->Devices and Services-> Devices

I ordered (and am already using for other purposes, pretty happy with it) OpenMQTTGateway v1.7.0 (esp32-lolin32lite-ble). Is that fine too or why did you explicitly mention the esp32dev-ble?

On the next release, esp32-lolin32lite-ble will have low power activated per default. For barebone ESP32 better take esp32dev-ble

Will the low power mode have any negative impact (specifically on what we try to achieve: reading additional sensor values where passive scanning might not be sufficient)? Less power consumption sounds good, doesn’t it :slight_smile:

And if it’s just a config parameter to disable it… no big thing right?

I would try first without, and when we get it working you can try to experiment with it. The low power mode put in sleed the ESP32 between the scans.

While waiting for my ESP shipment a slightly off-topic question, as I have one of those BM 2 out of reach (no ESP, WiFi, MQTT/HA not even a power source next to it):

Can I use the Theengs smartphone app to read the BM 2 sensor data (like I’m doing currently with the BM 2 app where the data stays in that app) and (!) will it cache the sensor data and transfer it to the MQTT broker once it is available?

(Sidenote: the Theengs BLE app currently seems to not support the BM 2 at all :frowning_face:


)

The app doesn’t cache the data, but we had users using a VPN to push the data of a remote location to their broker.

Currently BM2 is not supported with v1.2 of the app. I will see if I can add it in v1.3 if you are interested

1 Like

Indeed it can’t be discovered as sensor (only shown as unnamed device with -99 db when being right next to it - might be a false positive).

Yes, having it in the app would be great. Even I can’t use it for now I‘m gonna keep it installed waiting for the BM 2.

Yes I (accidentally) was using VPN as my on-demand config was triggered by the MQTT broker hostname. Worked perfectly. Will just need to find out bout the different topics (A, B) etc.
…especially wondering why no new device shows up in HA even the app synced one sensor (MI_SCALE) to the MQTT broker…

Couldn’t find a documentation on that. Same for MAC address (where to get it?), what the rename feature does etc.

You could write what you want in there, as long as it follows the format. Note that this is due to iOS anonymizing the mac addresses.
If you want to let there a smartphone as a scanner, I would advise an old Android as it would background scan capability with the app.

No it was just for test purposes (expensive tests but supporting this project that way is a good thing). My Android devices (tablets) can’t run the app by the way (not shown in Aurora App Store).

My goal is to get sensor data by using ESPs with OMG. Theengs app just for one BM2 which is out of WiFi/not at home.

Will look into MQTT topics if/what is sent from the Theengs app, as still wondering why no new device/sensor is being created for the Mi Scale in the MQTT integration (Theengs and OMG do support HA auto discovery, do they?).

1 Like