HI Patrick, I think I am doing something wrong again, currently power is over minus 1200W
2022-09-21 10:08:05.841 ...cz/scripts/dzVents/generated_scripts/17_Test_DzVents.lua:39: unexpected symbol near '}'
2022-09-21 10:08:06.017 Error: dzVents: Error: (3.1.8) error loading module '17_Test_DzVents' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/17_Test_DzVents.lua':
2022-09-21 10:08:06.017 ...cz/scripts/dzVents/generated_scripts/17_Test_DzVents.lua:39: unexpected symbol near '}'
2022-09-21 10:08:15.835 EventSystem: Event triggered: 10_Electroboiler omvormer_1
2022-09-21 10:08:15.836 Status: boiler opwarmen
2022-09-21 10:08:15.784 Error: dzVents: Error: (3.1.8) error loading module '17_Test_DzVents' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/17_Test_DzVents.lua':
2022-09-21 10:08:15.784 ...cz/scripts/dzVents/generated_scripts/17_Test_DzVents.lua:39: unexpected symbol near '}'
2022-09-21 10:08:25.815 EventSystem: Event triggered: 10_Electroboiler omvormer_1
2022-09-21 10:08:25.816 Status: boiler opwarmen
2022-09-21 10:08:25.774 Error: dzVents: Error: (3.1.8) error loading module '17_Test_DzVents' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/17_Test_DzVents.lua':
Code: Select all
local scriptVar = '-=# TEST SCRIPT #=-'
return {
on = { timer = {'every minute'},
},
logging = { level = domoticz.LOG_ERROR,
marker = scriptVar
},
execute = function(dz, device)
local Stroom = dz.devices(97).WhActual -- Change the name to your device
local Dummy1 = dz.devices(944) -- Change the name to your device
local Dummy2 = dz.devices(945) -- Change the name to your device
dz.log('Stroom : ' .. Stroom ,dz.LOG_FORCE)
dz.log('Dummy 1 : ' .. Dummy1.state,dz.LOG_FORCE)
dz.log('Dummy 2 : ' .. Dummy2.state,dz.LOG_FORCE)
if Stroom > -500 then
Dummy1.switchOn().checkFirst()
dz.log('Dummy 1 On > 250W', dz.LOG_FORCE)
if Stroom > -1000 then
Dummy2.switchOn().checkFirst()
dz.log('Dummy 2 On > 1000W', dz.LOG_FORCE)
if Stroom < -500 then
Dummy1.switchOff().checkFirst()
dz.log('Dummy 1 Off < 250W', dz.LOG_FORCE)
if Stroom < -1000 then
Dummy2.switchOff().checkFirst()
dz.log('Dummy 2 Off < 1000W', dz.LOG_FORCE)
else
dz.log('Geen actie nodig ', dz.LOG_FORCE)
end
end
}