Hello
I have put together a scene that begins the welcome home process when I open the garage door (turns off the alarm, unlocks the door, lights etc) The scene is working beautifully with one small issue. I only want the scene to run when the alarm system is in its “Armed” state. ie I dont want the door lock and lights etc to fire every time I open the garage door. I know its a simple If -then statement but I can’t figure out what I’ve done wrong.
I have done a fair bit of snooping around on the forum and have managed to piece together some code to put in the luup portion of my scene but I keep getting 'code failed" when I run it in the test loop code section. Could someone take a quick look and kindly let me know what might be wrong. I am using the DSC plugin which creates a 'system" panel that contains the variables for the alarm. Looking at the json files I was able to get the service ID for the panel and the device ID for the system is 94. Many thanks in advance
[code]local alarmstatus = luup.variable_get(“urn:micasaverde-com:serviceId:AlarmPartition2”, “ArmMode”, 94)
if “alarmstatus” = “Armed” then
return true
else
return false
end[/code]