After one day of monitoring the changes indeed worked.
Prior to the changes DESS was working great as all 3 phases were balancing perfectly, but all reports were completely off as all negative phases were treated as “sent to grid” and compensated phases were treated as “from grid” … which simply is wrong from a price point here in Austria.
Example of wrong report:
Example of now correct report:
What did I do… basically - as described above - refresh rate and so on does not matter. The only thing that VRM is looking at are following parameters from your grid meter (at least what I have found out)
- /Ac/Energy/Forward
- /Ac/Energy/Reverse
- /Ac/Power
The trick is… the different meters simply report different values in those fields. For example… the EM540 reports the net metering data in those fields (Import-Export=Net for /Ac/Energy/Forward). Other meters which are meant for other countries do report non metered data.. same is true for the shelly integration.
Because I am working with dbus-shellyPlug (higher refresh rate then webhooks and modbus-tcp is not working in my version) - I adapted it.
Look for following part:
if self.settings['/Role'] == 'evcharger':
self._dbusservice['shelly']['/Ac/Energy/ForwardTotal'] = None if shellyData is None else sumEnergy
self._dbusservice['shelly']['/Current'] = None if shellyData is None else sumCurrentAC
else:
self._dbusservice['shelly']['/Ac/Energy/Forward'] = None if shellyData is None else sumEnergy
self._dbusservice['shelly']['/Ac/Power'] = None if shellyData is None else sumPowerAC
self._dbusservice['shelly']['/Ac/Current'] = None if shellyData is None else sumCurrentAC
self._dbusservice['shelly']['/Ac/Energy/Reverse'] = None if shellyData is None else sumEnergyReverse
And change it to following:
net_energy = sumEnergy - (sumEnergyReverse or 0)
net_power = sumPowerAC # already net (positive = import, negative = export)
if self.settings['/Role'] == 'evcharger':
self._dbusservice['shelly']['/Ac/Energy/ForwardTotal'] = None if shellyData is None else sumEnergy
self._dbusservice['shelly']['/Current'] = None if shellyData is None else sumCurrentAC
else:
self._dbusservice['shelly']['/Ac/Energy/Forward'] = None if shellyData is None else net_energy
self._dbusservice['shelly']['/Ac/Power'] = None if shellyData is None else net_power
self._dbusservice['shelly']['/Ac/Current'] = None if shellyData is None else sumCurrentAC
self._dbusservice['shelly']['/Ac/Energy/Reverse'] = None if shellyData is None else 0 # optional: freeze at current value
This is not a perfect solution as I basically ignore all feed back power, but this is way more accurate as the solution without the changes.
If this helped you in your problem please just leave a short note. Thanks.
Edit: I just found another article in the Q&A that describes it well.. even though I was searching for almost 2 weeks.. I didn’t see this one. 10. FAQ

