Bỏ qua đến nội dung
Connecting JK BMS Battery Management Board to Home Assistant via ESP32-C3 Using ESPHome

Connecting JK BMS Battery Management Board to Home Assistant via ESP32-C3 Using ESPHome

In this guide, we will explore how to connect the JK BMS battery management board to Home Assistant via ESP32-C3 using ESPHome. This allows you to monitor critical battery metrics such as cell voltages, charge/discharge current, temperature, and state of charge directly on your Home Assistant dashboard.

Requirements

  • JK BMS board
  • ESP32-C3 microcontroller
  • Home Assistant installed and running
  • ESPHome add-on in Home Assistant

Step-by-step Guide

1. Hardware Preparation

  • Connect the ESP32-C3 to your computer via USB. Hold the BOOT button while plugging in to enter flashing mode.
  • Access Home Assistant from this computer > Install ESPHome Add-on > Open the ESPHome dashboard.
💡
If your device does not appear, try a different USB cable and ensure it supports data transfer, not just power charging.

2. ESPHome Configuration

0:00
/1:11

In the ESPHome configuration, the most important parameter to configure is the Bluetooth MAC address of your JK BMS board (the bms0_mac_address variable).

How to Find the JK BMS Bluetooth MAC Address

You can retrieve the board's Bluetooth MAC address using any of the following methods:

Method 1: Scan with nRF Connect on mobile (Recommended - Fastest)

  • Download and install nRF Connect for Mobile (or BLE Scanner) from the Google Play Store on Android (iOS devices obscure raw MAC addresses with randomized UUIDs, so Android is strongly recommended).
  • Enable Bluetooth and Location (GPS) on your phone, then stand close to your battery pack.
  • Open the app and tap Scan. Look for devices whose name starts with JK- (such as JK-B2A... or any custom name you set in the JK app).
  • The MAC address in 6-byte hex format (e.g., C8:47:80:13:B4:A7) is displayed directly below the device name. Copy this address.

Method 2: Inspect ESPHome Logs

  • Flash the initial ESPHome firmware to the ESP32-C3.
  • Place the ESP32-C3 near your battery pack, open the ESPHome Dashboard in Home Assistant, and click Logs.
  • The BLE scanner will output discovered Bluetooth devices along with their MAC addresses and advertised device names. Locate your JK BMS name to find the matching MAC.

Method 3: Check Hardware Label or the JK BMS App

  • Many JK BMS batches feature a barcode sticker on the back of the board or packaging that prints the Bluetooth MAC address.
  • Alternatively, in the official JK BMS Android app, check Device Info / Settings to retrieve the hardware Bluetooth address.
📌
Note: JK BMS does not allow multiple simultaneous Bluetooth connections. Once ESP32-C3 connects to continuously read telemetry into Home Assistant, the smartphone app will not be able to connect unless the ESP32 connection is temporarily paused.

Flash YAML Configuration to ESPHome

  • Create a new node configuration in ESPHome add-on.
  • Paste the YAML code below and replace bms0_mac_address with your actual MAC address:

Access link to copy YAML code

Add Device to Home Assistant

• The ESP32-C3 device will automatically be discovered in Home Assistant
• Add the JK BMS entities to your dashboard

Create Dashboard

• Create a new dashboard in Home Assistant
• Add cards to display battery metrics:
• Gauge card for voltage and current
• Entity card for charging status
• Graph card for trend tracking

Conclusion

With this setup, you can easily monitor essential battery parameters from the JK BMS board directly within Home Assistant. This allows real-time tracking of battery health and early detection of potential cell anomalies.


Feel free to customize the configuration to suit your exact needs. Happy tinkering!

Bạn thấy bài viết hữu ích?

Đăng ký để nhận thông báo khi có bài viết mới.

Kiểm tra hộp thư để xác nhận email!
Bạn đã đăng ký thành công vào Geek Playground
Tuyệt vời! Tiếp theo, hoàn tất thanh toán để có quyền truy cập đầy đủ vào Geek Playground
Chào mừng trở lại! Bạn đã đăng nhập thành công.
Thành công! Tài khoản của bạn đã được kích hoạt đầy đủ, bạn hiện có quyền truy cập vào tất cả nội dung.
Thành công! Thông tin thanh toán của bạn đã được cập nhật.
Cập nhật thông tin thanh toán không thành công.