• 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)

Is there anything purposefully done to toggle the BMS charge / discharge switches when yambms switches from EOC/Stop to Bulk when the rebulk threshold is met? I heard my BMS relay click off and on very quickly right when yambms switched. If this is done purposefully I’d like to disable it if possible.
 
Is there anything purposefully done to toggle the BMS charge / discharge switches when yambms switches from EOC/Stop to Bulk when the rebulk threshold is met? I heard my BMS relay click off and on very quickly right when yambms switched. If this is done purposefully I’d like to disable it if possible.

No, there is bms logic that does this but it's code that only @Dmode uses and it is not enabled unless you have imported it into your YAML.
 
Last edited:
Trying to compile the new remote feature 1.5.5

6 JKBMS tcan485, so using minimal file

get this error on compiler:

this is my configuration:

what am i missing? doing wrong?

thanks. newb here :-D

At the beginning of the BMS section, you didn't import the sniffer that connects to UART1.

You can also comment out UART2 and UART3. (board_options section)

If you'd like to try it, the standard version = minimal + cell voltages.

You took the example for JK-B, it is simpler to use the example for JK-PB (JK RS485).

 
Last edited:
At the beginning of the BMS section, you didn't import the sniffer that connects to UART1.

You can also comment out UART2 and UART3. (board_options section)

If you'd like to try it, the standard version = minimal + cell voltages.

You took the example for JK-B, it is simpler to use the example for JK-PB (JK RS485).

U can really explain it just perfectly.. thanks… now working beautiful 👍🏻
 
Probably possible, do you know the protocol used in this case?

According to the list of compatible models, most of them use LUX and PYLON protocols.
1744546364157.png
1744546379771.png

But LUX for HinaEss has code 1 in inverter settings, while other LUX protocol models use code 6 in the inverter.
1744546242455.png
 
Hi! Great software, many thanks for all the effort!

I can report that i have it working (single BMS) successfully with:

Sofar HYD-6000ES inverter
JBD-SP25S003-L16S-100A-B BMS
ESP32 devkit using BLE connection (i think its on the limit as if i monitor logging from ESPHome Builder it's enough to crash the BT comms)
TJA1050 CAN transeiver (no resistors)

CAN name & protocol default to Automatic/Pylon 2 in HA and automatically change from Battery type: Default to Pylon in inverter

Only thing i haven't been able to do is get request force charge to work. It has no effect. I can get the inverter to force charge using modbus over rs485 with another project BUT i have to set inverter to passive mode and then the EPS circuit does not work during power failure.

Has anyone else had any success getting the request force charge option to work with a Sofar inverter?
 
@Imanol82

Regarding your problem there will probably be a solution but I haven't had time to look into it yet.
I've answer you in Github but thanks a lot!

Everything working with the ESP32 ETH01-EVO.


The only thing I can't find is the sniffer, and theorically I have activated...

1744568240675.png


The result:

1744568091742.png

1744568103564.png

1744568114286.png


Thank you very much my friend!
 

Attachments

  • 1744568204491.png
    1744568204491.png
    10.8 KB · Views: 5
@Imanol82

With Deye, it uses the PYLON 1.2 protocol (fewer CAN messages).

The additional messages of the PYLON 2 protocol are not supported by Deye, this adds nothing new.

The EOC Timer switch is a safety feature I added that will terminate charging after 30 minutes (this value can be changed) even if cell equalization is not complete.

If your batteries are of good quality and well equalized, you can disable this switch.
Charging will end when your cells are equalized.
 
Last edited:
@Imanol82

With Deye, it uses the PYLON 1.2 protocol (fewer CAN messages).

The additional messages of the PYLON 2 protocol are not supported by Deye, this adds nothing new.

The EOC Timer switch is a safety feature I added that will terminate charging after 30 minutes (this value can be changed) even if cell equalization is not complete.

If your batteries are of good quality and well equalized, you can disable this switch.
Charging will end when your cells are equalized.

Thank you very much, changes done.

I've disables de EOC. My batteries works fine.
 
Hi @Sleeper85, I have several BYD 48V 2.5kWh (B-Plus-2.5) batteries connected to a Victron Multiplus II with Cerbo GX comms to the battery bank through the BMU inside of the battery rack box - see attached system diagram, address dip switches of my 2x BYD batteries connected in parallel...

I want to add JK-B BMS 16s packs to the mix, where communication should also be added to Victron VRM by using YamBMS - will this be possible with your multiple BMS solution? Will the additional battery packs with JK-B BMSes need to be connected with RS485 to the BYD Box BMU and from there, the BMU will send data to the Inverter through CAN?

I would appreciate if you have some info on this to get it to also communicate if possible...

Thanks.
 

Attachments

  • BYD-Box-2.5-Pro.JPG
    BYD-Box-2.5-Pro.JPG
    12.9 KB · Views: 3
  • BYD-Box-2.5-Pro-Addressing.JPG
    BYD-Box-2.5-Pro-Addressing.JPG
    31.6 KB · Views: 3
  • BYD-Box-System-Diagram.JPG
    BYD-Box-System-Diagram.JPG
    57.7 KB · Views: 3
@Sleeper85

Hello, since i have the added the shunt to the my Yam i have observed fallowing behavior

When the battery is in bulk and not 100% charged the SOC displayed by inverter is matching with the SOC from YAML.
When the battery si reaching 100% charge, the state is switching from Bulk to Float the battery voltage is decreased to float voltage forcing inverter to discharge the battery exporting some energy.
This discharge is counted by the shunt, in shunt app can be observed a SOC of 99.9%, this value been sent to inverter it shows 99%, the yam is displaying 100% as the accuracy decimals is set to 0.

I have rounded the value of SOC in lambda to fix this issue and now the value displayed by the inverter obviously is rounded to 100%

lambda: |-
float soc = round(id(${yambms_id}_state_of_charge).state);
if (id(${yambms_id}_bms_combined).state == 0) return 0; // no BMS combined => sending 0%
else if (soc < 99) return soc; // SoC < 99% => sending SoC
else if (id(${yambms_id}_eoc) == true) return soc; // End Of Charge => sending SoC
else return 98; // Otherwise => sending 98%

My be just the case for Victron shunt (I have the 300A version) sending SOC with decimal, i don't know if this is happening for other users but in my case this rounding solved the issue.
 
@Sleeper85

Hello, since i have the added the shunt to the my Yam i have observed fallowing behavior

When the battery is in bulk and not 100% charged the SOC displayed by inverter is matching with the SOC from YAML.
When the battery si reaching 100% charge, the state is switching from Bulk to Float the battery voltage is decreased to float voltage forcing inverter to discharge the battery exporting some energy.
This discharge is counted by the shunt, in shunt app can be observed a SOC of 99.9%, this value been sent to inverter it shows 99%, the yam is displaying 100% as the accuracy decimals is set to 0.

I have rounded the value of SOC in lambda to fix this issue and now the value displayed by the inverter obviously is rounded to 100%

lambda: |-
float soc = round(id(${yambms_id}_state_of_charge).state);
if (id(${yambms_id}_bms_combined).state == 0) return 0; // no BMS combined => sending 0%
else if (soc < 99) return soc; // SoC < 99% => sending SoC
else if (id(${yambms_id}_eoc) == true) return soc; // End Of Charge => sending SoC
else return 98; // Otherwise => sending 98%

My be just the case for Victron shunt (I have the 300A version) sending SOC with decimal, i don't know if this is happening for other users but in my case this rounding solved the issue.

Fixed and published on GitHub ;)
 
Hi @Sleeper85, I have several BYD 48V 2.5kWh (B-Plus-2.5) batteries connected to a Victron Multiplus II with Cerbo GX comms to the battery bank through the BMU inside of the battery rack box - see attached system diagram, address dip switches of my 2x BYD batteries connected in parallel...

I want to add JK-B BMS 16s packs to the mix, where communication should also be added to Victron VRM by using YamBMS - will this be possible with your multiple BMS solution? Will the additional battery packs with JK-B BMSes need to be connected with RS485 to the BYD Box BMU and from there, the BMU will send data to the Inverter through CAN?

I would appreciate if you have some info on this to get it to also communicate if possible...

Thanks.

I understand that communication between the BMU and your two battery packs takes place over an RS485 bus with an unknown BYD protocol.

We could remove the BMU and connect everything to YamBMS (if the BYD RS485 protocol document is easily found).
YamBMS is, in a way, a BMU.

Keep the BMU and connect it to YamBMS via a CAN bus input.
In this case, I assume you have a choice of CAN protocol for the BMU output ?

In both cases, this requires custom development.
 
hallo please info how config to flow control pin to rs485

board_ESP32_DevKit-V1.yaml and controler 485​

485
 
Just got my Lilygo T-Connect board. Trying to compile within HA/ESPhome and the remote packages version using; YamBMS_RP_JK-BMS_RS485_Modbus_mode2.yaml as a starting point, but I'm getting "failed to load packages.... is not a valid YAML file".

I'm trying to avoid installing from a local download of packages if possible, preferring to the remote option, but will download and do locally if that's the only way?
 

Attachments

  • Screenshot 2025-04-15 at 21.31.29.png
    Screenshot 2025-04-15 at 21.31.29.png
    95 KB · Views: 6

diy solar

diy solar
Back
Top