Last armed tripped for motion sensor

How can I know last armed triped via user_data, sdata?

disarmed:

<device name="hall_motion" altid="7" id="16" category="4" subcategory="3" room="3" parent="1" batterylevel="100" temperature="24.0" light="15" armedtripped="1" armed="0" lasttrip="1476353655" tripped="0" state="-1" comment=""/>

armed:

<device name="hall_motion" altid="7" id="16" category="4" subcategory="3" room="3" parent="1" batterylevel="100" temperature="24.0" light="15" armedtripped="1" lasttrip="1476353655" tripped="0" state="-1" comment="" armed="1"/>

armed & tripped

<device name="hall_motion" altid="7" id="16" category="4" subcategory="3" room="3" parent="1" batterylevel="100" temperature="24.0" light="15" state="-1" comment="" armed="1" armedtripped="1" lasttrip="1476354414" tripped="1"/>

after armed & tripped

<device name="hall_motion" altid="7" id="16" category="4" subcategory="3" room="3" parent="1" batterylevel="100" temperature="24.0" light="15" armed="1" state="-1" comment="" armedtripped="0" lasttrip="1476354445" tripped="0"/>

There is NOT a time stamp for every combination of tripped and armed …
There is ONLY a time stamp when it is tripped, independent of when it is armed or not.

If you need these time stamps … use PLEG … it maintains times tamps for all inputs and all expression.

why PLEG(terrible thing)? i dont want to use it!

I try to make some interface for vera via http requests.

Can you tell me about “armedtripped” what is this?

I don’t want to use vera interface and micasa cloud.
How can I know about alerts via http request after me offline?

for examle:

  1. I am at home
  2. I go to work (offline)
  3. Vera detect motion in my flat.
  4. I come to my home.
  5. I want to know about last (1 or maybe more) alerts, how can I do it via http requests?

Another method i’ve used.
Install the variable container app (assuming it still exists…?)

On armed sensor trip, run luup code:

-- record trip time to variable container
local timerightnow = tonumber(os.time())
luup.variable_set("urn:upnp-org:serviceId:VContainer1","Variable5",timerightnow, 23)

Where the variable container can hold 5 variables (writing to “variable5” and its device number is 23