What’s the exact problem?
If I understand it correctly:
- you are setting channel values on component
ess0. - State-of-Charge (
SOC) is coming from JSON as"BtSoc":51and result in51 %foress0/Soc - Active Power (
ACTIVE_POWER) is coming from JSON as"GridPw":0.04; you convertkWtoWby multiplying with1000, resulting in40 Wforess0/ActivePower - You configured only
ess0, there is no meter.
Consumption is calculated using this formula: (-> https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.core/src/io/openems/edge/core/sum/SumImpl.java#L359-L360)
this._setConsumptionActivePower(TypeUtils.sum(essActivePowerSum, gridActivePowerSum, productionAcActivePowerSum));
essActivePowerSumis40gridActivePowerSumisnull(because there is no grid meter configured)productionAcActivePowerSumisnull(because there is no production meter configured)
TypeUtils.sum() calculates 40 + null + null as 40
As a result 40 is then set as _sum/ConsumptionActivePower.
Ok?
Regards,
Stefan