Hey Bromptonautics

Just wanted to share a little project I've been working on — an open-source BLE monitor for the Brompton Electric Mk1 that feeds battery data into Home Assistant via MQTT.

What it does:

• ESP32-C3 reads battery %, voltage, cycles, motor hours and more via BLE
• Publishes to MQTT → Home Assistant auto-discovers all sensors
• Optional automation: cut charging at 80% via a smart plug (Apple-style optimized charging for your Brompton)

Background:
The Brompton Electric uses a proprietary BLE stack — no standard battery service (0x180F), all custom UUIDs. I reverse-engineered the protocol based on an existing GitHub project (G21-Goose/Electric-Brompton-Controller) and built a standalone ESP32 firmware using NimBLE.

Pairing uses AES-128-ECB — your frame number gets encrypted to generate a 6-digit PIN. The ESP32 stores the bond in flash so it reconnects automatically.

What's working:

• Battery % and voltage (live, updates every ~30s while connected)
• Battery cycles, motor on time, power on time
• MQTT discovery (sensors show up in HA automatically)
• LWT (Last Will Testament) for offline detection
• Charging automation (cut at 80%, configurable threshold)

What's not working / limitations:

• Ride distance & motor distance report 0.0 (not useful)
• State of Health value is plausible but interpretation unclear
• Bike drops BLE after 2 min of inactivity → ESP32 needs to be quick
• Only one BLE bond at a time — Brompton app and ESP32 can't coexist
• ESP32 needs to be physically near the bike (BLE range)

Important: This is an alpha / hobby project under development. It's not a polished product — no nice UI, just firmware you flash via USB and config you edit. If you're comfortable with PlatformIO, MQTT and Home Assistant, you can get it running. If not, this might not be for you (yet).

Safety note: If you use the charging automation, make sure your smart plug can handle the Brompton charger (4A). And obviously don't leave it unattended for the first few cycles.

Repo: https://github.com/Druidus/brompton-electric-ble

Feedback, issues and contributions welcome! Happy to answer questions. 🐸
Greetings Wolfgang

by Druidus3D

Share.

4 Comments

  1. firewire_9000 on

    It sounds really cool but unfortunately I’m only familiar with Home Assistant. I don’t know the other things but I assume that the ESP32 is a microcontroller that you need to program?

  2. TripleGGG4111 on

    Good effort! Will take a look!  Please
     get ambitious and make a handlebar controller for us too please 🤣. 
    Perhaps add a 30 day reminder to charge to 100% per the manual recommendations – I assume the BMS rebalances the cells is why they recommended it.  

  3. TripleGGG4111 on

    Is it battery dependent or is BMS / interfaces you use  same for all? I’ve had a 4 speed MK1 w/BMZ and now 12 w/Greenway?
    Again great effort can’t wait to get time to dig deep into what you’re doing!

Leave A Reply