Skip to content

Instantly share code, notes, and snippets.

@sshimko
Created January 21, 2015 01:29
Show Gist options
  • Save sshimko/8ffb3918a7365f0b49e5 to your computer and use it in GitHub Desktop.
Save sshimko/8ffb3918a7365f0b49e5 to your computer and use it in GitHub Desktop.
Vera luup code to conditionally disable Ademco alarm via ad2usb
-- Handle the alarm
local state = luup.variable_get("urn:micasaverde-com:serviceId:AlarmPartition2", "DetailedArmMode", 7)
luup.log("Found alarm panel in '" .. state .. "' state when running Deadbolt PIN Entered scene.")
if ((state ~= "Ready") and (state ~= "NotReady")) then
luup.log("Sending Disarm command.")
luup.call_action("urn:micasaverde-com:serviceId:AlarmPartition2", "RequestArmMode", { State="Disarmed", PINCode="1234"} , 7)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment