Modbus-issue: Implement SUN2000 and Grid meter

Dear all,

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.

Do you any suggestions how to proceed?

Best regards
Dominik

Good morning Dominik,

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):

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.

Regards
Klinki

Dear @domg, welcome to the OpenEMS Community!

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)
  • battery inverter (the setup used in FENECON Home)
  • off-grid consumption meter

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