• 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

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

Are you using the LuxPower protocol as well? I've seen it sit like this for 12 hours, but restarting the esp32 doesn't immediately resolve it. Maybe it takes 5-10 minutes after resetting the esp32 and I'm getting too impatient and starting fiddling with things, eg I thought maybe enabling the heartbeat monitoring resolved it but I had also reset the esp32 10 minutes prior.

EDIT: Also mentioned above but I looked at my data and I'm positive that toggling the heartbeat monitoring switch cleared it, when I toggled the switch the inverter immediately started charging. If I have to I'll find a way to monitor the inverter charging status in HA and then toggle the heartbeat monitoring on and off if YamBMS is in the bulk state and the inverter shows charging is forbidden.
This exact thing happened to me yesterday. And I'm using an ancient version of YAM-BMS (it wasn't even called that then)
LUX protocol, SNA 5k

Fiddling with the force charge and full charge CAN switches somehow started charging normally. That is all the information I have at the moment.
These inverters can be quite a black box sometimes.
 
I agree, but toggling that switch seems to have interrupted whatever is causing the issue.
I concede that this must have just been coincidence, I'm unable to replicate it again, but it does seem like fiddling with YamBMS controls eventually gets it to start working. I think I'm going to enable float charging anyway and maybe that will keep it from ending up in this state.
 
I would like to add a Victron SmartShunt via BT to my solar system (Deye + JK BMS PB + Atom S3) to accurately measure voltage and SOC. Is it a good idea to transfer the values below to the shunt settings ? I'm not sure how to set this up so that the yambus and shunt settings do not conflict.

I would appreciate any advice.
 

Attachments

  • 2025-02-19_12h49_21.jpg
    2025-02-19_12h49_21.jpg
    171.1 KB · Views: 18
I would like to add a Victron SmartShunt via BT to my solar system (Deye + JK BMS PB + Atom S3) to accurately measure voltage and SOC. Is it a good idea to transfer the values below to the shunt settings ? I'm not sure how to set this up so that the yambus and shunt settings do not conflict.

I would appreciate any advice.

If you add a shunt, the only information YamBMS will use will be voltage, current, power and SoC. The other parameters of your shunt are used to calculate 100% and they will not be used and will not disrupt operation. When the Bulk charging phase is completed, the SoC of your shunt will be sent, we assume that this will be 100%. During the Bulk charging phase, the SoC will be stuck at 98% max (useful for some inverters).
 
I would like to add a Victron SmartShunt via BT to my solar system (Deye + JK BMS PB + Atom S3) to accurately measure voltage and SOC. Is it a good idea to transfer the values below to the shunt settings ? I'm not sure how to set this up so that the yambus and shunt settings do not conflict.

I would appreciate any advice.
I have a 300A VictronShunt with a 12kW Deye and 2x JK PB. I am using UART for Shunt and i had some issues with HA freezing when charging and discharging with YamBMS 1.5.4. I have downgraded to 1.4.5 and for now i don't have any more freezing on HA, sometimes is lagy but it works. I am waiting and ESP32 S3 to replace the old ESP32 devkit v1 and try again with 1.5.4. I did't try the BT version i am curios if your setup is working fine with last fw 1.5.4. You have just 1 JK bms?
 
Yes, only one one the moment. VictronShunt is in delivery to me and the near weekend i will install it and tested with my setup. I will return with feedback
 
@Sleeper85
I have a question about Requested Discharge Voltage. From documentation:

The Requested Discharge Voltage is the UVP + 0.02 value of your BMS multiplied by the number of cells, in this example (3V * 16).

I have changed Cell UVP on my JK BMS from 3V to 2,8 V

1740047261874.png

Why Requested Discharge Voltage is still 48V ?

1740047338710.png
 
Yes, only one one the moment. VictronShunt is in delivery to me and the near weekend i will install it and tested with my setup. I will return with feedback
@virus100b After 3 days of testing I can confirm that everything works beautifully. No errors, no restarts, no HA freezing.
The shunt is very accurate, especially at low currents.

1740335704586.png
 
Last edited:
Hello, can we add two sliders for the seplos version: max charge and max discharge? to change at any time?Zrzut ekranu 2025-02-24 135853.png
 
Is there any instruction on how I can update version 1.5.1 to the latest version so that it appears in ESPHome in HA? I previously built the current version using ESPHome installed on Windows, and it is not visible in HA.
 
Last edited:
Yes.

I put this on my to-do list. 😉


But don't forget that this has to be changed in the BMS too. And it's because I don't have access to this information that I have to add this option.
If you want I can give you remote access :)
 
Is there any instruction on how I can update version 1.5.1 to the latest version so that it appears in ESPHome in HA? I previously built the current version using ESPHome installed on Windows, and it is not visible in HA.

You need to copy the packages folder into the esphome folder (in HA) using the Samba Share addon. Then you can copy and paste the main YAML (version 1.5.4) of your choice and adapt it to your needs and then flash your ESP32 again.

In the future it will be even easier thanks to this new PR (it will no longer be necessary to copy the packages folder).

 
You need to copy the packages folder into the esphome folder (in HA) using the Samba Share addon. Then you can copy and paste the main YAML (version 1.5.4) of your choice and adapt it to your needs and then flash your ESP32 again.

In the future it will be even easier thanks to this new PR (it will no longer be necessary to copy the packages folder).

Thank you. And when? Maybe I'll just wait.
 
Thank you. And when? Maybe I'll just wait.

This is just a PR, it needs to be validated and merged in dev before arriving in the stable version of esphome.
Then I could adapt the current code so it will probably take several months.

In the meantime you can simply copy the packages folder with Samba share if you want to flash your ESP32 from HA.
 
Just a suggestion, on the hardware side. Maybe you could develop some kind of board who rings all the bells and sell it (or/and make it the pcb available to order). It will simplify the things for beginners and also get you money as a return for all the dedication you've done.

A PCB with esp32 S3, ethernet poe, can and rs485. And if it comes pre-flashed and sure it will sell it very good! Just thoughts to share.
 
Just a suggestion, on the hardware side. Maybe you could develop some kind of board who rings all the bells and sell it (or/and make it the pcb available to order). It will simplify the things for beginners and also get you money as a return for all the dedication you've done.

A PCB with esp32 S3, ethernet poe, can and rs485. And if it comes pre-flashed and sure it will sell it very good! Just thoughts to share.
You just described the Peter board. For several hundred dollars you can buy this from him.

 
I decided to Test Both BLE and Wire
Result below:

CAN-WIRE - When connected to JKBMS Voltage between:
rx2 (GPIO16) and tx2(GPIO17) = 0.01 (0.5v with broken wire)
rx (GPIO1) and tx(GPIO3) = 0.01 (0.5v with broken wire)
Ground and tx or rx = 3.26
# BMS Light Blinking


CAN-WIRE - When Disconnected to JKBM Voltage between - SAME Result
rx2 (GPIO16) and tx2(GPIO17) = 1.04 (0.5v with broken wire)
rx (GPIO1) and tx(GPIO3) = 0.01 (0.5v with broken wire)
Ground and tx = 3.26
Ground and rx = 2.13


To compare i did:
CAN-BLE - When connected to JKBMS Voltage between:
rx2 (GPIO16) and tx2(GPIO17) = 0v
rx (GPIO1) and tx(GPIO3) = 0.5v
# BMS Light Stable on - Can hear beep when it connects to BMS

CAN-BLE - When Disconnected to JKBMS Voltage between - SAME Result
rx2 (GPIO16) and tx2(GPIO17) = 0v
rx (GPIO1) and tx(GPIO3) = 0.5v


i then checked :
Tx and Rx from the JKBMS Voltage between:
Ground and tx = 3.29 after checking wires (0.0 Wire was broken)
Rx and T = 0.0

View attachment 197896
View attachment 197897



ESPHOMe show online
View attachment 197898
View attachment 197902
Great Info to take in for my Curiosity about networking LiFePO4s to hybrid Solar Inverters. I can see the value of limiting charge current as SOC get near top. I wonder how networking improves what the algorithm can do in the inverter by itself with just a simpler non inverter type BMS. While I am sure each brand or firmware could be different, I did notice how my EG4 3000 reduced the charge current as the soc battery voltage approached what I set for top bulk or absorption voltage. So while appreciating seeing more details of what can be monitored in the battery to adjust the inverter, I still wonder if I would ever be motivated to do this extra task (which currently I am not). My Two Cents. I will keep reading too, as I know I just have a glimpse of this subject that all the manufacturers seem to be jumping on as we see their products evolve.





notice
 
You just described the Peter board. For several hundred dollars you can buy this from him.

You mean the guy who used the work from the community, including skipping the license (creative commons, non-commercial), selling the software (that he could do bc of the previous contributors, on a non-commercial usage), and closed his github repo? No way. That's not how open source works.

I'm just suggesting to Sleeper a way to reach more audience and earn some money to pay for all the time he is giving for free (a part from the "buy me a coffee")
 
You mean the guy who used the work from the community, including skipping the license (creative commons, non-commercial), selling the software (that he could do bc of the previous contributors, on a non-commercial usage), and closed his github repo? No way. That's not how open source works.

I'm just suggesting to Sleeper a way to reach more audience and earn some money to pay for all the time he is giving for free (a part from the "buy me a coffee")
You know things have gone crazy when the peterboard costs more than the bms itself...
 
You mean the guy who used the work from the community, including skipping the license (creative commons, non-commercial), selling the software (that he could do bc of the previous contributors, on a non-commercial usage), and closed his github repo? No way. That's not how open source works.
I didnt know ALL THAT was going on lol.
Glad I didnt buy that.
 
You mean the guy who used the work from the community, including skipping the license (creative commons, non-commercial), selling the software (that he could do bc of the previous contributors, on a non-commercial usage), and closed his github repo? No way. That's not how open source works.

I'm just suggesting to Sleeper a way to reach more audience and earn some money to pay for all the time he is giving for free (a part from the "buy me a coffee")

I don't know if it's really a good idea and I haven't really thought about it...
Produce PCBs, store them, send them and then a new more powerful ESP32 arrives...

1) Depending on the BMS used, YamBMS needs different hardware
2) There are already some great boards that meet different needs

I'm thinking in particular of the Atom S3 and the LilyGo boards.

Thanks for thinking of me in any case ;)
 
If you add a shunt, the only information YamBMS will use will be voltage, current, power and SoC. The other parameters of your shunt are used to calculate 100% and they will not be used and will not disrupt operation. When the Bulk charging phase is completed, the SoC of your shunt will be sent, we assume that this will be 100%. During the Bulk charging phase, the SoC will be stuck at 98% max (useful for some inverters).

In case of multiple shunts, can we choose which BMSes are connected in each one?
 

diy solar

diy solar
Back
Top