Multiple actions on activation of script.
Posted: Tuesday 19 May 2020 10:01
Hello,
Maybe some one here can help me with a ( I hope) simple question but I can't seem to find the solution for it.
I have a presence script that is activating the alarm as soon as the mobile phone is out of wifi reach with my local network.
I want to include two actions prior to activating the alarm, resetting the motion sensor group and the closing of all doors as soon as the script is triggered.
Both devices are grouped into groups so I can reset the devices all at once.
When I include the two groups into the script nothing happens so I guess the error is between the chair and the monitor
Underneath the modification I made that does't work;
Could some of you shed a light on the error I seem to be making in order to get these to group automaticly reset when I leave the house ?
Many tanks in advance.
Maybe some one here can help me with a ( I hope) simple question but I can't seem to find the solution for it.
I have a presence script that is activating the alarm as soon as the mobile phone is out of wifi reach with my local network.
Code: Select all
commandArray = {}
if (devicechanged['Phonename'] == 'Off') then
print('AlarmPanel Arm Away')
commandArray['Domoticz Security Panel']='Arm Away'
end
if (devicechanged['Phonename'] == 'On') then
print('AlarmPanel Disarming')
commandArray['Domoticz Security Panel']='Disarm'
end
return commandArray
Both devices are grouped into groups so I can reset the devices all at once.
When I include the two groups into the script nothing happens so I guess the error is between the chair and the monitor

Underneath the modification I made that does't work;
Code: Select all
commandArray = {}
if (devicechanged['Phonename'] == 'Off') then
print('AlarmPanel Arm Away')
commandArray['Bewgingsmelders uit']='Off'
commandArray['Deuren dicht']='Off'
commandArray['Domoticz Security Panel']='Arm Away'
end
if (devicechanged['Phonename'] == 'On') then
print('AlarmPanel Disarming')
commandArray['Domoticz Security Panel']='Disarm'
end
return commandArray
Many tanks in advance.