Hi.
I am trying to "migrate" my PV and energy usage monitoring from WebSolarLog to Domotics.
I have created device in Domoticz, reading-out and displaying the data frm the P1 port of my ISKRA ME382 smart meter. This works great.
After that followed
https://www.domoticz.com/wiki/Omnik_Solar_Inverter to get all the values of my Omnik inverter into Domoticz. This also works great.
Then I followed your instructions on
http://www.domoticz.com/wiki/Upload_ene ... o_PVoutput to get all this data into PVoutput.
Sadly no data is being send to PVoutput.
Debugging the lua time script I found:
2015-11-28 17:14:53.845 (ISKRA ME382) P1 Smart Meter (ISKRA ME382 Electricity)
2015-11-28 17:15:03.290 LUA: Time to go before upload to PVoutput: 5 minutes
2015-11-28 17:15:03.290 LUA: ---- The total generated energy is 3860.0 Wh
2015-11-28 17:15:03.290 LUA: ---- The current generated power is 0 W
2015-11-28 17:15:03.290 LUA: ---- The voltage of the inverter is 234.9 V
2015-11-28 17:15:03.291 LUA: ---- The outside temperature is 21.3 C.
2015-11-28 17:15:03.291 LUA: ---- The total consumed energy is -20044 Wh
2015-11-28 17:15:03.291 LUA: ---- The current consumed power is 140 W
2015-11-28 17:15:03.774 LUA: -- Bad request 400: Invalid energy value [-20044]
2015-11-28 17:15:03.776 LUA: -- Energy generation (v1) = 3860.0 Wh
2015-11-28 17:15:03.776 LUA: -- Power generation (v2) = 0 W
2015-11-28 17:15:03.776 LUA: -- Energy consumption (v3) = -20044 Wh
2015-11-28 17:15:03.777 LUA: -- Power consumption (v4) = 140 W
2015-11-28 17:15:03.779 LUA: -- Current temperature (v5) = 21.3 C
2015-11-28 17:15:03.779 LUA: -- Voltage (v6) = 234.9V
2015-11-28 17:15:03.779 LUA: -- Cumulative Flag (c1) = 1
Debugging the lua device script (This was after sundown) showed me:
2015-11-28 17:51:44.273 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_calculate_consumption.lua
2015-11-28 17:51:44.109 (ISKRA ME382) P1 Smart Meter (ISKRA ME382 Electricity)
2015-11-28 17:51:44.400 LUA: ----- PowerGeneration = 0 W
2015-11-28 17:51:44.400 LUA: ----- EnergyGeneration = 3860.0 Wh
2015-11-28 17:51:44.400 LUA: ----- PowerImport = 210 W
2015-11-28 17:51:44.401 LUA: ----- EnergyImportLow = 2530541 Wh
2015-11-28 17:51:44.401 LUA: ----- EnergyImportHigh = 1572032 Wh
2015-11-28 17:51:44.401 LUA: ----- EnergyImport = 4102573 Wh
2015-11-28 17:51:44.401 LUA: ----- PowerExport = 0 W
2015-11-28 17:51:44.402 LUA: ----- EnergyExportLow = 1222662 Wh
2015-11-28 17:51:44.402 LUA: ----- EnergyExportHigh = 2903686 Wh
2015-11-28 17:51:44.402 LUA: ----- EnergyExport = 4126348 Wh
2015-11-28 17:51:44.402 LUA: ----- PowerConsumption = 210 W
2015-11-28 17:51:44.403 LUA: ----- EnergyConsumption = -19915 Wh
The problem is that the virtual device for the consumption, besides showing the current consumption correctly (I think), is also showing a negative cumulative energy consumption value.
I guess the script is querying the wrong value from my PV Production device in Domoticz: not the current production level, but one of the cumulative ones (either the total- or the daily production).
How can this be fixed?
thanks in advance,
Peter