Implement a new Device to Backend

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":51 and result in 51 % for ess0/Soc
  • Active Power (ACTIVE_POWER) is coming from JSON as "GridPw":0.04; you convert kW to W by multiplying with 1000, resulting in 40 W for ess0/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));

  • essActivePowerSum is 40
  • gridActivePowerSum is null (because there is no grid meter configured)
  • productionAcActivePowerSum is null (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

1 Like