General Production Approach

Hello everyone.

My name is Angel and I’ve recently begun the process of setting up the OpenEMS system for a client. Their goal is to develop a configurable system that helps residential and commercial customers with energy management systems to optimize their solutions. OpenEMS looks like a perfect fit.

I am beginning to better understand the OpenEMS framework after lots of reading through the docs and this forum. As we say here in the US, “the fog is lifting” on my understanding of OpenEMS Edge, Backend, and UI. I still have a ways to go but I am overall fairly confident in my approach.

To be sure, though, I wouldn’t mind getting some feedback on my end-to-end process for eventually handing the system over to my client. Here are the steps I’ve taken so far:

  • Read the documentation on OpenEMS Ready
  • Read the docs
  • Join the forum
  • Read the docs
  • Install and deploy OpenEMS Edge on an edge device
  • Configure and run the Edge simulations using Apache Felix
  • Read through the forum
  • Read through existing inverter controller code such as GoodWe to better understand implementations using Modbus
  • Fork OpenEMS GitHub repository

My question is what is the best approach for what’s next? Maybe something like this:

  • Copy and modify existing implementation of devices/controller closest to new client device (after checking licensing requirements)
  • Remap any Modbus register read/writes in the code for the new device
  • Install and deploy OpenEMS Backend on a server and connect with Edge device
  • Figure out user authentication (i.e. user, installers, admin…) using Odoo or some other method.?.?
  • Test code changes with new hardware and confirm Modbus communication via TCP and/or RTUS
  • Configure OpenEMS UI to work with Backend
  • Modify OpenEMS UI layout, colors, formatting… (after checking licensing requirements)
  • Create Pull request from fork (assuming client’s approval)

That’s probably not a complete list but I am hoping that anyone that’s already been through a production deployment might see any glaring issues with the approach and provide some feedback.

Thanks for taking the time.

Hi @acabrera,

that reads like a very well thought of checklist for any newcomer. Thanks! :+1:

In IoT you can choose between hundreds of different system architectures and frameworks. In that regard OpenEMS is not restrictive, but opinionated in that we (as FENECON) use a certain stack in production and I would recommend everybody to start-off as closely as possible to this stack. (e.g. use Odoo as a Backend storage/authentication service even though you are not (yet) using it as an ERP system).

Then it depends on what your Minimum Viable Product is. You should try to build it from existing components as much as possible and reduce actual new implementation to a minimum. E.g. if your use-case is to start with a Energy Monitoring solution, use a Rasperry Pi with an SDM630 meter and run it productively.

If you want to get your hands dirty and have a quick success, buy and implement some Modbus meter.

Regards,
Stefan

1 Like

Thank you, Stefan. It is great news that I am on the right track.

I now have access to a Deye Hybrid SUN-10K-SG01HP3-EU-AM2 inverter (includes a 8 kWh battery). I am now connected to it from a Raspberry Pi 5 using a serial cable for Modbus RS485 and I can get values from the inverter’s registers using Python. I have already used the OpenEMS Edge Modbus simulators with success but now need to begin the process of defining the Modbus registers for this device within OpenEMS.

I want to take your advice on getting my hands dirty but not defeat the purpose of OpenEMS and its existing tools and code.

This Deye inverter may or may not be Sunspec certified but, either way, what would you recommend for my next step?

You should have finished the “Implementing a device” tutorial so you know how to add a new OpenEMS Component:

https://openems.github.io/openems.io/openems/latest/edge/implement.html

If I were you I would connect directly from my Laptop to the inverter using a USB-to-RS485 converter. This way you can directly test OpenEMS Edge in Eclipse IDE and get a good understanding of the things going on - e.g. by setting break-points in the IDE.

For a start I would copy a simple implementation of a ManagedSymmetricEss, e.g. “Ess.Fenecon.Commercial40” → https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.ess.fenecon.commercial40/src/io/openems/edge/ess/fenecon/commercial40/EssFeneconCommercial40Impl.java

The most important methods are:

  • defineModbusProtocol() and
  • applyPower(int activePower, int reactivePower)

Then

  • start OpenEMS Edge,
  • configure your new Component
  • configure Scheduler and DebugLog-Controller
  • configure a Fix-ActivePower-Controller
    and your inverter should start charging or discharging. Finished :slight_smile:

Excellent! I will run with your advice. Thanks for the guidance.

By the Way:

It would be GREAT if you would publish your Code for the Deye Inverter on GitHub ! :slight_smile:

Greetings

2 Likes

Totally my intention but will let client make final decision. :slightly_smiling_face:

1 Like

@acabrera Have you managed to implement the DEYE Hybrid Inverter? If so could you please provide the code. I´m also trying to implement the device.

I love it when people first Register and ask for the Code :smiley:

Lets first help him testing it on his own Device and setting it up to work properly :slight_smile:
Greetings !

My intention is to publish the code but certainly not before it is stable, working as expected, and client agrees it is ready for release.

Thanks for everyone’s support and guidance.

2 Likes

Okay thanks for the reply. I will also try to implement it. I already managed to get the active Power.
@Sn0w3y I just want to cooperate, maybe we are faster when we both work on the DEYE implementation :smiley:

2 Likes