does the following bit of code does not work any longer?
Code: Select all
if (otherdevices['Domoticz Security Panel'] == 'Arm Away') then
Code: Select all
commandArray = {}
tc=next(devicechanged)
MCS_switch=tostring(tc)
-- Pruefe den Ausloeser Name auf "Tuer"
if (MCS_switch:sub(5,8) == 'Tuer') then
-- Ist das Domoticz Security Panel auf "Arm Away" gestellt?
if (otherdevices['Domoticz Security Panel'] == 'Arm Away') then
-- Eintrag in das Protokoll schreiben
print('Oeffnung der Tuer erkannt an: '..MCS_switch)
-- Ereignis in Variablen merken
commandArray['Variable:LastAlarmDevice'] = 'Oeffnung der Tuer erkannt an: '..MCS_switch
commandArray['AlarmDetected']='On'
-- Benachrichtigung senden
-- commandArray['SendNotification']='Oeffnung der Tuer erkannt an: '..MCS_switch
end
end
return commandArray

Greetings