• Have you tried out dark mode?! Scroll to the bottom of any page to find a sun or moon icon to turn dark mode on or off!

diy solar

diy solar

Monitoring JK BMS with Grafana

andreit

New Member
Joined
Jun 15, 2024
Messages
41
Location
Romania
I have a JK_PB1A16S15P and want to monitor cell voltages and other parameters in Grafana. I have bought a Raspberry pi 4B for this purpose and installed Grafana and Prometheus on it. I know there are several projects on GitHub using Python to communicate with the JK but with older models.
I believe it is possible to do this via Bluetooth but this will block access to the BMS from my phone, so I think ttl-usb adapter to raspberry pi USB port is preferred.
Is there a tutorial to do this? I have searched for days but can't find a good start to finish clear guide to do this.
 
There are maybe too many ways to do this, so you can get creative. First: find a way for the Pi to talk to the BMS and get the info you need. Maybe it's a python script that opens the ttl-usb adapter to read the data you want. Prometheus can probably run that python script to grab the data to store in its database. Then Grafana can query that info to make pretty graphs.
 
I have a JK_PB1A16S15P and want to monitor cell voltages and other parameters in Grafana. I have bought a Raspberry pi 4B for this purpose and installed Grafana and Prometheus on it. I know there are several projects on GitHub using Python to communicate with the JK but with older models.
I believe it is possible to do this via Bluetooth but this will block access to the BMS from my phone, so I think ttl-usb adapter to raspberry pi USB port is preferred.
Is there a tutorial to do this? I have searched for days but can't find a good start to finish clear guide to do this.
This is what you want. It also works to upgrade firmware. waveshare is the brand, about $15 on amazon.

USB to RS485 Converter Industrial Adapter Original FT232RL and SP485EEN Fast Communication Embedded Protection Circuits Resettable Fuse ESD Protection​

 
Personally I use InfluxDB for this sort of thing instead of Prometheus. InfluxDB allows you to just send simple plaintext data over curl, so often a basic bash script is all you need. There are of course Python and other language specific libraries that take care of this as well, but InfluxDB is super flexible. They also have a data ingestion orchestrator called Telegraf if you want it to handle your data polling and ingestion.
 
This works for my 2 PB2A16S20P with a bluetooth usb adapter place within 10ft of the batteries. It gets the low and high cell but does not report the voltages of all cells currently.

 
This works for my 2 PB2A16S20P with a bluetooth usb adapter place within 10ft of the batteries. It gets the low and high cell but does not report the voltages of all cells currently.

Thank you, definitely looks like a descent option and the remote access with HA is very cool. I will look into this!

I think it will be tough to let go of Grafana on my RPi (remote access as well using Tailscale) so i will also keep up my search for a solution to that as well.
 
If you want to do this easy and fast, you need to get yourself another PI and install Solar Assistant on it.

Solar Assistant can share all data via MQTT. You can load that data in an Influx database and use it in Grafana.

It will cost you another PI, but it's super easy to do.
 
If you want to do this easy and fast, you need to get yourself another PI and install Solar Assistant on it.

Solar Assistant can share all data via MQTT. You can load that data in an Influx database and use it in Grafana.

It will cost you another PI, but it's super easy to do.

If I'm already pulling data on my own into Influx with a Grafana front end, does Solar Assistant still get me any killer must have features?
 
If I'm already pulling data on my own into Influx with a Grafana front end, does Solar Assistant still get me any killer must have features?
No, if it is about the BMS data and you are already pulling data from the BMS yourself and store that in Influx, you don't need SA.

SA simply is a way to access the data easily.
 
So I went the Home Assistant way and can confirm that this Github project works very well, many thanks to the developers. The data is being pulled at 10-15 second intervals and it is easy to make graphs in HA; I also became addicted to HA now... finding uses like automating my chrismas lights to light up at sundown and down at sunrise. The ESP32 and RS485 TTL converter boards fit nicely in this RJ45 socket which I powered from an old 700mA 5V adapter. I needed also an Ethernet straight through patch cable, and that's it. I can also control the settings in the Bluetooth APP from HA with switches.

Here is the last balancing from a few days ago... for 1A balancer it took 1+ full day to bring 2 stray cells (green and blue below) inline with the others...

1735474618705.png
 

diy solar

diy solar
Back
Top