I try to implement the Huawei SUN2000 PV-inverter together with the grid meter (Huawei DTSU666-h) as one or more devices. At a later stage this system should be enhanced with battery (LUNA2000). The battery is out of scope now.
Background: The PV(hybrid)-inverter is going to collect ALL values internally, also from the battery and from the grid meter. They are made available via Modbus TCP.
Following challenges have come up:
If two devices in OpenEMS are implemented → Modbus failure, since only one device is reading the Modbus TCP slave and the other device is not allowed to connect to.
If this is implemented in one device → How to use ElectricityMeter as production as well as grid meter type in one component?
Remark: Since the components are not available to me now, I did only some preliminary tests with ModbusTCPslvae simulators.
I´ve had the similar issues with my solaredge setup: All data is stored in the inverter and it does not allow simultaneous modbus connections. So I have to turn off the openems service if I want to use modbus values in my IDE.
Things are getting weird as the battery was connected. It was necassary to calculate some of the values. Long story short: I had to implement the following devices in openems (all gather information from the same physical device):
DC-Charger (production from PV)
hybrid-ESS
gridmeter
It was quiet difficult to gather the right information about what is stored in the specific modbus registers.
We had several discussion regarding this (unfortunatly in german):
Since openems works in a serial/cycle style not more than one register is read at the same time. Maybe you have to experiment a bit with your cycle time.
You can take a look at my fork . Still not well documented and not yet in the official repo.
the setup of the Huawei sounds a lot like the GoodWe ET system, that we have implemented thoroughly in OpenEMS:
The OpenEMS way to implement the individual ‘natures’ of a device is to create individual Components for each of them. If you observe the GoodWe implementation, you will see, there are components for
grid meter
chargers
energy storage system (for battery inverter + battery)
Each of those components accesses the hardware via a Modbus Bridge. This makes sure, that all communication is serialized and it appears as if only one Modbus device was connected to the Huawei SUN2000.
Regards & please keep us updated. It’s an interesting hardware set!
Stefan
I know, it is quite an old thread, but i am new to openems and i would like to know how to get usually the info of the content of the modbus registers. Does the supplier document this or do you have to back engineer it?