esphome-jbd-bms
May 30, 2026 · View on GitHub
ESPHome component to monitor and control a JBD-BMS via UART-TTL or BLE
Supported devices
- JBD-AP20S003 200A 20S (JBD-AP20S003-L20S-200A-B, reported by @chipsi)
- JBD-AP20S006 200A 20S (JBD-AP20S006-L20S-200A-B, reported by @rk125)
- JBD-AP21S001 150A 20S (JBD-AP21S001-L20S-150A-B, reported by @yarosman)
- JBD-AP21S001 200A 21S (JBD-AP21S001-L21S-200A-B, reported by @cctweaker)
- JBD-AP21S002 200A 21S (JBD-AP21S002-L21S-200A-B, reported by @Zahnpasta83)
- JBD-AP21S002 200A 21S, using RS485 (JBD-AP21S002-L21S-200A-B, reported by @andrewfraley)
- JBD-DP04S007 100A 4S (JBD-DP04S007-L4S-100A, reported by @reflexsa)
- JBD-SP04S034 200A 4S V1.3 (SP04S034L4S200A using BLE with
password: "123456", reported by @tedesco1968) - JBD-SP04S020 120A 4S (JBD-SP04S020-L4S-120A-B-U-K, reported by @Bretthansenpc)
- JBD-SP04S020A 80A 4S (JBD-SP04S020A-L4S-80A-B-U, reported by @kevin-jake)
- JBD-SP10S009 100A 8S (JBD-SP10S009-L8S-100A-B-K, reported by @the-butterfry)
- JBD-SP14S004 50A 14S (SP14S004P14S50A, reported by @Benni1123)
- JBD-SP15S020 60A 13S (JBD-SP15S020-P13S-60A-B, reported by @it-koncept)
- JBD-SP16S020 100A 8S (JBD-SP16S020-L8S, reported by @stalniy)
- JBD-SP17S005 40A 17S (JBD-SP17S005P17S40A, reported by @568541318)
- JBD-SP17S005 100A 17S (SP17S005P17S100A, reported by @Benni1123)
- JBD-SP18S 100A 18S (JBD-SP18S-100A-086, reported by @mobilex-Godelmann)
- JBD-SP22S001 250A 20S (JBD-SP22S001-L20S-250A, reported by @KNB-EP)
- JBD-SP22S003A 40A 22S (JBD-SP22S003A-L22S-40A, reported by @Microguy31)
- JBD-SP22S003A 50A 22S (JBD-SP22S003A-L22S, reported by @johkn)
- JBD-SP22S003B 100A 21S (JBD-SP22S003B-L21S-100A, reported by @chipsi)
- JBD-SP22S003B 100A 22S (JBD-SP22S003B-L22S-100A, reported by @chipsi)
- JBD-SP25S002 80A 24S (JBD-SP25S002-L24S-80A-B-U-C, reported by @br3ily)
- JBD-UP16015 200A 16S (reported by @jasonxcool)
- Basen Green BG-24100, 8S 24V 100A battery pack (JDB-SP16S020-100A, reported by @teunito)
- Basen Green BG-24100, 8S 24V 100A battery pack (JBD-SP22S003B-L8S-100A, reported by @RudolfRendier)
- CLRD LFP-82460-COMM, 8S 24V 60A battery pack (15710026-SP10S020-L8S-50A-50AH, reported by @andrewww173)
- Epoch Batteries 12V 460Ah Essential Series (via BLE reported by @redwoodtree)
- Overkill JBD-SP25S003 100A 16S (JBD-SP25S003-L16S-100A-100A-B, reported by @Uksa007)
- LIONTRON LiFePO4 LX 12.8V 40Ah (LISMART1240LX, reported by @jassi0001)
- LIONTRON LiFePO4 LX 12.8V 55Ah (LISMART1255LX, reported by @jassi0001)
- LIONTRON LiFePO4 LX 12.8V 150Ah (reported by @takbo3000)
- Vatrer Power 51.2V 100Ah LiFePo4 battery bank (SP16S020L16S100A, reported by @ThomasCr)
- ECO-WORTHY 100Ah 48v rack batteries (JDB-UP16S020, JBD48100000 using
jk_bms_up, reported by @deltamelter)
Untested devices
Untested but probably supported devices:
- JBD-SP04S028 60/80/100/120/150A 4S
- JBD-SP04S005 4S 150A
- JBD-SP05S002 4S 80A
- JBD-SP15S001 14S 60A
Requirements
- ESPHome 2025.11.0 or higher.
- Generic ESP32 or ESP8266 board
Schematics
RS485-TTL
┌──────────┐ ┌─────────┐
│ │<----- RX ----->│ │
│ JBD-BMS │<----- TX ----->│ ESP32/ │
│ │<----- GND ---->│ ESP8266 │<-- 3.3V
│ │ │ │<-- GND
└──────────┘ └─────────┘
│ JBD-BMS │
│ │
│ UART Balancer │
└─────────────────────────[oooo]──[ooooo]──┘
│││
│││ (ESP32)
│││
││└─ GND (GND)
│└── RXD (GPIO4)
└─── TXD (GPIO5)
Connector 4 Pin, JST PA 2.0mm pitch
Installation
You can install this component with ESPHome external components feature like this:
external_components:
- source: github://syssi/esphome-jbd-bms@main
or just use the esp32-example.yaml as proof of concept:
# Install esphome
pip3 install esphome
# Clone this external component
git clone https://github.com/syssi/esphome-jbd-bms.git
cd esphome-jbd-bms
# Create a secrets.yaml containing some setup specific secrets
cat > secrets.yaml <<EOF
wifi_ssid: MY_WIFI_SSID
wifi_password: MY_WIFI_PASSWORD
mqtt_host: MY_MQTT_HOST
mqtt_username: MY_MQTT_USERNAME
mqtt_password: MY_MQTT_PASSWORD
# Required for the BLE examples only. Use the MAC address of your BMS.
# The esp32-ble-example-multiple-devices.yaml additionally expects a bms1_mac_address.
bms0_mac_address: 70:3e:97:07:c0:3e
bms1_mac_address: 70:3e:97:07:c0:3f
EOF
# Validate the configuration, create a binary, upload it, and start logs
# If you use an esp8266 run the esp8266-example.yaml
esphome run esp32-example.yaml
# To monitor a JBD-BMS via Bluetooth Low Energy run the esp32-ble-example.yaml
# instead. Set bms0_mac_address in your secrets.yaml to your BMS' MAC address.
esphome run esp32-ble-example.yaml
If you are a Home Assistant user without any ESPHome experience yet please take a look at the beginners guide.
Example response all sensors enabled
[D][uart_debug:114]: >>> DD:A5:03:00:FF:FD:77
[D][uart_debug:114]: <<< DD:03:00:1D:06:0B:00:00:01:ED:01:F4:00:00:2C:7C:00:00:00:00:10:00:80:63:02:04:03:0B:A0:0B:9D:0B:98:FA:55:77
[D][sensor:124]: 'jbd-bms-uart total voltage': Sending state 15.47000 V with 2 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart current': Sending state 0.00000 A with 1 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart power': Sending state 0.00000 W with 1 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart capacity remaining': Sending state 4.93000 Ah with 2 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart nominal capacity': Sending state 5.00000 Ah with 2 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart charging cycles': Sending state 0.00000 with 0 decimals of accuracy
[I][jbd_bms:243]: Date of manufacture: 2022.3.28
[D][sensor:124]: 'jbd-bms-uart balancer status bitmask': Sending state 0.00000 with 0 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart errors bitmask': Sending state 4096.00000 with 0 decimals of accuracy
[D][text_sensor:067]: 'jbd-bms-uart errors': Sending state 'Mosfet Software Lock'
[D][sensor:124]: 'jbd-bms-uart software version': Sending state 8.00000 with 1 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart state of charge': Sending state 99.00000 % with 0 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart operation status bitmask': Sending state 2.00000 with 0 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart battery strings': Sending state 4.00000 with 0 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart temperature 1': Sending state 24.50000 °C with 1 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart temperature 2': Sending state 24.20000 °C with 1 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart temperature 3': Sending state 23.70000 °C with 1 decimals of accuracy
[D][uart_debug:114]: >>> DD:A5:04:00:FF:FC:77
[D][uart_debug:114]: <<< DD:04:00:08:0F:23:0F:1C:0F:12:0F:1D:FF:4E:77
[D][sensor:124]: 'jbd-bms-uart cell voltage 1': Sending state 3.87500 V with 3 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart cell voltage 2': Sending state 3.86800 V with 3 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart cell voltage 3': Sending state 3.85800 V with 3 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart cell voltage 4': Sending state 3.86900 V with 3 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart min cell voltage': Sending state 3.85800 V with 3 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart max cell voltage': Sending state 3.87500 V with 3 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart max voltage cell': Sending state 1.00000 with 0 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart min voltage cell': Sending state 3.00000 with 0 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart delta cell voltage': Sending state 0.01700 V with 4 decimals of accuracy
[D][sensor:124]: 'jbd-bms-uart average cell voltage': Sending state 3.86750 V with 4 decimals of accuracy
Protocol
See Jiabaida.communication.protocol.pdf
Known issues
None.
Goodies
E-paper status display
A user of this project (@the-butterfry) shared some YAML code for a beautiful status display using a 1.54 e-paper display here.

Preserving your battery pack
@TheNexter contributed a YAML snippet to stop charging of his e-scooter at an early stage to preserve the battery pack. The automation doesn't require a network connection and is executed on the ESP itself. To save some capacity the deep_sleep component is used.
Debugging
If this component doesn't work out of the box for your device please update your configuration to enable the debug output of the UART component and increase the log level to the see outgoing and incoming serial traffic:
logger:
level: DEBUG
uart:
id: uart_0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
References
- https://github.com/ioBroker/AdapterRequests/issues/512
- https://github.com/sshoecraft/jbdtool/blob/main/jbd.c
- https://gitlab.com/bms-tools/bms-tools
- https://gitlab.com/bms-tools/bms-tools/-/blob/master/JBD_REGISTER_MAP.md
- https://github.com/kolins-cz/Smart-BMS-Bluetooth-ESP32
- https://github.com/ForrestFire0/GenericBMSArduino
- https://gist.github.com/PhracturedBlue/7ef619594eaa4c27f4ff068b461865b8 (ECO-WORTHY JBD-UP16S010 protocol description)