How to get my remote control arm and disarm my security panel
Posted: Thursday 21 April 2016 15:28
I try using a lua script my remote control (on / off switch) to turn the alarm on and off, but it just will not work.
the remote control (COCO) is visible in the switches and works. I have the following LUA script in events:
commandArray = {}
-- if (devicechanged['Remote1'] == 'On') then
-- commandArray['SecPanel'] = 'Armed Home'
-- end
-- if (devicechanged['Remote1'] == 'Off') then
-- commandArray['SecPanel'] = 'Disarmed'
-- end
end
return commandArray
Now my question: What did I wrong?
Thanks for comments!

the remote control (COCO) is visible in the switches and works. I have the following LUA script in events:
commandArray = {}
-- if (devicechanged['Remote1'] == 'On') then
-- commandArray['SecPanel'] = 'Armed Home'
-- end
-- if (devicechanged['Remote1'] == 'Off') then
-- commandArray['SecPanel'] = 'Disarmed'
-- end
end
return commandArray
Now my question: What did I wrong?

Thanks for comments!