High voltage hybrid inverter (GW6000-EH) with EV battery (Chevy Volt)

bikefish

New member
Joined
Feb 3, 2021
Messages
6
Thanks for your reply @yasko .
As I understood, with the Modbus registers you can control how much you want to charge or discharge?
Do you've experience with that?
Or someone else?
 

apr

New member
Joined
Apr 11, 2021
Messages
16
@apr, If I understand, correctly this is a communication between the Goodwe inverter and its smart meter?
I'm making a map of the Modbus registers of the inverter and will include that info too. Thanks for sharing.
Another interesting finding is the time between messages. It looks that the power control loop works at 5Hz.

Yes, that's correct.


Another update for the community is that i already have the CAN communication between my HV battery and the goodwe inverter and it seems that the inverter is happy, i can see the parameters i send on the Goodwe APP so congrats to @yasko for his great work and documentation sharing. It cannot be made any simpler.

You don't know the CAN id for the name of the battery? that would be really cool.
 

yasko

Member
Joined
Nov 10, 2017
Messages
67
@bikefish, There is full control over the inverter via Modbus, and I think it can do a lot of things than available in the app. I'm still checking and will do some experiments soon.

@apr, I'm glad to hear that your system is working well. I'm curious about your setup if you can share this.
Sorry, but I don't know the CAN id for the battery name and unsure whether it's possible to change it.
 

apr

New member
Joined
Apr 11, 2021
Messages
16
@apr, I'm glad to hear that your system is working well. I'm curious about your setup if you can share this.
Sorry, but I don't know the CAN id for the battery name and unsure whether it's possible to change it.
My system is not yet working, i still have lots to do before going live.

The HV battery is a 14 modules, 6-cell VW pack, ~17kwh total. The bms is the original from the pack, CAN@500kbps, however no balancing features since no one knows how to activate it though CAN. The individual cells keep their values quite well so for now no balancing is needed, just monitoring. The controller is work in progress, right now using different esp32 boards with CAN and RS485 and connecting them through MQTT for quick mockup. The goal should be a standalone olimex EVB board with a second CAN interface added on top.
 

apr

New member
Joined
Apr 11, 2021
Messages
16
Hi, i'm very happy to say that the inverter is working with my HV battery, enabled by the CANmessages @yasko decoded and shared!


However for my particular case, i'm not ready to connect the solar panels yet, there is another grid tie MPPT harvesting solar and injecting on the grid. this means that the inverter is only injecting the necessary energy to cover the house consumption. And it does a good job, here's the utility energy usage (taken from the goodwe grid meter):

1618736508967.png

It's very likely that inside that red window i was tweaking stuff so the result may be better.



I need a way to charge the battery on demand from the grid and from the goodwe, so i can finally disconnect the charger and raise the voltage from 120V to 320V. I believe there's not much to do left on the app settings to achieve this, so....

@bikefish, There is full control over the inverter via Modbus, and I think it can do a lot of things than available in the app. I'm still checking and will do some experiments soon.

you want help? :):)
 

yasko

Member
Joined
Nov 10, 2017
Messages
67
@apr, The Modbus control of the inverter is something that I want to try, so count on me :)
I'm at the beginning of this, and my first attempt was to read power data from the inverter. I wrote a small program that reads data and imports it to the InfuxDB database. Here is the result in the Grafana visualization:

powers1.png
I will share more details about the Modbus communication in the next few days.
Regarding on-demand battery charging - did you check the "Economical mode" from the app?
 

bigmotherwhale

New member
Joined
Apr 16, 2021
Messages
5
Awesome work , I have been looking for a suitable HV inverter for use with a simpBMS, I was looking at the solax but now considering this too. Can anyone test to see if this inverter can be run at 500kbps with the same protocol? The outlander pack I have runs at this speed and the simpBMS only has one CAN channel.
 

apr

New member
Joined
Apr 11, 2021
Messages
16
Regarding on-demand battery charging - did you check the "Economical mode" from the app?

Not sure that fits the purpose, seems rather limited, you can define periods of charge and discharge, and a power as a % of rated power. I tried once, didn't work and forgot about it.

I got a modbus doc on the net and the only write registers are these:
1618839012428.png


Can you check if you can find any register that enable the inverter to charge on demand?

Eventually i will have the MPPT connected, but this is kind of important because i'd like to charge the battery from the grid.


Thanks!
 
Last edited:

bigmotherwhale

New member
Joined
Apr 16, 2021
Messages
5
I would be good if you can find a way of enabling charge on demand through Modbus, there is a tariff local to me in the UK that uses an API to send next days electricity pricing every evening and sometimes its negative, it should be possible to program something that reads this and decided what hours to enable charging.
 

yasko

Member
Joined
Nov 10, 2017
Messages
67
@bigmotherwhale, I think that CAN-BUS speed is fixed for every battery type and cannot be changed. You mentioned a Solax inverter, and just a week ago, our forum member @Araknid uploaded a CAN protocol between the inverter and its battery in this thread. That opens the way for custom HV batteries with Solax inverters.
@apr The Modbus description above doesn't match what I've found so far. I think that is for some old models. BTW, what is your inverter model?

Now about Modbus protocol for Goodwe HV hybrid inverters. The location of the RS-485 port is behind the cap. It's an RJ-45 connector, so an ethernet cable works fine, but it has to be crimped after passing the hole. (I've already had to cut one :) )

rs-485.jpg

Here is my new hacking box with Raspberry Pi 4, USB->RS-485 converter, and power supply:

rs-box.jpg

The communication parameters are 9600bps, 8N1. For the RS-485 tests, I can recommend this Python library - minimalmodbus. Here is a good source for a basic Modbus description.
I've prepared a repository with my current logging software. It's based on libmodbus library and written in C (Sorry, I'm an embedded guy :)). I also added a preliminary Modbus register map for some read-only registers. The registers that control the inverter start with 4xxxx, but more on that later.
 

bikefish

New member
Joined
Feb 3, 2021
Messages
6
Hi @yasko thanks for sharing your Modbus insights.

I've found the scale factor for temperatures are 0.1°C.

You are using Modbus RTU (RS485). Is Modbus TCP also working with the same registers?
 

yasko

Member
Joined
Nov 10, 2017
Messages
67
@apr, nice, so there are already two GW6000-EH inverters in this thread :) I'm curious what is your firmware version?

@bikefish, I think Modbus TCP uses the same registers, but you need additional hardware according to this document. This module adds an ethernet port instead of a Wi-Fi module. Indeed the PV Master app uses the same registers set and MODBUS-RTU for communication, but in a slightly different format:
Code:
request: f7 03 b7 98 00 01 36 c7
answer: aa 55 f7 03 02 00 00 70 51
That is an example of data from the serial line between the inverter and Wi-Fi module.

Now the results from some tests with "Economical mode." I've set two periods: charge from 23:00 - 07:00 and discharge for the rest of the time.
  • During the first period, the inverter charges the battery from the grid according to the preset power level.
  • During the discharge time, the inverter uses power first from PV and then from the battery to supply loads. I can say that it zeroes well grid consumption. But in this mode, the inverter doesn't use PV power for battery charging.
Back to Modbus communication, my primary source of information is the OpenEMS project. I've found a partial description of Modbus registers in the files from this folder. They use some Java implementation to control the inverter (Goodwe ET/BT series) as symmetric ESS unit. That is very similar to what we are trying to achieve here.
 

apr

New member
Joined
Apr 11, 2021
Messages
16
My fw version is 030313.

I am also exploring the economical mode but I'm not able to charge the battery I don't know why.

I've set a period of right now +1h -1h and the battery displays as being in "spare" mode

Any idea why? Do I have to enable charging in the can communication?
 

Attachments

  • IMG_20210420_224918.jpg
    IMG_20210420_224918.jpg
    122.9 KB · Views: 28
  • IMG_20210420_225146.jpg
    IMG_20210420_225146.jpg
    79.4 KB · Views: 29

yasko

Member
Joined
Nov 10, 2017
Messages
67
@apr, your battery settings look OK. Can you check the "Diagnose Message" from the app?

If you have a Modbus communication with the inverter, you can check some registers regarding the battery state. I've found the following relations between the content of these registers and the CAN frames for the default battery.

modbus1.png
The bit functions for register 47915, which controls charging/discharging.
  • bit 0 - request forced charging
  • bit 1 - stop charging
  • bit 2 - stop discharging
I'm not sure how the frame 0x460 translates to register 47915. Now I'm sending two zero bytes in that frame.
 

apr

New member
Joined
Apr 11, 2021
Messages
16
Unfortunately the diagnose messages are not from that period, i can test again later today. I also send 0x00 0x000 on canID 0x460.

what is your firmware version?
 

yasko

Member
Joined
Nov 10, 2017
Messages
67
@apr, my firmware version is the same 030313.
I've decided to check how the app communicates with the inverter and found that it uses UDP protocol at port 8899. It sends a MODBUS -RTU message over UDP, and the inverter replies in the same way. So that is another way to talk to the inverter.
This project uses UDP communication and allows the integration of GoodWe inverters into a home assistant.
 

apr

New member
Joined
Apr 11, 2021
Messages
16
So the firmware of our inverters match, but I cannot charge. I am going to route the pv panels to this inverter and convert the battery to 300V and check if the system works.

The UDP mbus is great, I believe that with some simple node-red flows it will be possible to easily expose all these registers to emoncms/grafana and more.
 

yasko

Member
Joined
Nov 10, 2017
Messages
67
A quick update from the last days:
Communication via UDP port works well, but the inverter adds a two-byte header - 0xAA, 0x55 to the reply message.
I've done some research regarding the power control of the inverter, and it's possible to control it in real-time. So, the inverter can be used as part of an energy management system (EMS). What I've found so far - there is a set of registers:
Code:
FEED_POWER_ENABLE - 47509
FEED_POWER_PARA - 47510
EMS_POWER_MODE - 47511
EMS_POWER_SET-  47512
The first enables/disables power feeding to the grid, and the second sets the power limits. The third sets EMS mode according to this description:
Code:
    UNDEFINED(-1, "Undefined"), //
    STOPPED(255, "Stop connection to grid and turn to wait mode"), //
    AUTO(1, "Self-Use mode, Smart Meter Com. Normal, and battery power is controlled based on Meter power"), //
    CHARGE_PV(2, "Charge Mode"), //
    DISCHARGE_PV(3, "Discharge Mode "), //
    IMPORT_AC(4, "Import Mode means buying power from grid"), //
    EXPORT_AC(5, "Export Mode means power export to grid,"), //
    CONSERVE(6, "Back-Up Mode"), //
    OFF_GRID(7, "cut off from grid connection and turns to off-grid mode "), //
    BATTERY_STANDBY(8, "Battery Standby Mode "), //
    BUY_POWER(9, "Buying Mode"), //
    SELL_POWER(10, "Selling Mode"), //
    CHARGE_BAT(11, "Charge Mode"), //
    DISCHARGE_BAT(12, "DisCharging Mode"); //
The last register sets the amount of power generated/received by the inverter.
I don't have a detailed description of these modes, so I need to do more testing. Also, I've updated the Modbus register map on GitHub.
 

apr

New member
Joined
Apr 11, 2021
Messages
16
So the firmware of our inverters match, but I cannot charge.

I messed up one CAN message, with the max allowed charge voltage. Now my goodwe is charging and discharging. The charging happens because i've routed one of the PV string to the inverter.

@yasko great findings on the modbus, as soon as i finish the hardware modifications i'll be exploring that part too.
 
Top