Help on presence piston that changes because of my situation


#1

1) Give a description of the problem

Hello all. I’m looking for the best way to accomplish this for my needs. I am looking to set up a routine using my phone presence. The issue is I live in an apartment complex right off of a highway. I use that highway a lot and because of that I intermittently pass by my complex. Ideally the presence sensor would be exact but it obviously isn’t. So my presence changes if I pass by. I’m trying to use a wait time or even a stays away from but wasn’t sure what was best and if the presence would trigger things on or off by passing by. Any help is appreciated.

2) What is the expected behaviour?
(PUT YOUR INFO HERE)
Keep my presence as home or away even if just passing by my hone.
3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

I had a similar problem.
You’ll need to add one or two more “Conditions” to make your piston work.
It could be a motion sensor or open/close sensor etc.


#3

I use the code below which could help. This is used with a ST presence sensor, which can randomly change to away for a minute or so before arriving again, even though its not moved.

When the presence arrives home again, you also check the bool for being away, set the bool to false and carry out whatever action you need to take on arriving. I’ve noy included the whole piston is is large and difficult to follow as it carries out many actions.

image


#4

Presence is a very individual thing. What works for others might not work for you.

For example, for me all mobile presence reporting a change to ‘present’ means is that I am somewhere in the neighbourhood. I could be arriving, departing or passing by, and I could be by the front door or an hour away. If it stays that way for a few minutes it could suggest that perhaps I am indeed arriving, or it could mean there is a traffic jam or a red signal somewhere. A change to away means that I might be somewhere else, that’s all. So for me, the best use of mobile presence would be to indicate my proximity to other common destinations such as school, work, friends and relatives homes etc, either using places on Samsung phones or just creating additional SmartThings locations. However others can happily use mobile presence to unlock their doors without any other checks and balances.

Similarly, many users don’t have any joy with the SmartThing Arrival/Presence sensor fobs. I find they work great. Would I unlock my door using one? Never. They can report presence fifty feet from the house inside a moving vehicle and that is too far for me, and also they tend to be attached to keys or bags or other things where there is plenty of metal around to weaken the signal and so they will sometimes give spurious away reports. You have to understand what they do for you.

So if you want to take action based on arrival you could indeed use conditions such as stays present for x minutes but only you can know how long x needs to be to differentiate between passing by and arrival, and also whether that x would be too long for your normal arrival routine. You also need to consider what you are prepared to do based on the presence report, and whether or not you want any additional sensor input alongside it.


#5

Thanks all. I’m trying something like this. I have a variable set as well. But to confirm the logic of “stays away” if I set stays away for 10 minutes as the trigger and pass through the location again (canceling out the trigger since it sees my passing as being home again) it will just retrigger when I leave for ten minutes correct?


#6

Consider a simple piston saying:

if Presence Sensor presence stays not present for 10 minutes
then
  ... Do something
endIf

The piston will be triggered by any Presence Sensor presence event, be it present or not present. So let’s say it is not present.

The piston will start executing and the stays line will be evaluated as if it said Presence Sensor presence is not present, which is, of course, true. It will then return false. Yes, false. It will then continue with the piston.

It will also simultaneously schedule a run in ten minutes time, rather like doing a wait 10 minutes.

If the piston runs again in the next ten minutes and the Presence Sensor presence is still not present then it will return false again and the timer will still be running. If, on the other hand it has changed to present the timer will be “cancelled”, and yes it’ll return false again.

After ten minutes the timer event will start the piston up. If it was “cancelled” it will just exit as there is nothing to do. If it wasn’t it will restore its environment, fast forward to the stays condition, then return true and continue with the piston.

I think that is a ‘yes’ to your question, but not necessarily in the way you expected it to be.


#7

Ok, that makes sense. It’s literally just happening to me now. I left and the away piston kicked off. It was canceled as I made the uturn and came back toward my house and I got a message I was back home. Now, as I’m away again the timer is counting down from the 10mins.

I think this would meet my needs. Seems the only issue would be if I was in away mode and was passing back through my home presence geofence at exactly 10 minutes after I originally left.