Make ON/OFF button for action group?

Posted on
Thu Mar 10, 2011 12:26 am
thomasw offline
Posts: 135
Joined: Feb 13, 2011

Re: Make ON/OFF button for action group?

Hi Jay,
OK, hold on because you'll never believe what was wrong. I did as you said, and removed the "set variable" from the button on the control page. (from both buttons). And it did fix the problem with the button showing the correct "on or off, with red or green". The status now shows correctly, no matter if I use the RemoteLinc to activate the Arm or Dis-Arm, or use the control page in Touch.
I kept wondering why I still couldn't just use a single power button on the control page, like you had said. Soooooo, I kept looking at things, and "finally" noticed the problem was in the embedded applescript that runs when the power button is pressed. As you see in the pictures I had sent before, I had it as "if (value of variable "alarmArmed" = "true") then execute group "Arm-Away action group" else execute group "Dis-Arm Away" end if"
Then it dawned on me, that this embedded script wasn't even being done because I also had a second action set when the button was pressed that simply ran the "Arm-Away action group". The script wasn't doing anything! I removed the second action that ran the action group. Then I realized that the script was backwards. I changed the script to read :
if (value of variable "alarmArmed" ="true") then execute group "Dis-Arm Away" else execute group "Arm-Away action group" end if :
The Arm and Dis-Arm action groups were reversed, and THAT is why I couldn't use a single power button on the control page!
Now, after fixing the script, I removed the second button named "Dis-Arm" from the control page, and can now just press the ONE power button to "Arm" or "Dis-Arm" the security cameras (applianceLincs).
I knew it had to be something simple I was missing. I'm sorry I took up your time in figuring this out, but I really DO appreciate your help! :mrgreen:
-Tom
I've included a picture of the correct script that works perfectly
Attachments
Picture 2.png
Picture 2.png (41.11 KiB) Viewed 2259 times

Posted on
Thu Mar 10, 2011 9:23 am
jay (support) offline
Site Admin
User avatar
Posts: 18260
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Make ON/OFF button for action group?

Cool, glad you got it working.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Mar 10, 2011 11:33 pm
thomasw offline
Posts: 135
Joined: Feb 13, 2011

Re: Make ON/OFF button for action group?

Jay for president!....... :lol:

Who is online

Users browsing this forum: No registered users and 1 guest