Hi Derik,
I have studied the output of the P1 smart meter for some time in order to understand it and to create a script to parse the 6 values from the P1 sensor.
Your receive 6 values from your P1. Usage1 (low); Usage2 (high); Return1 (low); Return2 (high) These are Energy counters in kWh. You can compare these values on your smartmeter display. Last 2 values are the actual usage (W) or the actual delivery (W)
The delivery and the returns are measured at your P1 smart meter. Your solar panels may produce more energy and some of that energy is used in your house at that moment. Therefor it is not measured at the meter. At my home, my solarpanels producer 40% more then what is measured at the meter. In order to know the exact production of your so. larpanels you have to measure this at your inverter.
Your sensor D.M. P1: Stroom shows 5 values. Top bar the actual usage (+) or the actual delivery (-)
The second line the sum of usage1 and usage2 in 1 figure followed by the today usage.
The third line shows the sum of return1 and return 2 in 1 figure followed by today delivery.
To my amazement, the order of the figures on my sensor are different compared to your sensor. On the second line is today usage and total usage and the third also today delevery an total delivery. My hardware is "P1 smart meter USB" See picture below and compare it to yours.

I hope this information helps you bit with your question. You can find my dzVents script in the code. Perhaps this helps you also.
Code: Select all
--[[ dzVents script to Parse P1 Smart Meter Electricity value into seperated Meter Readings.
]]-- The following need updated for your environment get the 'Idx' or 'Name' of the Device tab.
local fetchIntervalMins = 1 -- (Integer) (Minutes, Range 5-60) How often SE file is fetched
local P1data = 33 -- Electra, P1 Smart Meter device
local idxu1 = 42 -- Meter Usage low, Virtual device, counter incremental
local idxu2 = 43 -- Meter Usage High, Virtual device, counter incremental
local idxr1 = 44 -- Meter Return Low, Virtual device, counter incremental
local idxr2 = 45 -- Meter Return High, Virtual device, counter incremental
local idxcons = 74 -- Meter Actual Usage, Virtual device, counter incremental
local idxprod = 75 -- Meter Actual Production, Virtual device, counter incremental
local ScriptVersion = '0.1.6'
return {
active = true,
logging = {
-- level = domoticz.LOG_DEBUG, -- Uncomment this line to override the dzVents global logging setting
marker = 'SME '.. ScriptVersion
},
on = {
devices = { P1data }
},
execute = function(domoticz, triggerItem)
if (triggerItem.isDevice) then
-- Get values from device P1Data of the Smart Meter
local SMdata = domoticz.devices(P1data).rawData
-- Update the device and Debug meassages with the accessory values from table SMdata
domoticz.devices(idxu1).updateCounter(SMdata[1])
domoticz.log('Gebruik laag = '.. SMdata[1], domoticz.LOG_DEBUG)
domoticz.devices(idxu2).updateCounter(SMdata[2])
domoticz.log('Gebruik hoog = '.. SMdata[2], domoticz.LOG_DEBUG)
domoticz.devices(idxr1).updateCounter(SMdata[3])
domoticz.log('Levering laag = '.. SMdata[3], domoticz.LOG_DEBUG)
domoticz.devices(idxr2).updateCounter(SMdata[4])
domoticz.log('Levering hoog = '.. SMdata[4], domoticz.LOG_DEBUG)
domoticz.devices(idxcons).updateCounter(SMdata[5])
domoticz.log('Actuele Gebruik = '.. SMdata[5], domoticz.LOG_DEBUG)
domoticz.devices(idxprod).updateCounter(SMdata[6])
domoticz.log('Actuele Levering = '.. SMdata[6], domoticz.LOG_DEBUG)
end
end -- execute
}
Succes