Author Topic: Elk disarm does not disarm devices in Vera  (Read 3229 times)

Offline shallowearth

  • Hero Member
  • *****
  • Posts: 966
  • Karma: +45/-9
Re: Elk disarm does not disarm devices in Vera
« Reply #15 on: December 05, 2016, 11:20:42 am »
Your LUA as written will allow the scene to run if the State is Ready
Not sure why that code would be needed, if you are triggering on Disarm, the state will in fact always be ready so that LUA would always be true.

I don't have an Elki have a concord and the basic scene triggered support Armed away. Vs Armed stay, which makes it easy.

So are You saying you only have Armed as a trigger and then have to look at the details to tell the difference between a stay and an away? 

Timing of the variable being set to actual away (if not instant) might be your issue. 
I would try triggering the scene on arm, then use LUA to say if not StayInstant then run notification

local allow = false
local status = luup.variable_get("urn:micasaverde-com:serviceId:AlarmPartition2","DetailedArmMode",6)
return ((status == "StayInstant") == allow)

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 323
  • Karma: +10/-33
Re: Elk disarm does not disarm devices in Vera
« Reply #16 on: December 05, 2016, 02:32:01 pm »
Ok, I feel like a complete moron now.   :-[
I think my confusion stemmed from the wording of the triggers and I figured "Armed" encompassed all forms of being in an armed state, including stay mode.  Duh.
Thanks, and sorry for the trouble. At least I learned some Lua from this.
My "Karma" has been modified by 2 or 3 douchebags that didn't like that I criticized the plugin that they worship. I'm not actually a bad person.