BM2 battery monitoring using ble tracker component

Good morning all,

I’ve recently discovered the joys of HA and ESPHome. I’ve been moving my stuff from espeasy to ESPHome.

One thing that I’d really like to do is to read a BM2 battery monitor (like this: https://smile.amazon.co.uk/Battery-Monitor-Campervans-Compatible-bluetooth/dp/B08VHMJYXY/ref=sr_1_5?keywords=bm2+battery+monitor&qid=1649225601&sprefix=bm2%2Caps%2C141&sr=8-5) from my weekend car and report when it needs charging up.

I use a BM2 battery monitor in the car and use the supplied app. I’d like to see if I can get the data directly into HA. I’ve bought an ESP32 and got the BLE tracker bit up and can see the device in question:

|07:11:16|[D]|[ble_adv:037]|New BLE device|
| --- | --- | --- | --- |
|07:11:16|[D]|[ble_adv:038]|address: B0:B1:13:29:B6:F0|
|07:11:16|[D]|[ble_adv:039]|name: Battery Monitor|
|07:11:16|[D]|[ble_adv:040]|Advertised service UUIDs:|
|07:11:16|[D]|[ble_adv:042]|- 0xFFF0|
|07:11:16|[D]|[ble_adv:042]|- 0xFFF0|
|07:11:16|[D]|[ble_adv:044]|Advertised service data:|
|07:11:16|[D]|[ble_adv:048]|Advertised manufacturer data:|
|07:11:16|[D]|[ble_adv:048]|Advertised manufacturer data:|

I can’t seem to get any data from it though and am starting to hit my limits on what I can do.

I’ve taken some logs from nrfConnect app (which is a BT Snooper)

nRF Connect, 2022-04-05
Battery Monitor (B0:B1:13:29:B6:F0)
V	19:31:15.004	Connecting to B0:B1:13:29:B6:F0...
D	19:31:15.004	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D	19:31:16.669	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I	19:31:16.669	Connected to B0:B1:13:29:B6:F0
D	19:31:16.670	wait(1600ms)
D	19:31:16.682	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I	19:31:17.997	Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 1500ms)
V	19:31:18.270	Discovering services...
D	19:31:18.270	gatt.discoverServices()
D	19:31:18.287	[Callback] Services discovered with status: 0
I	19:31:18.288	Services discovered
V	19:31:18.301	Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
- Peripheral Privacy Flag [R W] (0x2A02)
- Reconnection Address [W] (0x2A03)
- Peripheral Preferred Connection Parameters [R] (0x2A04)
Generic Attribute (0x1801)
- Service Changed [I] (0x2A05)
   Client Characteristic Configuration (0x2902)
Device Information (0x180A)
- System ID [R] (0x2A23)
- Model Number String [R] (0x2A24)
- Serial Number String [R] (0x2A25)
- Firmware Revision String [R] (0x2A26)
- Hardware Revision String [R] (0x2A27)
- Software Revision String [R] (0x2A28)
- Manufacturer Name String [R] (0x2A29)
- IEEE 11073-20601 Regulatory Certification Data List [R] (0x2A2A)
- PnP ID [R] (0x2A50)
Unknown Service (0000fff0-0000-1000-8000-00805f9b34fb)
- Unknown Characteristic [R W] (0000fff1-0000-1000-8000-00805f9b34fb)
   Characteristic User Description (0x2901)
- Unknown Characteristic [R] (0000fff2-0000-1000-8000-00805f9b34fb)
   Characteristic User Description (0x2901)
- Unknown Characteristic [W] (0000fff3-0000-1000-8000-00805f9b34fb)
   Characteristic User Description (0x2901)
- Unknown Characteristic [N] (0000fff4-0000-1000-8000-00805f9b34fb)
   Client Characteristic Configuration (0x2902)
   Characteristic User Description (0x2901)
- Unknown Characteristic [R] (0000fff5-0000-1000-8000-00805f9b34fb)
   Characteristic User Description (0x2901)
Unknown Service (f000ffc0-0451-4000-b000-000000000000)
- Unknown Characteristic [N W WNR] (f000ffc1-0451-4000-b000-000000000000)
   Client Characteristic Configuration (0x2902)
   Characteristic User Description (0x2901)
- Unknown Characteristic [N W WNR] (f000ffc2-0451-4000-b000-000000000000)
   Client Characteristic Configuration (0x2902)
   Characteristic User Description (0x2901)
D	19:31:18.301	gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D	19:31:18.304	gatt.setCharacteristicNotification(0000fff4-0000-1000-8000-00805f9b34fb, true)
D	19:31:18.308	gatt.setCharacteristicNotification(f000ffc1-0451-4000-b000-000000000000, true)
D	19:31:18.309	gatt.setCharacteristicNotification(f000ffc2-0451-4000-b000-000000000000, true)
I	19:31:18.514	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) F0-E8-2C-28-2B-3A-9E-1F-9E-94-55-41-6A-31-8C-5C
A	19:31:18.514	"(0x) F0-E8-2C-28-2B-3A-9E-1F-9E-94-55-41-6A-31-8C-5C" received
I	19:31:19.527	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 01-47-C3-9F-6C-7A-16-9A-7D-9F-9B-37-0B-B4-8E-FE
A	19:31:19.527	"(0x) 01-47-C3-9F-6C-7A-16-9A-7D-9F-9B-37-0B-B4-8E-FE" received
I	19:31:20.499	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 7E-FB-7C-C5-ED-67-24-32-B7-C4-6E-9C-28-09-DB-20
A	19:31:20.499	"(0x) 7E-FB-7C-C5-ED-67-24-32-B7-C4-6E-9C-28-09-DB-20" received
V	19:31:20.955	Reading characteristic 00002a00-0000-1000-8000-00805f9b34fb
D	19:31:20.955	gatt.readCharacteristic(00002a00-0000-1000-8000-00805f9b34fb)
I	19:31:21.027	Read Response received from 00002a00-0000-1000-8000-00805f9b34fb, value: (0x) 42-61-74-74-65-72-79-20-4D-6F-6E-69-74-6F-72, "Battery Monitor"
A	19:31:21.027	"Battery Monitor" received
I	19:31:21.509	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) CD-2C-8D-0E-CF-08-58-19-99-92-73-6A-DC-87-1D-F7
A	19:31:21.509	"(0x) CD-2C-8D-0E-CF-08-58-19-99-92-73-6A-DC-87-1D-F7" received
V	19:31:21.738	Reading characteristic 00002a01-0000-1000-8000-00805f9b34fb
D	19:31:21.738	gatt.readCharacteristic(00002a01-0000-1000-8000-00805f9b34fb)
I	19:31:21.836	Read Response received from 00002a01-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:31:21.836	"[0] Unknown" received
I	19:31:22.535	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 98-91-92-CF-F8-2F-ED-51-03-2F-1E-27-0D-DC-D2-E0
A	19:31:22.535	"(0x) 98-91-92-CF-F8-2F-ED-51-03-2F-1E-27-0D-DC-D2-E0" received
V	19:31:23.225	Reading characteristic 00002a02-0000-1000-8000-00805f9b34fb
D	19:31:23.225	gatt.readCharacteristic(00002a02-0000-1000-8000-00805f9b34fb)
I	19:31:23.308	Read Response received from 00002a02-0000-1000-8000-00805f9b34fb, value: (0x) 00
A	19:31:23.308	"Privacy is disabled in this device" received
I	19:31:23.488	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) A7-13-4F-CA-D7-FB-FF-73-00-52-9E-13-46-46-FF-C0
A	19:31:23.488	"(0x) A7-13-4F-CA-D7-FB-FF-73-00-52-9E-13-46-46-FF-C0" received
I	19:31:24.517	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 56-FC-79-6A-8F-39-E4-83-32-5C-13-45-0E-0C-12-FD
A	19:31:24.517	"(0x) 56-FC-79-6A-8F-39-E4-83-32-5C-13-45-0E-0C-12-FD" received
I	19:31:25.539	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) D5-C8-29-EE-58-69-8A-04-80-A1-B4-99-06-87-65-F5
A	19:31:25.539	"(0x) D5-C8-29-EE-58-69-8A-04-80-A1-B4-99-06-87-65-F5" received
V	19:31:25.847	Reading characteristic 00002a04-0000-1000-8000-00805f9b34fb
D	19:31:25.847	gatt.readCharacteristic(00002a04-0000-1000-8000-00805f9b34fb)
I	19:31:25.918	Read Response received from 00002a04-0000-1000-8000-00805f9b34fb, value: (0x) 50-00-A0-00-00-00-E8-03
A	19:31:25.919	"Connection Interval: 100.00ms - 200.00ms,
Slave Latency: 0,
Supervision Timeout Multiplier: 1000" received
I	19:31:26.492	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) DB-B8-0C-F9-B0-C7-0E-F7-FE-A1-DE-B5-60-53-BD-AE
A	19:31:26.492	"(0x) DB-B8-0C-F9-B0-C7-0E-F7-FE-A1-DE-B5-60-53-BD-AE" received
I	19:31:27.517	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 1C-3B-88-92-CC-35-DA-24-84-96-88-2D-56-04-AB-48
A	19:31:27.517	"(0x) 1C-3B-88-92-CC-35-DA-24-84-96-88-2D-56-04-AB-48" received
I	19:31:28.535	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 9F-F4-FA-70-02-1B-25-27-5B-1A-49-10-8B-DE-2C-0F
A	19:31:28.535	"(0x) 9F-F4-FA-70-02-1B-25-27-5B-1A-49-10-8B-DE-2C-0F" received
I	19:31:29.498	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 75-17-93-90-2E-AF-F8-E6-C9-0C-C9-40-CA-9F-33-D7
A	19:31:29.498	"(0x) 75-17-93-90-2E-AF-F8-E6-C9-0C-C9-40-CA-9F-33-D7" received
I	19:31:30.518	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 03-05-EC-44-AB-CB-C2-4C-99-A1-07-FB-66-4F-B4-4F
A	19:31:30.518	"(0x) 03-05-EC-44-AB-CB-C2-4C-99-A1-07-FB-66-4F-B4-4F" received
I	19:31:31.539	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) DB-2E-28-08-B8-06-0F-69-9F-83-49-61-3B-C7-F8-61
A	19:31:31.539	"(0x) DB-2E-28-08-B8-06-0F-69-9F-83-49-61-3B-C7-F8-61" received
V	19:31:32.479	Reading characteristic 00002a23-0000-1000-8000-00805f9b34fb
D	19:31:32.479	gatt.readCharacteristic(00002a23-0000-1000-8000-00805f9b34fb)
I	19:31:32.517	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 36-BE-DA-0E-16-23-FA-12-91-2C-FD-5F-DC-6E-1C-03
A	19:31:32.517	"(0x) 36-BE-DA-0E-16-23-FA-12-91-2C-FD-5F-DC-6E-1C-03" received
I	19:31:32.547	Read Response received from 00002a23-0000-1000-8000-00805f9b34fb, value: (0x) F0-B6-29-00-00-13-B1-B0
A	19:31:32.547	"(0x) F0-B6-29-00-00-13-B1-B0" received
V	19:31:33.029	Reading characteristic 00002a24-0000-1000-8000-00805f9b34fb
D	19:31:33.030	gatt.readCharacteristic(00002a24-0000-1000-8000-00805f9b34fb)
I	19:31:33.117	Read Response received from 00002a24-0000-1000-8000-00805f9b34fb, value: (0x) 4D-6F-64-65-6C-20-4E-75-6D-62-65-72, "Model Number"
A	19:31:33.117	"Model Number" received
I	19:31:33.507	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) D1-01-0F-5F-F6-E9-56-2C-5B-6C-8D-FA-76-F0-29-BA
A	19:31:33.507	"(0x) D1-01-0F-5F-F6-E9-56-2C-5B-6C-8D-FA-76-F0-29-BA" received
I	19:31:34.526	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) CA-91-23-2D-C6-B9-A2-2A-76-F5-44-58-44-7E-E9-84
A	19:31:34.526	"(0x) CA-91-23-2D-C6-B9-A2-2A-76-F5-44-58-44-7E-E9-84" received
V	19:31:34.767	Reading characteristic 00002a25-0000-1000-8000-00805f9b34fb
D	19:31:34.767	gatt.readCharacteristic(00002a25-0000-1000-8000-00805f9b34fb)
I	19:31:34.856	Read Response received from 00002a25-0000-1000-8000-00805f9b34fb, value: (0x) 53-65-72-69-61-6C-20-4E-75-6D-62-65-72, "Serial Number"
A	19:31:34.856	"Serial Number" received
I	19:31:35.487	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) E6-20-4A-29-EC-F5-69-24-80-1D-29-3F-54-FE-C0-00
A	19:31:35.487	"(0x) E6-20-4A-29-EC-F5-69-24-80-1D-29-3F-54-FE-C0-00" received
V	19:31:35.819	Reading characteristic 00002a26-0000-1000-8000-00805f9b34fb
D	19:31:35.819	gatt.readCharacteristic(00002a26-0000-1000-8000-00805f9b34fb)
I	19:31:35.907	Read Response received from 00002a26-0000-1000-8000-00805f9b34fb, value: (0x) 46-69-72-6D-77-61-72-65-20-52-65-76-69-73-69-6F-6E, "Firmware Revision"
A	19:31:35.907	"Firmware Revision" received
I	19:31:36.507	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 49-CB-F0-B3-BF-7E-A9-56-4E-F7-C7-3C-EB-D8-F2-69
A	19:31:36.507	"(0x) 49-CB-F0-B3-BF-7E-A9-56-4E-F7-C7-3C-EB-D8-F2-69" received
V	19:31:37.072	Reading characteristic 00002a27-0000-1000-8000-00805f9b34fb
D	19:31:37.072	gatt.readCharacteristic(00002a27-0000-1000-8000-00805f9b34fb)
I	19:31:37.136	Read Response received from 00002a27-0000-1000-8000-00805f9b34fb, value: (0x) 48-61-72-64-77-61-72-65-20-52-65-76-69-73-69-6F-6E, "Hardware Revision"
A	19:31:37.136	"Hardware Revision" received
I	19:31:37.527	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 93-9A-32-01-EB-9F-AC-01-06-30-1A-0E-C5-85-6C-0D
A	19:31:37.527	"(0x) 93-9A-32-01-EB-9F-AC-01-06-30-1A-0E-C5-85-6C-0D" received
V	19:31:38.459	Reading characteristic 00002a28-0000-1000-8000-00805f9b34fb
D	19:31:38.459	gatt.readCharacteristic(00002a28-0000-1000-8000-00805f9b34fb)
I	19:31:38.486	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 61-2D-A3-58-EE-52-B7-76-7F-1A-18-8A-58-C0-6E-64
A	19:31:38.486	"(0x) 61-2D-A3-58-EE-52-B7-76-7F-1A-18-8A-58-C0-6E-64" received
I	19:31:38.516	Read Response received from 00002a28-0000-1000-8000-00805f9b34fb, value: (0x) 53-6F-66-74-77-61-72-65-20-52-65-76-69-73-69-6F-6E, "Software Revision"
A	19:31:38.516	"Software Revision" received
V	19:31:39.344	Reading characteristic 00002a29-0000-1000-8000-00805f9b34fb
D	19:31:39.344	gatt.readCharacteristic(00002a29-0000-1000-8000-00805f9b34fb)
I	19:31:39.417	Read Response received from 00002a29-0000-1000-8000-00805f9b34fb, value: (0x) 4D-61-6E-75-66-61-63-74-75-72-65-72-20-4E-61-6D-65, "Manufacturer Name"
A	19:31:39.417	"Manufacturer Name" received
I	19:31:39.507	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) D0-2F-EA-D1-C3-19-2D-F2-9A-58-C8-C8-4C-AB-13-D1
A	19:31:39.507	"(0x) D0-2F-EA-D1-C3-19-2D-F2-9A-58-C8-C8-4C-AB-13-D1" received
I	19:31:40.497	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 2D-B8-DA-FE-49-97-05-B0-E2-42-D7-95-92-8A-65-4B
A	19:31:40.497	"(0x) 2D-B8-DA-FE-49-97-05-B0-E2-42-D7-95-92-8A-65-4B" received
V	19:31:40.800	Reading characteristic 00002a2a-0000-1000-8000-00805f9b34fb
D	19:31:40.800	gatt.readCharacteristic(00002a2a-0000-1000-8000-00805f9b34fb)
I	19:31:40.887	Read Response received from 00002a2a-0000-1000-8000-00805f9b34fb, value: (0x) FE-00-65-78-70-65-72-69-6D-65-6E-74-61-6C
A	19:31:40.887	"(0x) FE-00-65-78-70-65-72-69-6D-65-6E-74-61-6C" received
V	19:31:41.484	Reading characteristic 00002a50-0000-1000-8000-00805f9b34fb
D	19:31:41.484	gatt.readCharacteristic(00002a50-0000-1000-8000-00805f9b34fb)
I	19:31:41.503	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) D0-C3-64-33-F8-91-F2-5C-6B-FC-5B-89-8F-96-4E-8E
A	19:31:41.503	"(0x) D0-C3-64-33-F8-91-F2-5C-6B-FC-5B-89-8F-96-4E-8E" received
I	19:31:41.547	Read Response received from 00002a50-0000-1000-8000-00805f9b34fb, value: (0x) 01-0D-00-00-00-10-01
A	19:31:41.547	"Bluetooth SIG Company: Texas Instruments Inc. <0x000D>
Product Id: 0
Product Version: 272" received
I	19:31:42.507	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) AD-DE-3C-FB-65-20-FD-67-EC-C9-AC-8C-2E-BC-0D-A1
A	19:31:42.507	"(0x) AD-DE-3C-FB-65-20-FD-67-EC-C9-AC-8C-2E-BC-0D-A1" received
I	19:31:43.526	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 9E-00-A5-D5-76-E0-40-81-0B-98-B5-BA-2C-1E-3B-93
A	19:31:43.526	"(0x) 9E-00-A5-D5-76-E0-40-81-0B-98-B5-BA-2C-1E-3B-93" received
I	19:31:44.498	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) C6-03-35-9D-E0-6C-E4-00-F5-9B-ED-0E-A5-06-5A-7A
A	19:31:44.498	"(0x) C6-03-35-9D-E0-6C-E4-00-F5-9B-ED-0E-A5-06-5A-7A" received
I	19:31:45.518	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 76-EB-7B-BC-E1-54-59-CB-9D-DB-EC-2C-5C-74-82-42
A	19:31:45.518	"(0x) 76-EB-7B-BC-E1-54-59-CB-9D-DB-EC-2C-5C-74-82-42" received
V	19:31:46.011	Reading characteristic 0000fff1-0000-1000-8000-00805f9b34fb
D	19:31:46.011	gatt.readCharacteristic(0000fff1-0000-1000-8000-00805f9b34fb)
I	19:31:46.075	Read Response received from 0000fff1-0000-1000-8000-00805f9b34fb, value: (0x) 01
A	19:31:46.075	"(0x) 01" received
I	19:31:46.527	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 4D-5A-5F-74-14-A0-78-EE-66-06-85-04-61-5F-77-56
A	19:31:46.527	"(0x) 4D-5A-5F-74-14-A0-78-EE-66-06-85-04-61-5F-77-56" received
I	19:31:47.498	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) C5-36-E4-BC-0F-63-FF-B5-EB-85-66-58-82-93-E4-4C
A	19:31:47.498	"(0x) C5-36-E4-BC-0F-63-FF-B5-EB-85-66-58-82-93-E4-4C" received
I	19:31:48.518	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 69-7C-CA-27-F9-79-F6-C8-F1-9D-D9-35-EC-85-2C-21
A	19:31:48.518	"(0x) 69-7C-CA-27-F9-79-F6-C8-F1-9D-D9-35-EC-85-2C-21" received
V	19:31:49.086	Reading characteristic 0000fff2-0000-1000-8000-00805f9b34fb
D	19:31:49.087	gatt.readCharacteristic(0000fff2-0000-1000-8000-00805f9b34fb)
I	19:31:49.169	Read Response received from 0000fff2-0000-1000-8000-00805f9b34fb, value: (0x) 02
A	19:31:49.169	"(0x) 02" received
I	19:31:49.497	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 9A-CA-94-12-1F-D5-66-AA-F6-63-F6-C3-57-51-E9-AF
A	19:31:49.497	"(0x) 9A-CA-94-12-1F-D5-66-AA-F6-63-F6-C3-57-51-E9-AF" received
I	19:31:50.524	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 5D-3F-67-9A-71-71-C2-C2-32-80-81-D2-77-DE-FD-B0
A	19:31:50.524	"(0x) 5D-3F-67-9A-71-71-C2-C2-32-80-81-D2-77-DE-FD-B0" received
V	19:31:50.624	Reading descriptor 00002901-0000-1000-8000-00805f9b34fb
D	19:31:50.624	gatt.readDescriptor(00002901-0000-1000-8000-00805f9b34fb)
I	19:31:50.697	Read Response received from descr. 00002901-0000-1000-8000-00805f9b34fb, value: (0x) 43-68-61-72-61-63-74-65-72-69-73-74-69-63-20-32, "Characteristic 2"
A	19:31:50.697	"Characteristic 2" received
I	19:31:51.514	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 24-88-2B-06-35-7D-B6-AA-95-EC-5C-54-06-14-0C-6A
A	19:31:51.514	"(0x) 24-88-2B-06-35-7D-B6-AA-95-EC-5C-54-06-14-0C-6A" received
I	19:31:52.531	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 7D-10-7F-DF-C8-3A-53-E9-79-8D-25-D1-0A-B6-E9-E5
A	19:31:52.531	"(0x) 7D-10-7F-DF-C8-3A-53-E9-79-8D-25-D1-0A-B6-E9-E5" received
V	19:31:53.231	Reading descriptor 00002901-0000-1000-8000-00805f9b34fb
D	19:31:53.231	gatt.readDescriptor(00002901-0000-1000-8000-00805f9b34fb)
I	19:31:53.338	Read Response received from descr. 00002901-0000-1000-8000-00805f9b34fb, value: (0x) 43-68-61-72-61-63-74-65-72-69-73-74-69-63-20-33, "Characteristic 3"
A	19:31:53.338	"Characteristic 3" received
I	19:31:53.489	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 9C-86-90-F2-D6-63-35-73-F4-6F-9B-B2-4B-E6-F9-54
A	19:31:53.489	"(0x) 9C-86-90-F2-D6-63-35-73-F4-6F-9B-B2-4B-E6-F9-54" received
I	19:31:54.519	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) BF-B0-B3-5D-3B-FE-3E-51-9C-B0-F1-B1-85-E5-65-17
A	19:31:54.519	"(0x) BF-B0-B3-5D-3B-FE-3E-51-9C-B0-F1-B1-85-E5-65-17" received
V	19:31:55.201	Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D	19:31:55.201	gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I	19:31:55.288	Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:31:55.288	"Notifications and indications disabled" received
D	19:31:55.292	gatt.setCharacteristicNotification(0000fff4-0000-1000-8000-00805f9b34fb, false)
V	19:31:55.294	Notifications and indications disabled for 0000fff4-0000-1000-8000-00805f9b34fb
V	19:31:57.136	Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D	19:31:57.137	gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I	19:31:57.206	Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:31:57.206	"Notifications and indications disabled" received
V	19:31:57.955	Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D	19:31:57.955	gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I	19:31:58.048	Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:31:58.048	"Notifications and indications disabled" received
V	19:31:59.142	Enabling notifications for 0000fff4-0000-1000-8000-00805f9b34fb
D	19:31:59.142	gatt.setCharacteristicNotification(0000fff4-0000-1000-8000-00805f9b34fb, true)
D	19:31:59.143	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100)
I	19:31:59.216	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A	19:31:59.216	"Notifications enabled" sent
V	19:31:59.219	Notifications enabled for 0000fff4-0000-1000-8000-00805f9b34fb
I	19:31:59.493	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 42-00-BF-15-3D-37-C2-1C-C9-2F-65-2E-85-D7-D7-17
A	19:31:59.493	"(0x) 42-00-BF-15-3D-37-C2-1C-C9-2F-65-2E-85-D7-D7-17" received
V	19:32:00.194	Disabling notifications for 0000fff4-0000-1000-8000-00805f9b34fb
D	19:32:00.194	gatt.setCharacteristicNotification(0000fff4-0000-1000-8000-00805f9b34fb, false)
D	19:32:00.196	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0000)
I	19:32:00.297	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:32:00.297	"Notifications and indications disabled" sent
V	19:32:00.301	Notifications and indications disabled for 0000fff4-0000-1000-8000-00805f9b34fb
V	19:32:01.549	Enabling notifications for 0000fff4-0000-1000-8000-00805f9b34fb
D	19:32:01.549	gatt.setCharacteristicNotification(0000fff4-0000-1000-8000-00805f9b34fb, true)
D	19:32:01.551	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100)
I	19:32:01.586	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A	19:32:01.586	"Notifications enabled" sent
V	19:32:01.588	Notifications enabled for 0000fff4-0000-1000-8000-00805f9b34fb
I	19:32:02.492	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 64-66-86-60-25-D1-70-B9-BD-28-2C-A3-94-8A-B5-17
A	19:32:02.492	"(0x) 64-66-86-60-25-D1-70-B9-BD-28-2C-A3-94-8A-B5-17" received
I	19:32:03.520	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 73-50-50-42-A8-D9-44-C3-F9-23-A7-03-72-4E-7C-A4
A	19:32:03.520	"(0x) 73-50-50-42-A8-D9-44-C3-F9-23-A7-03-72-4E-7C-A4" received
V	19:32:04.018	Reading descriptor 00002901-0000-1000-8000-00805f9b34fb
D	19:32:04.018	gatt.readDescriptor(00002901-0000-1000-8000-00805f9b34fb)
I	19:32:04.107	Read Response received from descr. 00002901-0000-1000-8000-00805f9b34fb, value: (0x) 43-68-61-72-61-63-74-65-72-69-73-74-69-63-20-34, "Characteristic 4"
A	19:32:04.107	"Characteristic 4" received
I	19:32:04.528	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 4E-31-A8-14-BD-39-2F-49-0C-8A-FD-AD-80-A6-BA-A3
A	19:32:04.528	"(0x) 4E-31-A8-14-BD-39-2F-49-0C-8A-FD-AD-80-A6-BA-A3" received
I	19:32:05.518	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) BD-87-DD-DB-7F-3F-E9-81-1B-87-C7-A8-89-47-8E-2B
A	19:32:05.518	"(0x) BD-87-DD-DB-7F-3F-E9-81-1B-87-C7-A8-89-47-8E-2B" received
V	19:32:05.624	Reading descriptor 00002901-0000-1000-8000-00805f9b34fb
D	19:32:05.624	gatt.readDescriptor(00002901-0000-1000-8000-00805f9b34fb)
I	19:32:05.697	Read Response received from descr. 00002901-0000-1000-8000-00805f9b34fb, value: (0x) 43-68-61-72-61-63-74-65-72-69-73-74-69-63-20-35, "Characteristic 5"
A	19:32:05.697	"Characteristic 5" received
I	19:32:06.511	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 6C-C2-49-F6-CA-07-9D-7B-B4-0F-17-72-6E-DF-30-7A
A	19:32:06.511	"(0x) 6C-C2-49-F6-CA-07-9D-7B-B4-0F-17-72-6E-DF-30-7A" received
I	19:32:07.534	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) F6-D3-D9-F9-C0-34-16-E1-68-4B-3E-20-A7-1A-61-8D
A	19:32:07.534	"(0x) F6-D3-D9-F9-C0-34-16-E1-68-4B-3E-20-A7-1A-61-8D" received
I	19:32:08.486	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 1A-BE-7B-43-DA-5F-99-A9-88-29-E9-58-D9-47-19-E5
A	19:32:08.486	"(0x) 1A-BE-7B-43-DA-5F-99-A9-88-29-E9-58-D9-47-19-E5" received
I	19:32:09.517	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 7B-15-AF-22-8C-F9-6A-08-13-74-EA-02-BA-6A-0A-09
A	19:32:09.517	"(0x) 7B-15-AF-22-8C-F9-6A-08-13-74-EA-02-BA-6A-0A-09" received
I	19:32:10.541	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) C5-A4-2A-9D-3D-D0-74-F9-19-5D-69-BE-6A-90-D9-75
A	19:32:10.541	"(0x) C5-A4-2A-9D-3D-D0-74-F9-19-5D-69-BE-6A-90-D9-75" received
I	19:32:11.497	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 9A-A6-9A-85-7F-39-9C-58-32-09-C1-1D-A7-B8-86-3B
A	19:32:11.497	"(0x) 9A-A6-9A-85-7F-39-9C-58-32-09-C1-1D-A7-B8-86-3B" received
V	19:32:12.505	Disabling notifications for f000ffc1-0451-4000-b000-000000000000
D	19:32:12.505	gatt.setCharacteristicNotification(f000ffc1-0451-4000-b000-000000000000, false)
D	19:32:12.506	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0000)
I	19:32:12.507	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 8E-16-E2-AF-E7-7E-AD-CC-00-73-4A-47-03-74-F9-28
A	19:32:12.507	"(0x) 8E-16-E2-AF-E7-7E-AD-CC-00-73-4A-47-03-74-F9-28" received
I	19:32:12.566	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:32:12.566	"Notifications and indications disabled" sent
V	19:32:12.567	Notifications and indications disabled for f000ffc1-0451-4000-b000-000000000000
I	19:32:13.527	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) DC-35-97-67-60-9C-F6-08-A6-9B-CE-22-5B-76-5F-F6
A	19:32:13.527	"(0x) DC-35-97-67-60-9C-F6-08-A6-9B-CE-22-5B-76-5F-F6" received
I	19:32:14.498	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) EB-E9-BA-35-E1-01-9E-26-0D-DA-F8-0E-C3-71-BB-A5
A	19:32:14.498	"(0x) EB-E9-BA-35-E1-01-9E-26-0D-DA-F8-0E-C3-71-BB-A5" received
V	19:32:14.675	Enabling notifications for f000ffc1-0451-4000-b000-000000000000
D	19:32:14.675	gatt.setCharacteristicNotification(f000ffc1-0451-4000-b000-000000000000, true)
D	19:32:14.676	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100)
I	19:32:14.756	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A	19:32:14.756	"Notifications enabled" sent
V	19:32:14.759	Notifications enabled for f000ffc1-0451-4000-b000-000000000000
V	19:32:15.429	Disabling notifications for f000ffc1-0451-4000-b000-000000000000
D	19:32:15.429	gatt.setCharacteristicNotification(f000ffc1-0451-4000-b000-000000000000, false)
D	19:32:15.430	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0000)
I	19:32:15.506	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:32:15.506	"Notifications and indications disabled" sent
V	19:32:15.509	Notifications and indications disabled for f000ffc1-0451-4000-b000-000000000000
I	19:32:15.511	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) AB-35-0B-A2-C6-54-CC-65-AC-00-40-A1-C6-F3-E7-58
A	19:32:15.511	"(0x) AB-35-0B-A2-C6-54-CC-65-AC-00-40-A1-C6-F3-E7-58" received
V	19:32:16.333	Enabling notifications for f000ffc1-0451-4000-b000-000000000000
D	19:32:16.333	gatt.setCharacteristicNotification(f000ffc1-0451-4000-b000-000000000000, true)
D	19:32:16.335	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100)
I	19:32:16.407	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A	19:32:16.407	"Notifications enabled" sent
V	19:32:16.409	Notifications enabled for f000ffc1-0451-4000-b000-000000000000
I	19:32:16.527	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 47-47-88-DE-A7-42-94-B8-A7-FB-E0-55-F0-03-D8-FD
A	19:32:16.527	"(0x) 47-47-88-DE-A7-42-94-B8-A7-FB-E0-55-F0-03-D8-FD" received
I	19:32:17.486	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 97-2D-90-D1-B7-DE-33-58-7F-41-3A-E4-2C-7C-97-A1
A	19:32:17.486	"(0x) 97-2D-90-D1-B7-DE-33-58-7F-41-3A-E4-2C-7C-97-A1" received
I	19:32:18.518	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) B2-AC-14-69-DC-BD-11-2D-5E-CB-CD-70-37-9A-E7-E8
A	19:32:18.518	"(0x) B2-AC-14-69-DC-BD-11-2D-5E-CB-CD-70-37-9A-E7-E8" received
V	19:32:19.355	Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D	19:32:19.355	gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I	19:32:19.437	Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A	19:32:19.437	"Notifications enabled" received
I	19:32:19.526	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 25-84-15-BE-49-64-57-DD-09-4B-C6-C1-97-F3-1C-57
A	19:32:19.526	"(0x) 25-84-15-BE-49-64-57-DD-09-4B-C6-C1-97-F3-1C-57" received
V	19:32:20.190	Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D	19:32:20.190	gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I	19:32:20.276	Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
A	19:32:20.276	"Notifications enabled" received
I	19:32:20.487	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 18-4E-31-F2-80-9C-6A-13-2B-A7-A4-C2-F6-B0-E1-AC
A	19:32:20.487	"(0x) 18-4E-31-F2-80-9C-6A-13-2B-A7-A4-C2-F6-B0-E1-AC" received
I	19:32:21.506	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 37-B6-86-A0-FF-33-3F-CC-16-1A-1B-9F-FD-8E-DE-5D
A	19:32:21.506	"(0x) 37-B6-86-A0-FF-33-3F-CC-16-1A-1B-9F-FD-8E-DE-5D" received
I	19:32:22.537	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 07-0B-C5-74-BC-AF-ED-3C-03-E1-E2-5C-4A-41-D7-C4
A	19:32:22.537	"(0x) 07-0B-C5-74-BC-AF-ED-3C-03-E1-E2-5C-4A-41-D7-C4" received
V	19:32:22.964	Reading descriptor 00002901-0000-1000-8000-00805f9b34fb
D	19:32:22.964	gatt.readDescriptor(00002901-0000-1000-8000-00805f9b34fb)
I	19:32:23.037	Read Response received from descr. 00002901-0000-1000-8000-00805f9b34fb, value: (0x) 49-6D-67-20-49-64-65-6E-74-69-66-79, "Img Identify"
A	19:32:23.037	"Img Identify" received
I	19:32:23.487	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 7A-7F-38-AB-68-63-55-FE-55-96-3B-A3-36-23-87-76
A	19:32:23.487	"(0x) 7A-7F-38-AB-68-63-55-FE-55-96-3B-A3-36-23-87-76" received
I	19:32:24.517	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 76-BE-E8-1B-70-89-86-D4-33-48-35-07-AC-2A-15-73
A	19:32:24.517	"(0x) 76-BE-E8-1B-70-89-86-D4-33-48-35-07-AC-2A-15-73" received
V	19:32:25.057	Reading descriptor 00002901-0000-1000-8000-00805f9b34fb
D	19:32:25.057	gatt.readDescriptor(00002901-0000-1000-8000-00805f9b34fb)
I	19:32:25.137	Read Response received from descr. 00002901-0000-1000-8000-00805f9b34fb, value: (0x) 49-6D-67-20-42-6C-6F-63-6B, "Img Block"
A	19:32:25.137	"Img Block" received
I	19:32:25.528	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) 84-33-62-9D-9E-65-F7-90-E9-ED-A1-90-BE-C9-6E-B9
A	19:32:25.528	"(0x) 84-33-62-9D-9E-65-F7-90-E9-ED-A1-90-BE-C9-6E-B9" received
I	19:32:26.498	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) C3-BE-C4-9D-EF-69-F5-69-08-AD-9A-E4-19-F1-03-10
A	19:32:26.498	"(0x) C3-BE-C4-9D-EF-69-F5-69-08-AD-9A-E4-19-F1-03-10" received
V	19:32:26.743	Reading descriptor 00002902-0000-1000-8000-00805f9b34fb
D	19:32:26.743	gatt.readDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I	19:32:26.817	Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00
A	19:32:26.817	"Notifications and indications disabled" received
D	19:32:26.819	gatt.setCharacteristicNotification(f000ffc2-0451-4000-b000-000000000000, false)
V	19:32:26.821	Notifications and indications disabled for f000ffc2-0451-4000-b000-000000000000
I	19:32:27.507	Notification received from 0000fff4-0000-1000-8000-00805f9b34fb, value: (0x) B0-90-78-DC-56-96-20-D6-71-9C-85-22-24-1E-07-1A
A	19:32:27.507	"(0x) B0-90-78-DC-56-96-20-D6-71-9C-85-22-24-1E-07-1A" received
V	19:32:28.111	Reading descriptor 00002902-0000-1000-8000-00805f9b34fb

I can’t work out whether the raw data is in there or not.

I’ve been researching and trying to see if I can find any inspiration. I’ve found these:

https://forums.raspberrypi.com/viewtopic.php?t=248075

But I am now stuck at the next steps.

Does anyone have any suggestions that they could offer and help me get this one over the finish line?

Thanks

I am looking at getting one of these as well. Would be great if we could get some data off it.

Anyone found a way to do that?

Or any other way to get 12V car battery voltage

If someone has one, I will be happy to help integrate it into OpenMQTTGateway and Theengs Gateway.

Integration in progress

3 Likes

let us know your progress…Tks

Hi … i got two of them for my motorhome, looking to add them in HomeAssistant

Could this be a good starting point?

custom-components/ble_monitor: BLE monitor passively monitors BLE sensors (Xiaomi, Qingping, ATC, BlueMaestro, Brifit, Govee, Kegtron, Moat, Inkbird, iNode, Yeelight, RuuviTag, SensorPush, Teltonika, Thermoplus and Thermopro) (github.com)

It has been integrated into Theengs Decoder, do you want to use with an ESP32 or a computer/raspberry?

Any one could connect to a BM2 with this?

GitHub - KrystianD/bm2-battery-monitor: Python MQTT publisher and ESPHome template for Bluetooth based Battery Monitors - reverse engineering

Yes.

Esphome:

esphome:
  name: bluetooth_gateway
  platform: ESP32
  board: esp-wrover-kit
  includes:
    - include.h
    
wifi:
  ssid: ""
  password: ""


# Enable logging
logger:
  level: INFO
  
# Enable Home Assistant API
api:

ota:
    
# Enable Bluetooth scanning for this ESP32
esp32_ble_tracker:

sensor:

  - platform: ble_client
    ble_client_id: bm2_battery_meter
    name: Voltage
    service_uuid: 'fff0'
    characteristic_uuid: 'fff4'
    unit_of_measurement: 'V'
    accuracy_decimals: 2
    state_class: measurement
    device_class: voltage
    force_update: true
    notify: true
    lambda: |-
      mbedtls_aes_context aes;
      mbedtls_aes_init(&aes);
      unsigned char output[16];
      unsigned char key[16] = { 108, 101, 97, 103, 101, 110, 100, 255, 254, 49, 56, 56, 50, 52, 54, 54, };
      unsigned char iv[16] = {};
      mbedtls_aes_setkey_dec(&aes, key, 128);
      mbedtls_aes_crypt_cbc(&aes, MBEDTLS_AES_DECRYPT, 16, iv, (uint8_t*)&x[0], output);
      mbedtls_aes_free(&aes);
      return ((output[2] | (output[1] << 8)) >> 4) / 100.0f;  
      
ble_client:
  - mac_address: XX:XX:XX:XX:XX:XX
    id: bm2_battery_meter

One more thing, I am not 100% sure, but I think I copied include.h into /config/esphome/

That’s all, you will then have a sensor.voltage component in HA.

Great!

5 Likes

Hello

i got this error…any help would be apreciated

INFO Reading configuration /config/esphome/esphome-web-e044b0.yaml…
Failed config

INFO Reading configuration /config/esphome/esphome-web-e044b0.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing bluetoothgateway (board: esp-wrover-kit; framework: arduino; platform: platformio/espressif32 @ 3.5.0)

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
Dependency Graph
|-- WiFi @ 1.0
|-- ESPmDNS @ 1.0
|-- Update @ 1.0
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/src/main.cpp.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/esp32-hal-touch.c.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/esp32-hal-uart.c.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/libb64/cdecode.c.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/libb64/cencode.c.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/main.cpp.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/stdlib_noniso.c.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/wiring_pulse.c.o
Compiling /data/bluetoothgateway/.pioenvs/bluetoothgateway/FrameworkArduino/wiring_shift.c.o
In file included from src/main.cpp:24:0:
src/include.h:1:1: error: ‘mbedtls’ does not name a type
mbedtls/aes.h
^
*** [/data/bluetoothgateway/.pioenvs/bluetoothgateway/src/main.cpp.o] Error 1
========================= [FAILED] Took 31.43 seconds =========================

You could change firmware of BM2 to include all data (voltage / Temp / Accelerometer) on the BLE broadcast advertisement. BM2 uses CC2541 BLE Module from texas instrument and most CC2541 Sample codes are opensource such as reading voltage data from ADC , or reading accelerometer data from I2C. BM2 has both ADC and Accelerometer via I2c. Repository also include sample ESP32 arduino code to read voltage and accelerometer data from CC2541 BLE Broadcasts

1 Like

It would be great if someone would be able to port the sample ESP32 Arduino code into ESPHOME compatible code.

1 Like

Did you have any luck with this?

Just had my battery go flat twice in the last week. Would love to be able to b track the voltage without needing to be stood next to the car.

Working here with OMG:

This worked well! Was able to integrate into my existing ESPHome BLE Bridge!

Just a friendly reminder that original app of BM2 is calling home, more on this:

1 Like

Ya… a voltage divider. Esp boards have an ADC that does exactly this. No integration or hardly anything extra required.

Hi 1technophile

Just switched to omg from the esp home code.
Like the idea of being able to vary the scan interval etc.

I can see from the console that omg is connecting to the device & the bm2 shows under mqtt in home assistant but batt and voltage are just showing unknown.

Have I done something wrong or missed something in the setup?