Since the Smart Meter reports the sum of power usage and return (or delivery), you can't see what you are actually consuming.
Which is ironic, because before we got solar panels this was not a problem; we always returned zero, so the usage was equal to the actual consumption.
To see that info again, you need to combine 3 numbers (usage, delivery and solar) and show the result in Domoticz.
I used the info and script found at Virtual meter that is the sum of two other meters
, and the Domoticz Events
LUA script setup:
And this is the content of my LUA script:
Note that I made some changes to the original script.
I removed the "if (devicechanged[solarsensor]) then" construct and set the interval Trigger to Time instead. Using devicechanged only works if the value actually changes, so at night when the value is zero, you get no results. And even during the day 2 consecutive results may have the same value.
I also changed the variable names a bit, and simplified the script as much as possible.
And I changed the logic of the calculation because - for my particular setup anyway - the original was not correct.
The end result is functional, but not perfect.
The SMA inverter input only refreshes every 5 minutes, while the script queries it every minute.
This can lead to errors (like negative values for Consumption) because the script calculates the Consumption using the Smart Meter every minute.
Over the course of the day this will have only a small impact, but it does look a bit weird.
A better way would be to do the calculation using the average of the Smart Meter data over a 5 minute period, but that is not simple...
This is how it looks in Domoticz.:
Note the negative values around 14:00, surrounded by high positive values. So the "interval noise" does cancel itself out mostly, but it is not very elegant.