ai-republic / bms-to-inverter

Use, monitor and control any battery brand with any inverter! Application to read and monitor data from BMSes and write data to an inverter using any protocol (e.g. UART, RS485, ModBus or CAN)
https://github.com/ai-republic/bms-to-inverter
Other
66 stars 10 forks source link

Jk BMS to Solplanet Inverter #40

Open Lino34s opened 1 month ago

Lino34s commented 1 month ago

Hey man! Kudos for this amazing project. Is there any chance on getting my new Nissan leaf battery pack with jk bms to communicate with my asw3680 hybrid inverter via rs485

I guess the inverter doesn't have Can because I had it linked flawlessly with my pylonteck bank via rs485 and I just can't find any reference on the product manual either

ai-republic commented 1 month ago

Hi, yes, I'm going to start implementing the RS485 PylonTech protocol this weeking, so if you use your JK BMS and your inverter can communicate via the Pylon RS485 protocol then it should be no problem.

ai-republic commented 1 month ago

Sorry, didn't get round to it this weekend, but I see what I can do until next :)

Lino34s commented 1 month ago

Hey Torsten,

I guess I figured out my Solplanet inverter also supports CAN communication.

Do you think I’ll be able to get them to communicate? Because JK BMS also emulate pylonteck, for example, and I didn’t get

Thank you very much, Diogo Lino

ai-republic commented 1 month ago

So your JK does CAN and also the inverter right? And both 'speak' the PylonTech communication specification?

Lino34s commented 1 month ago

Yes they do, because first, until a couple months ago, I had my Solplanet inverter fully integrated with a 5kwh pylonteck bank (via rs485). I just did a 18kwh powerwall with jk BMS from my old Nissan leaf that I want to upgrade

ai-republic commented 1 month ago

In that case, yes my application can communicate with both your BMS(es) and inverter :)

Lino34s commented 1 month ago

I would like to take this opportunity to include the document with the communication protocol for my Solplanet ASW3680H-S2 Inverter

MB001_ASW GEN-Modbus-en_V2.1.5.pdf

ai-republic commented 1 month ago

Thanks for the communication specification. As your Solplanet inverter supports the PylonTech RS485 protocol I would recommend to use this. I'm still implementing the binding but hope to finish it this weekend

Lino34s commented 1 month ago

Perfect!

I'm also waiting for the rs485 Can Hat for RaspPi to come in the next few days. I guess I might need some little help on the assembly

Thanks a lot man

ai-republic commented 1 month ago

@Lino34s the Pylon RS485 binding is now implemented. Please get the new Configurator , choose _PYLONRS485 in the inverter tab and do a Clean install. Please also configure the debug log-level so that I can check if there are any prolems. Happy testing ;)

Lino34s commented 2 weeks ago

Can you please provide me with an image of the BMS/CAN Hat/Inverter setup, including the respective cabling and connections?

ai-republic commented 2 weeks ago

Hi @Lino34s, this is different for each BMS, CAN hat and inverter depending on your model. But in the manuals you should find the corresponding plugs and PIN layout for the connections. Then you just need to connect CAN H to CAN H and CAN L to CAN L with the correct pins. In general like this: image

Lino34s commented 1 week ago

Sorry. Is that the 1CH or 2CH CAN HAT? I just bought the 1xCH one since I thought of using CAN on the BMS side and rs485 on the inverter side. Am I correct? I am currently preparing the cable connections. If I understand correctly, the BMS connection is made on the pins, and the inverter connection is made on that green SP3485 interface chip from de right. Only those 4x cables from your scheme are used right?

ai-republic commented 1 week ago

It would be a 1CH CAN/RS485 hat similar to this https://www.waveshare.com/rs485-can-hat.htm

Lino34s commented 2 days ago

Getting these logs when trying to read BMS data image

ai-republic commented 1 day ago

Hmm, looks like you specified a CAN port for a RS_485 binding. Could you attach your config.properties file here please?

Lino34s commented 1 day ago

###################################################################

System specific settings

###################################################################

###################################################################

BMS settings

###################################################################

Simple single port configuration

bms.pollIntervall - is the interval to request BMS data (in seconds)

bms.x.type - can be (DALY_CAN, DALY_RS485, JK_CAN, PYLON_CAN or SEPLOS_CAN

bms.x.portLocator - is the locator/device to use to communicate to the BMS, eg. can0, /dev/ttyUSB0, com3, etc.

bms.x.baudRate - is the locator/device baudrate to use to communicate to the BMS, eg. 9600, 500000, etc.

bms.x.delayAfterNoBytes - is the delay after receiving no data (in ms)

bms.pollInterval=1

bms.1.type=JK_CAN bms.1.id=1 bms.1.portLocator=can0 bms.1.baudRate=500000 bms.1.delayAfterNoBytes=200

###################################################################

Inverter settings

###################################################################

The inverter type can be NONE, DEYE_CAN, GROWATT_CAN, SMA_SI_CAN, SOLARK_CAN

inverter.type=PYLON_RS485

The port name/device to use to communicate to the inverter

inverter.portLocator=can0

The port baud rate to use to communicate to the inverter

inverter.baudRate=9600

Interval to send data to the inverter (in seconds)

inverter.sendInterval=1

###################################################################

Optional services settings

###################################################################