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)