Hello everyone. After successfully using OpenEMS Edge to read and write the Modbus registers of an inverter, I have a question about best-practices when it comes to giving the user the ability to modify inverter settings.
The example I will use is the Time of Use Selling screen of a hybrid inverter. It allows the user to set some battery charging characteristics using grid vs gen, time of day, power and target capacity percentage (see attached pic).
My first thought was that I could just add these parameters to the inverter device config within the OpenEMS Edge configuration area but it didn’t feel right and added too many fields to the already lengthy configuration.
My next thought was that maybe this is something to do within the eventual Odoo integration with some sort of configuration section for each edge device but I have only just started looking into the Odoo user authentication so I’m not sure if that would feel right.
So, my question is where in the OpenEMS framework would be the appropriate place to build a screen that allows an end-user or installer to modify these settings and submit that changes to the Modbus registers?
I have looked at that portion of the documentation…
I just want to make sure I am understanding the terminology here…when you say Terminal Screen do you actually mean a Terminal session within VS Code? If so, I’m not quite understanding how that would appear to an end-user.
If you are suggesting that I simply look at how the GitPod demo works to get an idea of how the UI can be modified to give the end-user a way to control their devices, I can look into that. Unfortunately, I am unable to get the GitPod demo to work for some reason but if that is how I get to the solution I need, I’ll just have to figure it out.
PRO: settings show up immediately under “Configure Component” in Settings (but generally end-users should not have access to this, so it actually does not solve your problem)
CON: as you wrote already, this adds a lot more settings. Technically this is not really a problem, though.
CON: it becomes difficult to configure and you loose any immediate type validation
Second question: How to let the user configure:
Via “Configure Component” (see not above, why this is actually not an option for you)
Via a specific OpenEMS UI widget
This is the most flexible variant, but involves writing Controller/Device specific UI code. See “FEMS App Hochlastzeitfenster” as an example for rather complex configuration:
Downside of this approach: App Center is usually used for one-time setup configuration and not configurations that change frequently.
In your case I would probably use a JSON property to store the config and write a specific UI widget that reads the input from the user and converts it to a JSON.