diy solar

diy solar

JK BMS CAN bus comms now possible for inverters that support Goodwe and Pylontech batteries

and where can I find version 1.3 of the pylon canbus protocol
i see only 1.2 (2018/04/08) in public access
but many inverters require 1.3 ver
 

uksa007 - good question

maybe for full functionality of bms-pylon bridge need to translate messages through CAN + trough RS485?
RS485 have many additional info which can be used by an inverter?
 

uksa007 - good question

maybe for full functionality of bms-pylon bridge need to translate messages through CAN + trough RS485?
RS485 have many additional info which can be used by an inverter?
I don’t have any issues with using CAN.
There is no option to use both, inverters use one or the other, CAN is more common.

As I said there is no need for the inverter to know the battery capacity, the inverter is advised over CAN of what the battery is requesting, and defers to it when BMS comms is enabled.

The Total capacity is sometimes displayed by manual configuration or by selecting a battery profile.
 
I don’t have any issues with using CAN.
There is no option to use both, inverters use one or the other, CAN is more common.

As I said there is no need for the inverter to know the battery capacity, the inverter is advised over CAN of what the battery is requesting, and defers to it when BMS comms is enabled.

The Total capacity is sometimes displayed by manual configuration or by selecting a battery profile.
I understand that this will greatly complicate the system. This is just my suggestion. I'll try to make one myself - actually I'm making a universal battery reader right now (complex rs232/rs485/can).
 
Hello, I have problems with update rate in HA.
Data are retrieved randomly (>20' sometimes), but RS485/CAN conversion is working correctly.

Do you have any idea why ?
 
Hello, I have problems with update rate in HA.
Data are retrieved randomly (>20' sometimes), but RS485/CAN conversion is working correctly.

Do you have any idea why ?
Hi,

Do you have an inverter connected with CAN BUS?
This is normally caused when the inverter is not connected or not responding.
Can you attach some log files of the ESP32

Run esphome logs yourfile.yaml
 
Last edited:
Does the Battery Voltage ever reach 55.2V?
Once it reaches 100% what is the Charging Status in the ESP32 logs or Home Assistant.
Thinking the inverter may not show Absorption, after the battery reaches 55.2V is should stay there for 30min (absorption)
UPDATE. It does absorb fine. It wasn't reaching 55 2v sometimes but when it does it starts absorption as it should.

Sofar me3000sp. V3.10
JK-B2A20S20P
Lifepo4 16s 280ah.
 
UPDATE. It does absorb fine. It wasn't reaching 55 2v sometimes but when it does it starts absorption as it should.

Sofar me3000sp. V3.10
JK-B2A20S20P
Lifepo4 16s 280ah.
That's great, I find 56v for absorption voltage works better for my inverter, it seem reach that voltage more accurately and the battery seem to balance better.
 
UPDATE. It does absorb fine. It wasn't reaching 55 2v sometimes but when it does it starts absorption as it should.

Sofar me3000sp. V3.10
JK-B2A20S20P
Lifepo4 16s 280ah.
Can you let me know how you configured the inverter(battery type etc), so I can add it to the supported inverters details.

Thanks
 
Hi,i have 2 growatts SPF 5000es and i want to build my DIY battery 16s *280AH,i want jk bms with 2A active balance.Can this esp32 work with growatts SPF 5000es?
 
Hi,i have 2 growatts SPF 5000es and i want to build my DIY battery 16s *280AH,i want jk bms with 2A active balance.Can this esp32 work with growatts SPF 5000es?
There seems to be some reports of it working using "The CAN port and protocol 52"

Check your inverter and manual to confirm it can support CAN and batteries using CAN protocol 52.

edit I have a hardware interface that has all the hardware required, plug and play, if that helps.
more info here: https://github.com/Uksa007/esphome-jk-bms-can/discussions/16
 
Last edited:
Is it possible to add this feature: an optional percentage of state of charge to stop charging just as you did for charge voltage.

Say if I specify, 95% it will stop charging once the bms reports 95% SoC.

If I don't specify the stop SoC, it continue charging as it currently does.

I would have loved not to charge to 100% all the time.

Thanks.
 
Last edited:
Hi,

Do you have an inverter connected with CAN BUS?
This is normally caused when the inverter is not connected or not responding.
Can you attach some log files of the ESP32

Run esphome logs yourfile.yaml
Yes, and RS485/canbus conversion works fine (updated really often)

Where should I run this command ?

I think it may be WiFi connection too weak. I'll try to move the access point.

If you want to add to the compatibility list I have JK BMS JK-BD6A17S8P with Sofar Solar Hybrid Inverter HYD-5000-ES (Firmware V3.60) in Pylon mode (US5000), 16x230ah
 
Last edited:
Is it possible to add this feature: an optional percentage of state of charge to stop charging just as you did for charge voltage.

Say if I specify, 95% it will stop charging once the bms reports 95% SoC.

If I don't specify the stop SoC, it continue charging as it currently does.

I would have loved not to charge to 100% all the time.

Thanks.
Just set the absorption voltage lower, eg 54.1V is about 95% according to my charging curve.

I will test with this voltage today and see what the SOC JK-BMS reports.
Edit: Setting 54V Absorption voltage and 30min absorption time, BMS resported 96% SOC.
 
Last edited:
Hello, there's a compilation error with ESPHome 2023.4.0, because of this modification :

UART ids​

Due to uart0 / uart1 / uart2 being defined in some of the platform code ESPHome uses, ESPHome will now disallow these ids from being used in the config. You can simply change them to uart_0 to continue using.

Maybe you should change the examples files ?

Updating /config/esphome/jk-bms.yaml
------------------------------------------------------------
INFO Reading configuration /config/esphome/jk-bms.yaml...
INFO Updating https://github.com/uksa007/esphome-jk-bms-can.git@main
Failed config
uart: [source /config/esphome/jk-bms.yaml:109]
- ID 'uart0' is reserved internally and cannot be used.
id: uart0
baud_rate: 115200
rx_buffer_size: 384
tx_pin: GPIO17
rx_pin: GPIO16
debug:
direction: BOTH

jk_modbus: [source /config/esphome/jk-bms.yaml:118]
- id: modbus0

ID 'uart0' is reserved internally and cannot be used.
uart_id: uart0
=========== [ERROR] /config/esphome/jk-bms.yaml ===========
 
Hello, there's a compilation error with ESPHome 2023.4.0, because of this modification :

UART ids​

Due to uart0 / uart1 / uart2 being defined in some of the platform code ESPHome uses, ESPHome will now disallow these ids from being used in the config. You can simply change them to uart_0 to continue using.

Maybe you should change the examples files ?

Updated code, can you please test and let me know if this resolves your issues?
  • V1.13.1 24/4/23 Fix compile issues with new version of ESPhome 2023.4.0, set rebulk offset to 2.5
 
Hello i'm still having disconnection issues, but I can't figure out if it's wifi related or anything else.
The same way used to upload the code onto the ESP32.
I don't understand this part, I uploaded the code through Home assistant ESP implementation ?

If I activate the logs in the YAML there's really a lot of things reported so it's difficult to diagnose :(
 
Hello i'm still having disconnection issues, but I can't figure out if it's wifi related or anything else.

I don't understand this part, I uploaded the code through Home assistant ESP implementation ?

If I activate the logs in the YAML there's really a lot of things reported so it's difficult to diagnose :(
I use ESPhome on windows, so that how I get logs.

edit
If you are using the HA addon.
You can just download the logs from the Logs window of your ESPhome device.

c2b33dccfb3c4dfac2a442079634910e2fd01826.png
 
Yes that's how I do but when I loose connection, there's no logs anymore ?
Hopefully it will give me an idea of what's going on.

Else you can connect to it using a USB cable and serial terminal 115200 8N1.
 

diy solar

diy solar
Back
Top