Somewhat new to lua scripting, but I've accomplished quite a bit with my dimmers.
However, when I query ecobee motion sensor variables, I get multiple values back.
For Example:
print( luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","Tripped",64) )
1 1517733365
So its returning '1' as expected stating that the sensor is tripped, however it also includes the LastTrip time as well.
If I query LastTrip, I actually get two times back. The last two trips I assume...
print( luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","LastTrip",64) )
1517733119 1517733365
Can anyone explain this behavior and explain how to extract each of those variables independently?
On a side note, the last trip times are unreliable. They don't appear to update unless the device is changing from a not tripped state to a tripped state (still testing this). It doesn't update the time stamp if the device is currently tripped. It only appears to maintain the tripped state as long as it sees motion and keeps the timestamp of when tripped last flipped from 0 to 1.
The only way to get more a more current status is by querying both tripped and LastUpdate and use them together. However, last update has the same problem of maintaining two values in one variable. I need to be able to separate the two.
Thanks in advance.