JK BMS battery monitor over Bluetooth (ESPHome) Reads cell voltages, current, power, state of charge and temperatures from a JK BMS over BLE and shows them in Home Assistant.
Level: Advanced Board: ESP32 DevKit V1 (WROOM-32) Power & blackouts
⚠ Safety High-current battery: a short circuit can start a fire. Fuse the battery plus close to the battery, and never power the ESP32 straight from the battery bank. Read-only monitoring means you do not touch the power wiring.
What you need Buy the parts kit · Estimated total: $4.00
ESP32 DevKit V1 (30 pin, WROOM-32) × 1
$4.00
Some links are affiliate links: we may earn a commission at no extra cost to you.
Code jk-bms-monitor.yaml Copy Download .ino
# JK BMS over Bluetooth LE with the community component syssi/esphome-jk-bms.
# Check the component README for the newest option names and your BMS protocol version.
esphome:
name: jk-bms-monitor
esp32:
board: esp32dev
framework:
type: esp-idf
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
logger:
api:
encryption:
key: !secret api_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
esp32_ble_tracker:
ble_client:
- mac_address: AA:BB:CC:DD:EE:FF # MAC of your JK BMS (see the nRF Connect app)
id: client0
jk_bms_ble:
- ble_client_id: client0
protocol_version: JK02_32S # JK04, JK02_24S or JK02_32S depending on the BMS
throttle: 5s
id: bms0
sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms0
total_voltage:
name: "Battery voltage"
current:
name: "Battery current"
power:
name: "Battery power"
state_of_charge:
name: "State of charge"
min_cell_voltage:
name: "Min cell voltage"
max_cell_voltage:
name: "Max cell voltage"
delta_cell_voltage:
name: "Cell voltage delta"
temperature_sensor_1:
name: "Battery temperature 1"
power_tube_temperature:
name: "BMS power tube temperature"Flash a ready firmware from the browser Paste your error into the AI Error Doctor
Build tips Find the BMS MAC address with the nRF Connect app and pick the right protocol_version for your BMS. Keep the ESP32 within a few meters; for Daly or RS485 variants see the component README of the same author. ← ← All projects
Related ideas ⛔ High risk Mains 220–230 V can kill. Work with the power off, use certified isolated modules in an enclosure, fuse the line, and ask a qualified electrician if you are not sure.
Measures 220 V mains through an isolated ZMPT101B module and warns about sags, surges and blackouts in Telegram or Home Assistant.
⛔ High risk High-current battery: a short circuit can start a fire. Put a fuse next to the battery plus, use thick enough wires and respect the BMS limits.
Shows voltage, current and power of a battery bank (INA219) so you know the real charge and load during outages.
⛔ High risk Mains 220–230 V can kill. Work with the power off, use certified isolated modules in an enclosure, fuse the line, and ask a qualified electrician if you are not sure.
Reads voltage, current, power and kWh with PZEM-004T and publishes them to a web page, MQTT or Home Assistant.
Comments
No comments yet. Share your experience or ask a question.