Today I have updated Domoticz Stable to Version 2020.1
Now I have very high readings from my devices General Counter,incremental.
I use this script for reading several readings from my P1 "slimme meter"
What to do for solve this problem?
Thanks
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 = 4 -- Electra, P1 Smart Meter device
local idxu1 = 15 -- Meter Usage low, Virtual device, counter incremental
local idxu2 = 16 -- Meter Usage High, Virtual device, counter incremental
local idxr1 = 17 -- Meter Return Low, Virtual device, counter incremental
local idxr2 = 18 -- Meter Return High, Virtual device, counter incremental
local idxcons = 19 -- Meter Actual Usage, Virtual device, counter incremental
local idxprod = 20 -- Meter Actual Production, Virtual device, counter incremental
local ScriptVersion = '0.1.5'
return {
active = true,
logging = {
-- level = domoticz.LOG_DEBUG, -- Uncomment this line to override the dzVents global logging setting
marker = 'SME '.. ScriptVersion
},
on = {
timer = { 'every minute' }
},
execute = function(domoticz, device)
-- 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 verbruik = '.. SMdata[5], domoticz.LOG_DEBUG)
domoticz.devices(idxprod).updateCounter(SMdata[6])
domoticz.log('Actuele levering = '.. SMdata[6], domoticz.LOG_DEBUG)
end -- execute
}