I have a Battery Monitor BM2 but I do not get the actual voltage I only get a “batt” level.
I am using OMG 1.6.0.
Mine might be an older model, but using the nordic scanner, on android, I see that it alternates broadcasting as an iBeacon and not. Could this be confusing the detection as a BM2?
The GitHub - KrystianD/bm2-battery-monitor: Python MQTT publisher and ESPHome template for Bluetooth based Battery Monitors - reverse engineering. python script correctly gets the actual voltage.
I have also download the 1.6.0 source and built it with PlatformIO. But have not figured out what is going on.
It seems to randomly change from the following 2 formats, most of the time it is the first form, but sometimes it is the second form.
T: Creating BLE buffer
N: Device detected: B4:52:A9:AB:E5:99
T: getDeviceByMac B4:52:A9:AB:E5:99
T: Connectable device found: Battery Monitor
T: getDeviceByMac B4:52:A9:AB:E5:99
T: update B4:52:A9:AB:E5:99
T: Random MAC or iBeacon device filtered
N: Send on /BTtoMQTT/B452A9ABE599 msg {"id":"B4:52:A9:AB:E5:99","name":"Battery Monitor","rssi":-79,"txpower":0}
T: jsonPubl - ON
T: [ OMG->MQTT ] topic: home/OMG_ESP32_BLE/BTtoMQTT/B452A9ABE599 msg: {"id":"B4:52:A9:AB:E5:99","name":"Battery Monitor","rssi":-79,"txpower":0}
and
N: Scan begin
T: Creating BLE buffer
N: Device detected: B4:52:A9:AB:E5:99
T: getDeviceByMac B4:52:A9:AB:E5:99
T: Decoder found device: BM2
T: getDeviceByMac B4:52:A9:AB:E5:99
T: update B4:52:A9:AB:E5:99
T: Random MAC or iBeacon device filtered
T: Creating BLE buffer
N: Device detected: 34:85:18:37:C0:B5
T: getDeviceByMac 34:85:18:37:C0:B5N
T: Random MAC or iBeacon device filtered
T: No eligible device found
: Send on /BTtoMQTT/B452A9ABE599 msg {"id":"B4:52:A9:AB:E5:99","name":"Battery Monitor","rssi":-67,"txpower":0,"brand":"GENERIC","model":"BM2 Battery Monitor","model_id":"BM2","type":"BATT","batt":100}
T: jsonPubl - ON
T: [ OMG->MQTT ] topic: home/OMG_ESP32_BLE/BTtoMQTT/B452A9ABE599 msg: {"id":"B4:52:A9:AB:E5:99","name":"Battery Monitor","rssi":-67,"txpower":0,"brand":"GENERIC","model":"BM2 Battery Monitor","model_id":"BM2","type":"BATT","batt":100}