dalathegreat / Battery-Emulator

This software enables EV battery packs to be used for stationary storage in combination with solar inverters.
GNU General Public License v3.0
1.07k stars 148 forks source link

Testing Kostal Plenticore #212

Closed jspv33 closed 6 months ago

jspv33 commented 8 months ago

I have connected a Plenticore Gen1 to a Leaf 30 KWH battery. On the Plenticore: CAN H , CAN L, GND, 12 volts, 120 ohm resistor. BatteryAllowsContactorClosing = true

SSR+ and SSR- are shut,Led on, relays clicking inside battery. Debug via USB shows battery data. No error on Arduino IDE serial monitor. Battery voltage shown by inverter. Battery does not charge or discharge. As the Plenticore settings allow any BYD battery as well as Pylontech, I have tried all CAN batteries.

dalathegreat commented 8 months ago

Kostal inverters are listed as "⚠️ (Testers welcome!)", nobody has confirmed one to work yet.

Here are some interesting threads, BYD+Kostal: https://secondlifestorage.com/index.php?threads/communication-between-byd-battery-and-kostal-plenticore-inverter.10513/

Looks like it could also work via Modbus? bild

Good luck with testing, not really anyone that has done this before you, so wishing for the best!

jspv33 commented 8 months ago

Ok, I was just hoping not to be the first one! I will give it a try with Modbus. The inverter was up to now connected over Modbus to a BYD HV. What I did find out with the CAN setup was when the power meter is disconnected from the inverter, the Leaf battery discharges into the inverter. Obviously there is nothing stopping the AC to be fed to the grid.

jspv33 commented 8 months ago

Testing with BYD MODBUS gives packet length error:

BMS Status: Active, , Power: 180W Values from battery Real SOC%: 57% , GIDS: 149 (x77Wh) , Battery gen: 1 , Has heater: 0 , Max cell voltage: 3770mV , Min cell voltage: 3760mV , Cell deviation: 10mV [E] 187664| ModbusServerRTU.cpp [ 252] serve: RTU receive: E5 - Packet length error [E] 188674| ModbusServerRTU.cpp [ 252] serve: RTU receive: E5 - Packet length error [E] 189684| ModbusServerRTU.cpp [ 252] serve: RTU receive: E5 - Packet length error [E] 190694| ModbusServerRTU.cpp [ 252] serve: RTU receive: E5 - Packet length error [E] 191704| ModbusServerRTU.cpp [ 252] serve: RTU receive: E5 - Packet length error Values going to inverter

dalathegreat commented 8 months ago

From the Fronius Wiki;

Make sure the Battery-Emulator has a good modbus connection to the Inverter

recomch commented 8 months ago

I can share the same findings. I additionally tried to set up a double lillygo. Battery and inverter connected via CAN. Using SMA, Pylon and BYD Can was not working either.

Setting up the fake battery and connect it via modbus to the inverter showed the same error massages regarding ModbusServerRTU.cpp [ 252] serve: RTU receive: E5 - Packet length error". Cabel length from lilly to inverter was 10cm. with a cat7 cable.

I now try to get the installer code for the kostal inverter to search for additional settings.

recomch commented 8 months ago

I found these additional settings in the inverter:

Byte order: little-endian (CDAB) Standard Modbus (default) big-endian (ABCD) Sunspec (additional option) Modbus port: 1502 Unit ID: 71

dalathegreat commented 6 months ago

@recomch Were you able to get the setup running?

recomch commented 6 months ago

@dalathegreat Unfortunetly not. I only found Modbus TCP settings with the installer code, but none for the modbus RTU. I have not tried it with the latest releases, so i cant tell if it would work now.

I replaced the Kostal intervert with an Fronius and then everything workes flawlessly since easter.

dalathegreat commented 6 months ago

Ok! Closing this issue for now then. Glad you got a working setup now! 🥳