meine
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
Python connector and ESPHome template for Bluetooth based Battery Monitors - reverse engineering.
git clone https://github.com/KrystianD/bm2-battery-monitor.gitKrystianD/bm2-battery-monitorResult of my reverse engineering work on Bluetooth-based car battery monitor.
Battery Monitor 2 on Google Play
bm2_python - Python client librarySupports the following API calls:
BM2Client.get_voltage()BM2Client.get_history()bm2_esphome - ESPHome template exposing current voltageapps - Example applicationsbm2_viewer.py - data viewerbm2_history.py - history readerbm2_mqtt.py - mqtt senderimport asyncio
from bm2.client import BM2Client
async def main():
bm2 = BM2Client("B0:B1:xx:xx:xx:xx")
bm2.start()
# Read historical measurements
history_readings = await bm2.get_history()
for history_reading in history_readings:
date_str = history_reading.date.strftime("%Y-%m-%d %H:%M:%S")
print(f"{date_str} = {history_reading.voltage} V")
# Read current voltage measurements
while True:
voltage = await bm2.get_voltage()
print(voltage)
asyncio.run(main())
Install dependencies from apps/requirements.txt - best in a virtualenv, then:
python apps/bm2_viewer.py --bm2-addr B0:B1:xx:xx:xx:xx
python apps/bm2_history.py --bm2-addr B0:B1:xx:xx:xx:xx
python apps/bm2_mqtt.py
--mqtt-host localhost \
--mqtt-port 1883 \
--mqtt-topic bm2 \
--bm2-addr B0:B1:xx:xx:xx:xx
If you are curious on how I did the reverse engineering process, read here.
BM2, Battery Monitor 2, com.dc.battery.monitor2, ICS Technology, Intelligent Control System
more like this
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
Create and add progress bars, Office365 Files and Dropbox Paper papers by labels and link them to your Todoist tasks.
search projects, people, and tags