Graph+ issue from hourly to daily - import/export limitations explained

Now I see what’s going on. This is an ongoing issue. There is a solution, but bear with me. (I really should explain this in the documentation).

When you allow negative values, IoTaWatt measures net usage on a CT. That not only applies to the 5 second intervals in the datalog, but due to the way that the datalog and query works, it applies to any interval that you examine.

When you apply the script electricity_grid max 0 to an interval, the result is the net positive usage during that interval. That’s not necessarily what you imported, it’s what you imported minus what you exported during that interval. After a day where you imported 10kWh and exported 12kWh, the net would be -2kWh and script would evaluate to zero. On the other hand, if the interval is an hour, some of those 24 hourly periods would have positive net usage, as in your first hourly graph, and would show import. That’s what is happening in your case.

If you want to get true import, you must integrate smaller intervals. Unfortunately the IoTaWatt doesn’t have the horsepower to do ad-hoc integrations with reasonable response times. It does have the ability to determine import and export for each 5 second interval. The problem is that there is no extra space in the datalog to save that detail. There is a technique that you can use that essentially sacrifices an input to get space to save the data. It’s a little convoluted, but works fine. It’s explained here.

The referenced method uses a redundant CT on the main. That should not be necessary. There is a way to get around that and if you decide to do it, and tell me which input would be used, I can tell you how to edit your config file to cause the IoTaWatt to use the same CT for two inputs. On the other hand, if you have another CT, that would be fine.

Another solution is to upload the data to any of the supported databases and get your import/export from there. You can import and export outputs work fine at 5 second resolution and having an external database sum them would be easy.