• 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

JK Inverter BMS - modbus/4G-GPS

extrafu

New Member
Joined
Feb 10, 2023
Messages
63
Location
Quebec
Hello!

I have four JK BMS (JK-PB2A16S-15P) running v15.30. First one has DIP switches set to 0 (master), others at 1, 2 and 3. All BMS are inter-connected through the RS485-2 ports and when using my RS485 adaptor connected on a free RS485-2 port of any of the BMS, I can see stats for all four BMS.

I've written 2 programs:
  1. the first program uses the 4G-GPS protocol (id 000) on RS485-1 and I can read individual settings/stats or ask for all of them while sending serial commands over RS485
  2. the second program uses the JK BMS RS485 Modbus V1.0 (id 001) and I can read individual settings while sending modbus commands over RS485

For both programs, the RS485 adaptor was connected in the JK BMS RS485-1 port. Here are some observations and questions:
  1. both programs only work with the data in which JK BMS RS485-1 port the adaptor is connected to. I would assume that with the 2nd program, I could have access to the whole modbus network and set the slave ID accordingly (0..3) to read any BMS's data but no, not the case
  2. I know RS485-1 is for inverter communications, but connecting in the master BMS (id = 0) doesn't show any "aggregated/averaged" values, it shows the values of the first BMS, seems wrong to me when reporting data to an inverter...
  3. RS485-2 seem to use a proprietary modbus version from JK. I used a sniffer and tons of data is broadcasted on it, coming from all four BMS. It's very aligned to how the Windows app works, being a listener of that data and display only what it gets. Sending modbus commands on those ports result in bogus replies (ie., you can get a broadcasted value instead of what you requested for ...)
Has anyone succeeded in using the RS485-1 ports to talk over modbus to all interconnected BMS?

My goal is to be able to read settings from all four BMS. I know I could decode the broadcasted traffic on the RS485-2 ports like the Windows app does or like esphome-jk-bms does (https://github.com/txubelaxu/esphome-jk-bms/tree/main/components/jk_rs485_sniffer) but I would rather not to.

Maybe an other solution is to use a 4-channel RS485 adaptor like this https://www.amazon.ca/gp/product/B0CLXSR2ZP/?th=1 ?

Thanks!
 
Does the JK BMS have a serial/RS232 port.
Generally those BMS that have an RS485-1 and CAN Ports (Two RJ45 jacks usually on the left) for BMS To Inverter communications, One RJ12 (middle) jack for software monitoring and Two RJ45 jacks (right most jacks) for battery to battery communications will allow you to monitor all batteries using the RJ12/RS232 port on the Master battery
 
The JK PB does not have a working RS232 port or the GPS port found on the other JK BMS. The Windows app in parallel mode reads the data from the master it's connected to and also the slaves so it must be possible.
 
@kommando The Windows app seems to read broadcasted proprietary modbus messages on the RS485-2 ports. I used a modbus sniffer to see various messages.

I'm not too much interested on those, more on BMS access for all four from the RS485-1 port. The slave ID seems to be completely ignored (no answer received when changing the ID other than the one in which the RS485 connector is plugged in).
 
Hi, I am successfully reading two JK Inverter BMS via Modbus.
Connected via a Y adapter. The output of the adapter goes to an RS485 to Ethernet adapter.
Readout via Modbus is done with Symcon via the respective ID, which was assigned via the DIP switches.
 
don't need a "4 port" rs485 adapter.
just get some rj45 splitters ( dumb ones ), and chain the cables. ( make sure to cut the can bus wires from the ethernet cables )

then you can access all of them with one standard adapter. enjoy.
 
I've been playing with PyModbus/Dash/Plotly in the past few days in order to gather and show (with some massaging) all the relevant data from my four JK BMS and all my Schneider Conext gear (inverter, ags, battmon and MPPT charge controllers) on a single page. I'll finish some cleanups and post the source code github so others might use it. It requires very minimal configuration and auto-detects all the Schneider equipment. Here's how it looks like right now. Cheers!
 

Attachments

  • Screenshot 2024-12-29 161752.png
    Screenshot 2024-12-29 161752.png
    288.2 KB · Views: 17
I've made some improvements in the past few days and it's now good enough for others to use. You can grab the code from https://github.com/extrafu/berrybms

The documentation should be good enough to have things running in minutes. It's "self-contained" so if you can easily delete it.

Cheers!
 

Attachments

  • Screenshot 2025-01-07 125125.png
    Screenshot 2025-01-07 125125.png
    387.9 KB · Views: 9

diy solar

diy solar
Back
Top