I update the script with my idx numbers but receive this error in the log:
Code: Select all
2022-10-08 23:20:17.564 Error: dzVents: Error: (3.0.2) Method updateElectricity is not available for device "kWh Meter Pool Total" (deviceType=Usage, deviceSubType=Electric). If you believe this is not correct, please report.
This is the script I've changed in the Webeditor
Code: Select all
return {
on = {
timer = { 'every 5 minutes' }
},
execute = function(domoticz, item)
local ppPower = domoticz.devices(641) -- pool pump power meter
local plPower = domoticz.devices(659) -- pool light power meter
local paPower = domoticz.devices(647) -- pool air pump power meter
local puPower = domoticz.devices(653) -- pool UV power meter
local totalPower = domoticz.devices(661) -- total pool power meter
totalPower.updateElectricity(
ppPower.WhActual + plPower.WhActual + paPower.WhActual + puPower.WhActual,
ppPower.WhTotal + plPower.WhTotal + paPower.WhTotal + puPower.WhTotal
)
end
}