first commit
This commit is contained in:
25
dzVents/examples/intruder alert.lua
Normal file
25
dzVents/examples/intruder alert.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
|
||||
active = true,
|
||||
|
||||
on = {
|
||||
devices = {
|
||||
'PIR_*' -- all my motion detectors' name start with PIR_
|
||||
}
|
||||
},
|
||||
|
||||
execute = function(domoticz, detector)
|
||||
|
||||
if (detector.state == 'Motion' and domoticz.security ~= domoticz.SECURITY_DISARMED) then
|
||||
-- o dear
|
||||
|
||||
domoticz.setScene('intruder alert', 'On')
|
||||
|
||||
-- send notification
|
||||
domoticz.notify('Security breach', '',
|
||||
domoticz.PRIORITY_EMERGENCY,
|
||||
domoticz.SOUND_SIREN)
|
||||
end
|
||||
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user