• 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

JKBMS & RS485: turning Discharge ON/OFF with ESP32

DanDyse

New Member
Joined
Dec 28, 2024
Messages
7
Location
Berlin
Hey there, I am using a JKBMS with my solar installation and a 5kWh LFP battery plus a Raspi to make it all work as intended. Works good.
For another different project, I will make use of another JKBMS and another battery pack.
The thing with JK is, that you need the App to turn discharge on and off. I would rather have an external switch that does this job: turn it on and the BMS switches discharge ON, turn the switch off will let the BMS stop discharging. Instead of having to fumble around with the app all the time.
I thought about using a ESP32 using RS485 connection to do this. I have found some code samples and a lot of posts having trouble communicating with the JKBMS. Maybe someone has done exactly this before and I just havent found it yet?
Or my approach isn't the way to do this?
Any comment is welcome!
Thank you in advance.
 
You are going to need to specify which JK you have, there are distinct differences especially between the PB series and earlier types.
 
Then you have more options than with the PB.

Some examples, there are more on Github


https://github.com/Louisvdw/dbus-serialbattery for VenusOS GX systems which can run on a Pi

and


Plenty more around if you look.
 
Thank you, but I think the Pi is oversized for this "basic" function to develop, so Java will not be available. I'd like to go with something small like the ESP32. Unfortunately, although I have found the RS485 protocol details, I don't think I can use it to send proper commands. Mpp-solar and esphome-jk-bms don't seem to be able to do so either, at least I cannot see them "sending" something instead only receiving status data from JKBMS. I'll check more detailed, thank you.
 
Looks like the "not inverter" JKBMS models can not be set by RS485 (readonly). Commands work only when connected via Bluetooth.
 
Then look for Github solutions that connect via Bluetooth. Be aware that the Bluetooth connection is fragile and can be lost and not regained without intervention, so not a way to issue commands to control charging.
 

diy solar

diy solar
Back
Top