diy solar

diy solar

JK-BMS-CAN with new Cut-Off Charging Logic (open-source)

a different topic...

I did not know that from the Web interface you can actually adjust the JKBMS parameters.
that is good - and bad
Good in the sense it really comfortable to not have to disconnect the ESP to go into the JK firmware to adjust settings as during when you do this, power leaks to the grid in huge amounts

Bad in the simple sense that there is no security and it does not ask for a password before change - which means anyone who has the address locally can make changes.
worse lol...if i NAT the URL ... so i can access it externally i am asking for trouble (I know- i know...i would never try that )

regards...
 
Last edited:
a different topic...

I did not know that from the Web interface you can actually adjust the JKBMS parameters.
that is good - and bad
Good in the sense it really comfortable to not have to disconnect the ESP to go into the JK firmware to adjust settings as during when you do this, power leaks to the grid in huge amounts

Bad in the simple sense that there is no security and it does not ask for a password before change - which means anyone who has the address locally can make changes.
worse lol...if i NAT the URL ... so i can access it externally i am asking for trouble (I know- i know...i would never try that )

regards...

Obviously, your network must be secure. I don't expose my HA to the Internet by opening ports. My only means of access to my equipment is via a secure VPN tunnel.
 
And you can enable authentication for the Webserver. Just need to follow the very good esphome documentation ;-)
 
And you can enable authentication for the Webserver. Just need to follow the very good esphome documentation ;-)
You know us electrical mechanical engineers can't follow documentation for crap, especially programming documentation haha.
 
Obviously, your network must be secure. I don't expose my HA to the Internet by opening ports. My only means of access to my equipment is via a secure VPN tunnel.
i agree - thats what i do too
i have 2 HA
one internal one external
i have my solar stuff on the internal, can only access via vpn 2
 
I use ZeroTier for my closed network solution. Works amazingly well.
 
i have made a new discovery with my attempt to have 2 parallel batteries connected to work together with just one master - i have been talking with JK and they have refused to either show me how to or send me a firmware to update and bring the old up-to-date with the new.

i feel this is not very professional to be selling products of the same model and have different features - how would customers know what they are getting....i might be very wrong and this might be a no-wrong from JK.
But below you will see the pain it is causing me on this project...this is what i sent to them after they asked me to send a screenshot of the firmware versions between them - both modules are jk2a24s15p


1709665415285.png
1709665902105.png

1709665956837.png

Hi JK,



You requested I send you an email regarding the version difference after I have asked that you either provide a firmware or a way to upgrade the 1st power BMS


Here are the screenshots – this is causing me pain in the project we are working on as the 2 different firmware is making our result come out differently
1709665558402.png

New Firmware
1709665603681.png


Same settings same battery same current same capacity same voltage - BUT DIFFERENT SOC VALUES
1709665674544.png
1709665721754.png

I thought it might be helpful to know thats why i am posting this here , might not be relevant - i dont know...
 
I don't think they are aware of this project
they should be as Andy has done lots of videos on the JK2xx series
they seem to only want to support the PB2Axx series - the inverter BMS
 
Right now I am using

I just learned about your project. It is very ambitious :) . Congratulations (y).

Unfortunately multi-BMS is a must in my case. I currently have 2 batteries shared across 3 inverters. And more batteries to come ..

In my use case I could foresee the following, to be able to control the inverter "as it were a (single) BMS".

I could use syssi ESPHome-JK-BMS for every battery (via BLE), gather the data and send it to MQTT, forward these to InfluxDB, then modify what you did into a multi-battery BMS (more like a JK BMS emulator) which is just fetching the values from the different BMS from a database and building an "equivalent model" (e.g. min SOC, min of min voltage, max of max cell voltage, total current, etc).

Granted I could also do everything over CAN or RS485, maybe more reliable, but less easy ? Not sure ...

I would lose some features though like actively control the BMS, but I could at least control the inverter ...

Right now the only way to make it work with my Deye 12kW is to set float to 56V, absorbtion/equalization to 56.2V, otherwise cell get unbalanced. I also have a charger connected to the battery since this inverter is not directly connected to the grid. So float voltage is very high right now. But otherwise cells get unbalanced, I do not fully charge with my charger, and if my charger voltage charges higher than float, the Deye Inverter Forcefully discharges the battery ignoring all solar power ! It's a feature not a bug you might argue ... but it sucks !

I could also use this project to control the Deye in Voltage mode, but I'm a bit afraid of wearing out the internal flash memory if I update the settings too often

Many possibilities but none are complete, easy, cheap, etc :(.
 
Last edited:
I don't think they are aware of this project
they should be as Andy has done lots of videos on the JK2xx series
they seem to only want to support the PB2Axx series - the inverter BMS
I don't think any of the "old" (non-inverter) JK BMS can be upgraded. Or if they *could* be, they have no interest in helping us.

I have the same problem with a mix of HW v10 and HW v11 ... Syssi ESPHome-JK-BMS is a good "abstraction layer" though, so in Home Assistant there aren't any differences (however I felt the charge or discharge switch seemed to turn off BOTH features, not only charge or discharge).
 
@silverstone

We are currently discussing the future direction of the project for a multi-bms version, etc. But it won't be tomorrow. ;)
No, I'm sure it's complicated. There is so much testing that also needs to be done.

Also if I were to do it like I propose above, it would also take a lot of time. Probably you'll be done when I start eventually. I got to build 2 new batteries soon 😅.

So I am a bit stuck at the moment. My work so far was on the charger mainly, especially making can controllers work under rootless podman and docker. So I might as well do that directly, without an esp32 (if I do like I suggested, again).

If interested for the can docker/podman part (it is just a proof of concept for now) :


Uksa007 did something similar for multi bms control but that was way too expensive (and couldn't be customized for my - back then needs)
 
Right now I am using

I just learned about your project. It is very ambitious :) . Congratulations (y).

Unfortunately multi-BMS is a must in my case. I currently have 2 batteries shared across 3 inverters. And more batteries to come ..

In my use case I could foresee the following, to be able to control the inverter "as it were a (single) BMS".

I could use syssi ESPHome-JK-BMS for every battery (via BLE), gather the data and send it to MQTT, forward these to InfluxDB, then modify what you did into a multi-battery BMS (more like a JK BMS emulator) which is just fetching the values from the different BMS from a database and building an "equivalent model" (e.g. min SOC, min of min voltage, max of max cell voltage, total current, etc).

Granted I could also do everything over CAN or RS485, maybe more reliable, but less easy ? Not sure ...

I would lose some features though like actively control the BMS, but I could at least control the inverter ...

Right now the only way to make it work with my Deye 12kW is to set float to 56V, absorbtion/equalization to 56.2V, otherwise cell get unbalanced. I also have a charger connected to the battery since this inverter is not directly connected to the grid. So float voltage is very high right now. But otherwise cells get unbalanced, I do not fully charge with my charger, and if my charger voltage charges higher than float, the Deye Inverter Forcefully discharges the battery ignoring all solar power ! It's a feature not a bug you might argue ... but it sucks !

I could also use this project to control the Deye in Voltage mode, but I'm a bit afraid of wearing out the internal flash memory if I update the settings too often

Many possibilities but none are complete, easy, cheap, etc :(.
I´m working on my personal version to connect 3 JKs via mqtt to the CAN ESP and have just published the project here:
The CAN Controller subscribes to the JK-Topics, calculates min/max/avg/sum of the relevant data and then acts like an virtual BMS for the inverter. My JK-ESPs also run syssi´s repo and connect via BLE

Its still work in progress, but it runs fine on my deye productive inverter
Feel free to have a look and maybe it helps you out until we have a standalone multi BMS Version which works without a mqtt broker.
 
Right now I am using

I just learned about your project. It is very ambitious :) . Congratulations (y).

Unfortunately multi-BMS is a must in my case. I currently have 2 batteries shared across 3 inverters. And more batteries to come ..

In my use case I could foresee the following, to be able to control the inverter "as it were a (single) BMS".

I could use syssi ESPHome-JK-BMS for every battery (via BLE), gather the data and send it to MQTT, forward these to InfluxDB, then modify what you did into a multi-battery BMS (more like a JK BMS emulator) which is just fetching the values from the different BMS from a database and building an "equivalent model" (e.g. min SOC, min of min voltage, max of max cell voltage, total current, etc).

Granted I could also do everything over CAN or RS485, maybe more reliable, but less easy ? Not sure ...

I would lose some features though like actively control the BMS, but I could at least control the inverter ...

Right now the only way to make it work with my Deye 12kW is to set float to 56V, absorbtion/equalization to 56.2V, otherwise cell get unbalanced. I also have a charger connected to the battery since this inverter is not directly connected to the grid. So float voltage is very high right now. But otherwise cells get unbalanced, I do not fully charge with my charger, and if my charger voltage charges higher than float, the Deye Inverter Forcefully discharges the battery ignoring all solar power ! It's a feature not a bug you might argue ... but it sucks !

I could also use this project to control the Deye in Voltage mode, but I'm a bit afraid of wearing out the internal flash memory if I update the settings too often

Many possibilities but none are complete, easy, cheap, etc :(.
With a lot of parameters tweaking i finally have a stable charge and discharge using x.16 version of the code on BLE

note the highlighted- the main focus for me was to keep an eye out on the average voltage and make sure they are as close a value to each other as possible during charge and discharge

1709761083948.png

These are the current settings...(Lithium 14s
# JK-Can
Absorption Voltage
Absorption Offset - 0.05
Absorbtion Time - 42 mins
Bulk Voltage - 55.7
Rebulk Offset - 0.8
Float Voltage - 54.1 change to 55.9
Discharge Current - 40 A
Charge Current - 40 A
Total Battery Capacity - 95 Ah
SOC 100% 4.1
SOC 0% 3.25

# JK-Can-2
Absorption Voltage
Absorption Offset - 0.15
Absorbtion Time - 42 mins
Bulk Voltage - 56.4
ReBulk Voltage - 53.6
Rebulk Offset - 0.8
Float Voltage - 56.4
Discharge Current - 28 A
Charge Current - 40 A
Total Battery Capacity - 94 Ah
SOC 100% 4.0
SOC 0% 3.25
 
Last edited:
I´m working on my personal version to connect 3 JKs via mqtt to the CAN ESP and have just published the project here:
The CAN Controller subscribes to the JK-Topics, calculates min/max/avg/sum of the relevant data and then acts like an virtual BMS for the inverter. My JK-ESPs also run syssi´s repo and connect via BLE

Its still work in progress, but it runs fine on my deye productive inverter
Feel free to have a look and maybe it helps you out until we have a standalone multi BMS Version which works without a mqtt broker.
Never really looked into this MQTT tech

i have it installed and broker ready...but not sure how to use it

how would i for example install this yaml you posted...are we flasing it into esp home or there is another process to install and integrate it into HA ?
send me clear guild or youtube channel...
 
Never really looked into this MQTT tech

i have it installed and broker ready...but not sure how to use it

how would i for example install this yaml you posted...are we flasing it into esp home or there is another process to install and integrate it into HA ?
send me clear guild or youtube channel...
I´m sorry, but my Project is not yet for mqtt beginners but for experienced users which are at least very familiar with the mqtt/broker/topic structure.
I needed a couple of month learning by doing to understand how everything works with mqtt - so that´s nothing to explain by the way.

You would also not be able to configure all topics without an ESPHome dashboard where you can configure the yaml in the builtin editor with syntax highlighting. Sorry :-(
 
I´m sorry, but my Project is not yet for mqtt beginners but for experienced users which are at least very familiar with the mqtt/broker/topic structure.
I needed a couple of month learning by doing to understand how everything works with mqtt - so that´s nothing to explain by the way.

You would also not be able to configure all topics without an ESPHome dashboard where you can configure the yaml in the builtin editor with syntax highlighting. Sorry :-(
i will leave it alone for now then...i do have ESPHome dash though

i am about to also use it to monitor my other little project Sofar Inverter
 
I´m working on my personal version to connect 3 JKs via mqtt to the CAN ESP and have just published the project here:
The CAN Controller subscribes to the JK-Topics, calculates min/max/avg/sum of the relevant data and then acts like an virtual BMS for the inverter. My JK-ESPs also run syssi´s repo and connect via BLE

Its still work in progress, but it runs fine on my deye productive inverter
Feel free to have a look and maybe it helps you out until we have a standalone multi BMS Version which works without a mqtt broker.
I'm also not an Mqtt expert but I did some python code to try to read the bms parameters into a controller... Well I think I'll go to influxdb first, easier to handle databases than Mqtt I guess 🤣.

But glad somebody else already did it. So I might just need to adapt it and, if useful, do a PR to share the changes 😁.
 
I´m sorry, but my Project is not yet for mqtt beginners but for experienced users which are at least very familiar with the mqtt/broker/topic structure.
I needed a couple of month learning by doing to understand how everything works with mqtt - so that´s nothing to explain by the way.

You would also not be able to configure all topics without an ESPHome dashboard where you can configure the yaml in the builtin editor with syntax highlighting. Sorry :-(
Which Esp32 and can board are you using exactly for the Deye communication part? 3.3v or 5v can?
 
Back
Top