diy solar

diy solar

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

It looks like you are missing the "pkg_resources" module.

Code:
ModuleNotFoundError: No module named 'pkg_resources':
That setup tools with pkg_ resources are installed. Grabbed a PC and everything work for flashing the ESP. Very odd issue on my MAC. Anyway it’s running and waiting for updated version. Not connected to CAN yet.
 
That setup tools with pkg_ resources are installed. Grabbed a PC and everything work for flashing the ESP. Very odd issue on my MAC. Anyway it’s running and waiting for updated version. Not connected to CAN yet.

I'm preparing the new YAML, it's coming soon.
 
@MrPablo @Der_Hannes @shvm @arzaman @cinusik @chaosnature @ChrisG

YamBMS 1.3.2 (dev branch)

From now on it will be mandatory to have esphome in minimum version 2024.6.0 to compile.

By default with a minimal version of BMS sensors in order to reduce loop time.

View attachment 228455
I have just checked and i can see my Python env is lower than the current requirement
1720882566124.png

Would you be listing this down in the ReadMe Doc as a requirement for other users of the project?


I will update my environment now bfor i forget.....
 
Guys,

I am not sure the document is up to date (unless I am looking in the wrong location?)
The changelog doesn't seem up-to-date, A lot changed since the 1.17.4 release

1720886107288.png

Also while on the topic of documentation, I have a few lines I would like reviewed - it is a list of what files get edited
this helps for users who are doing updates offline and not starting from scratch pulling the Github repo.

Quick Offline Install/Update Guild:

# Project Location


# Project Forums

# First of All White List EspHome Directory you are using -
C:\EspHome\ # EspHome Project Dev location
C:\Users\osagk\.platformio\
C:\Python311\

# Then Run: - Just 2 Commands
cd "C:\EspHome\esphome-jk-bms-can-development\esphome-jk-bms-can-development" # Where your project files are located
esphome run multi-bms_ble_one-esp-x.yaml --device 192.168.x.xxx

# Update Config
esphome upload multi-bms_ble_one-esp-x.yaml --device 192.168.x.xxx

# List of Files to Edit
secrets.yaml # Enter Wifi Username and Password
one/multi-bms_ble_one-xx.yaml # Substitution (e.g Name), PAckages ( e.g device_base, device_board for lighting), Webserver option, MQTT option

board_atom-s3-lite.yaml # Enter Board Type ?
smartbms.yaml # Uncomment Package to use
device_base.yaml
# Friendly name

The Text in blue is what I want reviewed..... I am suspecting I have listed some files that don't need editing ?





Regards
 
Last edited:
Also - Question,
I am new to GitHub, when one follows the GitHub install by pulling the files and installing (following the readme instructions) when the project gets updated, is there an update command (to only update what has changed?) or do we just run the same command to pull, but I assume it will overwrite all custom config ?
 
Also - Question,
I am new to GitHub, when one follows the GitHub install by pulling the files and installing (following the readme instructions) when the project gets updated, is there an update command (to only update what has changed?) or do we just run the same command to pull, but I assume it will overwrite all custom config ?

If you fork yes, you can sync the changes.

Concerning the new YamBMS version I will create a new dedicated git, the documentation with the changelogs will be updated at that time. At the moment it is in development.
 
Updated code working with ESP32 Devkit and MCP2515. Testing with one BMS now. Will test with two or three tomorrow. No comments on Frankenstein mess. Plan on cleaning it up this week. Three different JK->CAN projects going on. lol. No issues with EG4 6000xp (LuxPower) lithium setting battery type 02
 

Attachments

  • IMG_5619.jpeg
    IMG_5619.jpeg
    171.6 KB · Views: 16
  • IMG_5620.jpeg
    IMG_5620.jpeg
    1 MB · Views: 16
  • IMG_5621.jpeg
    IMG_5621.jpeg
    74.4 KB · Views: 15
  • IMG_5623.jpeg
    IMG_5623.jpeg
    87.5 KB · Views: 11
Last edited:
One odd issue, I hit my SOC level to AC charge and it did for a few minutes then the 'BMS' is reporting Charging Forbidden as seen in the screenshot below. Not sure how to get this to charge.
1720924480367.png

Edit, another anomaly:
1720925152128.png
 
Last edited:
Guys,

I am not sure the document is up to date (unless I am looking in the wrong location?)
The changelog doesn't seem up-to-date, A lot changed since the 1.17.4 release

View attachment 228471

Also while on the topic of documentation, I have a few lines I would like reviewed - it is a list of what files get edited
this helps for users who are doing updates offline and not starting from scratch pulling the Github repo.

Quick Offline Install/Update Guild:

# Project Location


# Project Forums

# First of All White List EspHome Directory you are using -
C:\EspHome\ # EspHome Project Dev location
C:\Users\osagk\.platformio\
C:\Python311\

# Then Run: - Just 2 Commands
cd "C:\EspHome\esphome-jk-bms-can-development\esphome-jk-bms-can-development" # Where your project files are located
esphome run multi-bms_ble_one-esp-x.yaml --device 192.168.x.xxx

# Update Config
esphome upload multi-bms_ble_one-esp-x.yaml --device 192.168.x.xxx

# List of Files to Edit
secrets.yaml # Enter Wifi Username and Password
one/multi-bms_ble_one-xx.yaml # Substitution (e.g Name), PAckages ( e.g device_base, device_board for lighting), Webserver option, MQTT option

board_atom-s3-lite.yaml # Enter Board Type ?
smartbms.yaml # Uncomment Package to use
device_base.yaml
# Friendly name

The Text in blue is what I want reviewed..... I am suspecting I have listed some files that don't need editing ?





Regards


I updated the README of the dev branch

I will do a detailed installation procedure later.

The only YAML that needs to be checked and configured is the main one like for example "multi-bms_ble_one-esp.yaml" but you can modify other YAMLs if you want.

For the moment there have been a lot of changes but in the future the goal is that the main YAML which contains all your specific parameters can be preserved and reused each time the other YAMLs classified in the 'packaged' folder are updated.
 
How were your BMS switches at that time ?

Could it come from a BMS protection/alarm because you would have exceeded the charging current of 40A ?

One odd issue, I hit my SOC level to AC charge and it did for a few minutes then the 'BMS' is reporting Charging Forbidden as seen in the screenshot below. Not sure how to get this to charge.
View attachment 228561

Regarding this image, it seems that your BMS is decombined, the values I see with a SOC at 2% and the other values at 0 are the default ones when no BMS is combined in YamBMS.

Perhaps this occurred following a BMS alarm, in which case the BMS was decombined automatically.

 
@MrPablo @Der_Hannes @shvm @cinusik @chaosnature @ChrisG @widget4145

Here are the conditions for a BMS to be combined into YamBMS :
  1. The Combine enabled switch highlighted in orange MUST be activated
  2. At least one of the two charge/discharge switches highlighted in yellow MUST be activated
  3. The BMS must not report alarms
If one of these 3 conditions is not respected the BMS will be decombined automatically.

YamBMS combine condition.png
 
Last edited:
@MrPablo @Der_Hannes @shvm @cinusik @chaosnature @ChrisG @widget4145

Here are the conditions for a BMS to be combined into YamBMS :
  1. The Combine enabled switch highlighted in orange MUST be activated
  2. At least one of the two charge/discharge switches highlighted in yellow MUST be activated
  3. The BMS must not report alarms
If one of these 3 conditions is not respected the BMS will be decombined automatically.

View attachment 228591
Just using one BMS to test with. Have others to add today but this was my setting.

Update: I’m actually back on the single BMS version of code. No matter what I did, couldn’t get inverter to charge from PV or Grid. Single BMS version with same BMS worked immediately.
 

Attachments

  • IMG_5629.jpeg
    IMG_5629.jpeg
    88.1 KB · Views: 3
  • IMG_5630.jpeg
    IMG_5630.jpeg
    139 KB · Views: 3
Last edited:
Just using one BMS to test with. Have others to add today but this was my setting.

Your system is currently in alarm.

What is the value of this parameter?
  • YamBMS 1 Errors Bitmask Alarm
  • YamBMS 1 Errors Bitmask Warning
  • YamBMS 1 Battery module
 
Last edited:
Your system is currently in alarm.

What is the value of this parameter?
  • YamBMS 1 Errors Bitmask Alarm
  • YamBMS 1 Errors Bitmask Warning
  • YamBMS 1 Battery module
[/QUOTE
Yes, inverter in Alarm but don't know why. BMS was fine (both charge and discharge enabled on the BMS itself). Something was alarming the inverter through CAN interface.

All this happened after I went down to 25% SOC which I do all the time with latest production branch (single wired BMS code). Batteries are very balanced.
Alarm: Good State "0" / Bad State (can't charge) "65535"
Warning: Good State "0" / Bad State (can't charge) "Unavailable"
Battery Module: Good State "1" / Bad State (can't charge) "0" or "Unavailable"

The second I plugged the production version of code CAN into inverter, everything worked and charging started.
 
Last edited:
Yes, inverter in Alarm but don't know why. BMS was fine (both charge and discharge enabled on the BMS itself). Something was alarming the inverter through CAN interface.

All this happened after I went down to 25% SOC which I do all the time with latest production branch (single wired BMS code). Batteries are very balanced.
Alarm: Good State "0" / Bad State (can't charge) "65535"
Warning: Good State "0" / Bad State (can't charge) "Unavailable"
Battery Module: Good State "1" / Bad State (can't charge) "0" or "Unavailable"

The second I plugged the production version of code CAN into inverter, everything worked and charging started.

Currently there is no BMS combined into YamBMS. The values you see are the default ones.

Can you send me your main YAML privately please?
 

diy solar

diy solar
Back
Top