Hi, and welcome to the OpenEMS Community!
The error comes from the assumption, that energy values in OpenEMS are per definition steadily increasing, i.e. Value(t + 1) >= Value(t). This applies e.g. to consumed energy in [Wh_Σ]. To calculate the ‘discrete’ consumed energy in [Wh] for a certain period, the first cumulated value is subtracted from the last cumulated value. If the result is negative - which is not allowed per definition - the warning “Got negative energy value” appears. (see openems/io.openems.common/src/io/openems/common/channel/Unit.java at develop · OpenEMS/openems · GitHub)
To make sure that the value is actually steadily increasing is the task of the OpenEMS Component. For some physical devices these values are available via API (e.g. via Modbus), for others OpenEMS is calculating them manually from Power.
So in order to answer the question, I would need to know which actual Components you have configured.
Thanks and regards,
Stefan