Calculate the Amps of a group
Posted: Friday 01 January 2021 20:08
Hello to you all.
I'm having some difficulties on the following sctipt.
I would like to calculate the amperage on group L1 but I get the following error message:
I'm having some difficulties on the following sctipt.
Code: Select all
return {
on = { timer = { "every 1 minutes" }}, -- Change to your liking to 1,2,3,4,5,6,10,12,15 or 20
logging =
{
level = domoticz.LOG_DEBUG, -- Change to LOG_DEBUG to debug / Change to LOG_ERROR if script is running properly
marker = scriptVar,
},
execute = function(dz, item)
local StroomOpname = dz.devices(2524)
local VermogenL1 = dz.devices(423)
local VoltageL1 = dz.devices(422)
local Predicted_Maxrange = ((VermogenL1 / VoltageL1))
domoticz.log('--- Stroom opnamee------------------')
domoticz.log(StroomOpname)
domoticz.log('----------------------')
end
}
- 2021-01-01 20:07:00.552 Status: dzVents: Info: ------ Start internal script: Script #1:, trigger: "every 1 minutes"
2021-01-01 20:07:00.571 Status: dzVents: Debug: Processing device-adapter for Stroom L1: 1-phase Ampere device adapter
2021-01-01 20:07:00.572 Status: dzVents: Debug: Processing device-adapter for Electriciteits verbruik L1: Electric usage device adapter
2021-01-01 20:07:00.574 Status: dzVents: Debug: Processing device-adapter for Voltage: Voltage device adapter
2021-01-01 20:07:00.574 Status: dzVents: Info: ------ Finished Script #1
2021-01-01 20:07:00.574 Error: dzVents: Error: (3.0.2) An error occurred when calling event handler Script #1
2021-01-01 20:07:00.574 Error: dzVents: Error: (3.0.2) ...domoticz/scripts/dzVents/generated_scripts/Script #1.lua:17: attempt to perform arithmetic on a table value (local 'VermogenL1')