Page 1 of 1

How Activate armed away by remote controller

Posted: Saturday 22 April 2017 15:16
by jdenbreejen2
How to activate Armed Away by trigged a remote controller with on/off buttons

Re: How Activate armed away by remote controller

Posted: Thursday 11 May 2017 16:14
by Cornholio1234
do you mean something like

Code: Select all

if(devicechanged['remotecontrollerbutton']=='Off') then
    commandArray['Domoticz Security Panel']='Disarm'
elseif (devicechanged['remotecontrollerbutton']=='On') then
    commandArray['Domoticz Security Panel']='Arm Away'
end

Re: How Activate armed away by remote controller

Posted: Tuesday 13 June 2017 11:07
by zicht
Cornholio1234 wrote:do you mean something like

Code: Select all

if(devicechanged['remotecontrollerbutton']=='Off') then
    commandArray['Domoticz Security Panel']='Disarm'
elseif (devicechanged['remotecontrollerbutton']=='On') then
    commandArray['Domoticz Security Panel']='Arm Away'
end
That would work but create a loop as long as the button is off or on.
You should on that code make a check on current status :

Code: Select all

if (devicechanged['remotecontrollerbutton']=='Off')  and globalvariables['Security'] ~='Disarmed' then
		commandArray['Domoticz Security Panel']='Disarm' 
end
Its a good habbit to alway check status in these if then occasions to avoid endless running a command