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
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?
Sorted,
Found another forum post that was talking about the base topic, had to add home/back to the start of it, as soon as I put that back in front of BLE-BM2 it came up straight away.
Final dumb newbie question. If i want to have the BM2 update in real time i set the interval between scans/active scans slider to 0? and if I’m understanding the documentation correctly I whitelist the BM"'s mac and then turn the connection time up so that the ESP32 isnt constantly trying to connect to everything?
End goal is to have the sensor data update in real time in the morning before i leave for work, less frequently over night or at weekends,
To increase the voltage frequency update you can decrease the Time between connection to 1 minute, you could go also to 10s by an mqtt command (10000s):
Reduce also the scan interval to 10s in this case:
Yes, I did but it wasn’t clear on installing on the monitor or a separate ESP32 device. I am getting failed to connect now.
INFO Starting log output from 10.10.20.83 using esphome API
INFO Successfully connected to bluetooth_gateway @ 10.10.20.83 in 0.053s
INFO Successful handshake with bluetooth_gateway @ 10.10.20.83 in 0.092s
[08:13:58][I][app:102]: ESPHome version 2023.12.8 compiled on Jan 25 2024, 07:59:03
[08:14:17][W][ble_sensor:117]: [Voltage] Cannot poll, not connected
[08:14:50][W][api.connection:107]: : Reading failed: BAD_INDICATOR errno=11
[08:15:15][I][esp32_ble_client:069]: [0] [MAC ADDRESS] 0x00 Attempting BLE connection
[08:15:17][W][ble_sensor:117]: [Voltage] Cannot poll, not connected