Xiaoxiang bms

I’m surprised there is no integration to communicate to lifepro4 BMS directly via Bluetooth? There is some raspberry pi programs that will work wirelessly Bluetooth but nothing I can find directly in HA. Am I just not finding it? Seems there should be something already done for monitoring our solar batteries without having to have wired connection or another pi reading bms?


Hello! I’m surprise as well it haven’t been created. This would be awesome if the community can develop something to monitor Solar batteries! I have 12 BMS on seperate batteries but I can’t monitor them until I’m 10FT away… Let me know if you find something.


I guess if you have a docker install you can then run some bms code along side HA on your pi and accomplish same thing via mqtt but I have normal supervised install so that won’t work. Thinking about trying docker though just for this bms issue…

It looks like I’m on a long list of people trying to workout how to connect to the BMS via Bluetooth without going into the battery and replacing the Bluetooth module for a serial to usb.
To monitor and run scripts on battery levels etc in HA and not just have a phone/ipad app to monitor it .

I would love to use ESP32 and ESPHOME to get my Xiaoxiang bms into homeassistant. Is there anyway to get it done?

1 Like

Another vote for a battery ble integration!

If you want to do some tests I can integrate into Theengs Gateway Addon and OpenMQTTGateway if we detect that this device broadcast data.

So as to do this you need:

  • Nrf Connect application , go to the scan tab
  • Click on scan and identify your device
  • Click on it without connecting so as to have the view below:
  • Do a screenshot
  • Open you device manufacturer mobile app or look at the device display if any
  • Note down the corresponding value or take a screenshot/picture

Repeat this process 3 times

  • Share your data into a Theengs Decoder Discussion, Theengs decoder is a library that can be integrated into projects. It is used by OpenMQTTGateway and Theengs Gateway (and more to come).

From this we can try to understand the message format, this is the first step in integrating the device into gateways.

1 Like

Hi 1technophile, I have Xiaoxiang brand BMS and installed Thenngs Add-On on my HA.

I can see this data on mobile apps.

Bu this application have many parameters.

And also I have log and debug file from nrf connect app.

How can i continue for decoding?

1 Like

Hi drageeblue,

You can share several screenshots of the nrf connect app scans (like above) along with the picture of what you see on the BMS app (note that to see the nrf data you need to disconnect the manufcaturer app).

1 Like

Here is a log of notifications captured with nrfconnect of a 13s bms while charging https://pastebin.com/ajQ7fJfM

Adding a me too. :pray:

Check out https://github.com/fl4p/batmon-ha . It can monitor various BMS ( Xiaoxiang, JK, Daly).
I am working on adding control buttons so you can turn discharge/charge on&off.

1 Like

This looks promising! thanks @flap
I did install add-on but so far not working… Here is my log

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
File “/app/main.py”, line 17, in
from bmslib.sampling import BmsSampler
File “/app/bmslib/sampling.py”, line 6, in
from mqtt_util import publish_sample, publish_cell_voltages, publish_temperatures, publish_hass_discovery
File “/app/mqtt_util.py”, line 7, in
from util import get_logger
ModuleNotFoundError: No module named ‘util’
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I actually wanted to develop a JBD Plugin as well, as I developed one of the two JBD iOS Apps (Smart BMS Utility) but then i stumbled across this as release 2022.8 gave us a great opportunity for bluetooth integrations, but apparently others have done it already. I will evaluate how well the add on works and consider making my own or sticking to this.

You can track my decision making and progress here:
NeariX67/hass_jbdbms: Home assistant plugin for JBD BMS
Please note: I just started this project and it will take some time until it will come even close to a usable version

@flap I did manage to finally get this connected to one battery! not sure how to connect more? manual edit yaml?
INFO [sampling.py:33] connecting bms JbdBt(A4:C1:38:EA:04:0C)
INFO [sampling.py:39] connected bms JbdBt(A4:C1:38:EA:04:0C)!
INFO [sampling.py:53] jbd_bms result@2022-08-07T12:29:18.977735 BmsSample(U=13.4V,I=-0.74A,P=-10W,q=61.8Ah/100,mos=nan°C)
INFO [sampling.py:60] jbd_bms volt=3350,3352,3354,3356 temp=[19.7, 20.2]
INFO [sampling.py:73] JbdBt(A4:C1:38:EA:04:0C) times: connect=7.30s fetch=0.56s
INFO [sampling.py:53] jbd_bms result@2022-08-07T12:29:20.638645 BmsSample(U=13.4V,I=-0.99A,P=-13W,q=61.8Ah/100,mos=nan°C)
INFO [sampling.py:60] jbd_bms volt=3350,3352,3354,3359 temp=[19.7, 20.3]
INFO [sampling.py:73] JbdBt(A4:C1:38:EA:04:0C) times: connect=0.00s fetch=0.35s
INFO [sampling.py:53] jbd_bms result@2022-08-07T12:29:22.113719 BmsSample(U=13.4V,I=-0.90A,P=-12W,q=61.8Ah/100,mos=nan°C)
INFO [sampling.py:60] jbd_bms volt=3350,3352,3354,3354 temp=[19.7, 20.2]

@randr You can currently only connect to one JBD BMS at the same time. I’ll release an update later today where you can add more

1 Like

Great! Thanks so much for a great start on a much needed integration for HA! Great stuff

Lots of timeouts but does work. here is quick rough dashboard:

Is there any way to run this on a remote Pi and send the data over Wifi with MQTT? I’m using https://github.com/tgalarneau/bms right now but don’t have the data in HA yet. At least it allows for a Bluetooth connection to the BMS as well.

@penguinponics Yes, you can set the hostname of the MQTT broker. See https://github.com/fl4p/batmon-ha/blob/1034bf79d527237a8548e98581da341a9318a3fa/doc/Standalone.md

1 Like