error with dzventz script
Posted: Sunday 23 June 2019 14:06
Hi,
Running latest (from source) domoticz version 4.10926 and have a script that works with a rfxcom device.
The script is this
The error I get is only when I turn the switch off. With turining ON there is no issue at all. The light goes off and on as expected but there is this error :
What can be the cause of this error?
Running latest (from source) domoticz version 4.10926 and have a script that works with a rfxcom device.
The script is this
Code: Select all
return {
active = true,
on = {
devices = {
'KaKu-GangBgg'
}
},
logging = {
level = domoticz.LOG_INFO, --log level can be domoticz.LOG_INFO, domoticz.LOG_MODULE_EXEC_INFO, domoticz.LOG_DEBUG or domoticz.LOG_ERROR
marker = "KaKu-GangBgg" --info to see what device did what in the log
},
execute = function(domoticz, device)
if (device.name == 'KaKu-GangBgg' and device.state == 'On') then
domoticz.devices('DIM-GangkastR-Boven').dimTo(25)
domoticz.devices('DIM-GangkastG-Onder').dimTo(25)
domoticz.devices('Gangkast').switchSelector(20) end
if (device.name == 'KaKu-GangBgg' and device.state == 'Off') then
domoticz.devices('DIM-GangkastR-Boven').dimTo(0)
domoticz.devices('DIM-GangkastG-Onder').dimTo(0)
domoticz.devices('Gangkast').switchSelector(Off) end
end
}
Code: Select all
2019-06-23 14:04:38.347 Error: dzVents: Error: (2.4.23) KaKu-GangBgg: An error occurred when calling event handler 2-Gang-KakuTrap
2019-06-23 14:04:38.347 Error: dzVents: Error: (2.4.23) KaKu-GangBgg: ...moticz/dzVents/runtime/device-adapters/switch_device.lua:118: attempt to perform arithmetic on local 'val' (a nil value)