Yesterday i installed my second inverter with a couple of panels.
Now i'm trying to add the numbers up to a total. Feel i'm getting close, but not working yet.
Log says:return
{
on =
{
timer = {
'every minute'
}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'Totaal Zonnepanelen',
},
execute = function(domoticz, device, item)
-- targetDevice = domoticz.devices(647) -- define as virtual custom sensor
local SolarEdge = domoticz.devices(9).counterToday
local Goodwe = domoticz.devices(632).counterToday
local Total = SolarEdge + Goodwe
domoticz.log('Totaalopbrengst Zonnepanelen counterToday: ' .. Total)
-- targetDevice.updateCustomSensor(Total)
domoticz.devices(647).updateCustomSensor(Total)
end
}
also tried a generic counter, but same error:2023-03-05 11:59:00.186 Status: dzVents: Info: Totaal Zonnepanelen: ------ Start internal script: Script #2:, trigger: "every minute"
2023-03-05 11:59:00.187 Status: dzVents: Debug: Totaal Zonnepanelen: Processing device-adapter for kWh Meter Inverter 1: kWh device adapter
2023-03-05 11:59:00.188 Status: dzVents: Debug: Totaal Zonnepanelen: Processing device-adapter for Goodwe zonnepanelen - Inverter output power (SN: 51000SSX22BW0018): kWh device adapter
2023-03-05 11:59:00.189 Status: dzVents: Info: Totaal Zonnepanelen: Totaalopbrengst Zonnepanelen counterToday: 3.4
2023-03-05 11:59:00.190 Status: dzVents: Debug: Totaal Zonnepanelen: Processing device-adapter for Totaal opbrengst: kWh device adapter
2023-03-05 11:59:00.190 Status: dzVents: Info: Totaal Zonnepanelen: ------ Finished Script #2
2023-03-05 11:59:00.190 Error: dzVents: Error: (3.1.8) Totaal Zonnepanelen: Method updateCustomSensor is not available for device "Totaal opbrengst" (deviceType=General, deviceSubType=kWh). If you believe this is not correct, please report.
Can you not write values to a kWh custom device2023-03-05 12:02:00.285 Error: dzVents: Error: (3.1.8) Totaal Zonnepanelen: Method updateCustomSensor is not available for device "Totaal opbrengst" (deviceType=General, deviceSubType=kWh). If you believe this is not correct, please report.
2023-03-05 12:02:00.286 Error: dzVents: Error: (3.1.8) Totaal Zonnepanelen: Method updateCustomSensor is not available for device "test totaal" (deviceType=RFXMeter, deviceSubType=RFXMeter counter). If you believe this is not correct, please report.