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.