workflow issue

just in case someone else is following this…

Still doesn’t work 100%, but I got one step further.

tonumber has 2 parameters

n = tonumber (n, base)

n, the value to be converted, and the base for the number conversion, with is 10 by default.
Variable_get returns to parameters, the value of the variable AND the time stamp of the last variable change.

So I had to explicitly specify the base in the tonumber function, otherwise tonumber would use the time stamp as base which leads to an error.

The issue I am facing now is the lack of resolution of the time stamp. I only have seconds.
As I mentioned before, the cat manages to trigger the inner and outer sensor in the same second.
That leads to a time diff of 0s.

The code needs to be changed a bit

tonumber(luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", 10211),10) - tonumber(luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", 10210),10) > 0