How Activate armed away by remote controller

Moderator: leecollings

Post Reply
jdenbreejen2
Posts: 1
Joined: Saturday 05 September 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

How Activate armed away by remote controller

Post by jdenbreejen2 »

How to activate Armed Away by trigged a remote controller with on/off buttons
Cornholio1234
Posts: 23
Joined: Thursday 03 March 2016 11:01
Target OS: Windows
Domoticz version: V3.4964
Location: Germany
Contact:

Re: How Activate armed away by remote controller

Post 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
Windows Server, Aeotec Z-Stick Gen5, V3.4964
zicht
Posts: 272
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 2023.1+
Location: NL
Contact:

Re: How Activate armed away by remote controller

Post 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
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest