Code: Select all
return {
active = true,
on = {
devices = {
'StueNord_bevegelse' -- Motion sensor
}
},
execute = function(domoticz, device)
if (detector.state == 'Motion' and domoticz.security ~= domoticz.SECURITY_DISARMED) then
-- o dear
-- domoticz.setScene('intruder alert', 'On')
domoticz.devices('Roykvarsler').switchOn() -- My KD101 Smoke Alert sensor
-- send notification
domoticz.notify('Security breach', '',
domoticz.PRIORITY_EMERGENCY,
domoticz.SOUND_SIREN)
end
end
}2018-09-10 12:55:02.367 Status: dzVents: Error (2.4.6): Method switchOn is not available for device "Roykvarsler" (deviceType=Security, deviceSubType=KD101 smoke detector). If you believe this is not correct, please report.