Thank you very much, Jos!
Just tested it and the alarm-event works now!
I) ALARM TRIGGER EVENT
1) FensterOderTuerOffen' = is a virtual device that is a parent switch of all door and window-sensors
2) 'Alarmmelder' = is a group that controls all sirens/smoke detectors
Code:
Code: Select all
commandArray = {}
if (devicechanged['FensterOderTuerOffen']) then
if (otherdevices['FensterOderTuerOffen'] == 'On') then
if (otherdevices['Domoticz Security Panel'] == 'Arm Away') then
commandArray['Group:Alarmmelder']='On FOR 60'
print('Einbruch! Alarmmelder angeschaltet für 60 Minuten!')
elseif (otherdevices['Domoticz Security Panel'] == 'Disarm') then
print('Tür oder Fenster wurde geöffnet')
end
else
print('Alle Türen und Fenster geschlossen')
end
end
return commandArray
----------------------------------
II) Zipato RFID Keypad EVENT
With a second event I control the actions of a Zipato RFID Keypad.
If the Zipato is switched to "Away", the Security Panel is switched to "Arm Away" and two Zipato RGBW bulbs (one inside and one outside of the front door of our house) give an orange light ... like a security status LED.
If the Zipato is switched to "Home", the Security Panel is switched to "Disarm" and the bulbs light in green colour and then switch off after some seconds.
Code:
Code: Select all
commandArray = {}
if (devicechanged['Keypad']) then
if (otherdevices['Keypad'] == 'On') then
print('AlarmPanel Arm Away')
commandArray['Domoticz Security Panel'] = 'Arm Away'
commandArray['Group:Alarmstatuslampen orange']='On'
else
print('AlarmPanel Disarm')
commandArray['Domoticz Security Panel'] = 'Disarm'
commandArray['Group:Alarmmelder']='Off'
commandArray['Group:Alarmstatuslampen grün']='On'
commandArray['Alarmstatuslampe innen']='Off AFTER 10'
commandArray['Alarmstatuslampe außen']='Off AFTER 10'
end
end
return commandArray