Text me if I leave house and garage door is left open - Phone's presence changes away from present not working


#1

1) Give a description of the problem
The text message isn’t sent because it appears the phone’s presence does not change away from present. (but in reality, it does)
“Comparison (enum) not present changes_away_from (string) present = false (1ms)”
Or maybe it’s another issue. That’s why I’m here asking people smarter than me.

2) What is the expected behaviour?
Sometimes my garage door will start closing, then hit a snag/resistance, or a leaf will blow infront of the sensor and then reopen. So I have to sit in my driveway and wait for it to fully close. I’d like to just hit the button and start driving away. If the garage door has the error and re-opens (and thus would be “open”) when I leave my neighborhood, then I want a text message that it’s open so I can turn around while still close to the house and come back to close it.
I don’t want to use a timer because I regularly leave the garage door open for hours while mowing the yard or other house-duties. And if the timer was 30, or even 10 minutes, I’d basically be at Work already.

3) What is happening/not happening?
This project is my first webcore piston, so I’ve tried a few things and discovered a few things.

  • To send a txt, you have to select the ST mode: away/home/night. I don’t mess with ST modes, so it’s basically always “night”.
  • For this type of combined if-statement, It is best to have a trigger and a condition. Which I think I’ve done. “If phone’s presence changes away from present”, and “sensor’s contact is open”.
  • There is a lightning bolt next to the line with the phone’s presence, but there is not one next to the multipurpose sensor’s condition. Maybe this has something to do with my issue?
  • I made a piston that just checks if “my phone presence changes to present” and it sends a text just fine.
  • I made a piston that just checks if the multipurpose sensor is currently open, and it sends a text just fine.
    - But when I combine those two statements, it appears that the first if-statement evaluates as false.
    - When I look at the logs, it says “Comparison (enum) not present changes_away_from (string) present = false (1ms)”. This leads me to believe that the 1st argument of the if statement is not being evaluated correctly (or as I expect it to). I left the house at 7:49am today. My presence should have changed from present to not present. That evaluation should have been true.

Other important info:

  • Yes, I’ve successfully tested that the system is able to text me.
  • The “multipurpose sensor” is the Samsung Smarthings Multipurpose sensor. I have gone into the ST app and changed the type to “garage door” and it registers as “open or closed”, and I can see the status change in real time in the ST app on phone.
  • The Multipurpose sensor is not installed on the garage door yet. It’s just sitting on my desk at home in the “open” orientation. So every time I come home, I should get a txt, but I don’t.
  • For phone presence, I’m using just the ST app’s implementation. I only care about home vs not home, and my understanding is that the ST app’s phone’s location should handle that. I’d rather not use the separate Webcore presence app because a future version of my setup will go on the wife’s phone and it’s enough of a hassle just to get her to have the ST app.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
1/3/2020, 7:49:19 AM +972ms
+1ms ╔Received event [Kyle’s iPhone].presence = not present with a delay of 54ms
+74ms ║RunTime Analysis CS > 19ms > PS > 39ms > PE > 16ms > CE
+77ms ║Runtime (37942 bytes) successfully initialized in 39ms (v0.3.110.20191009) (74ms)
+78ms ║╔Execution stage started
+85ms ║║Comparison (enum) not present changes_away_from (string) present = false (1ms)
+86ms ║║Condition #3 evaluated false (4ms)
+87ms ║║Condition group #2 evaluated false (state did not change) (5ms)
+88ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+90ms ║╚Execution stage complete. (13ms)
+91ms ╚Event processed successfully (91ms)


#2

Try rebuilding the piston…

If presence sensor changes to not present (Get rid of the group you had)
And
Contact sensor contact is open

Then
With
Location (don’t use presence sensor here)
Do
Send sms blah blah blah (don’t need only when)


#3

I did the same as @jkp has suggested. And it does work. Just be aware that presence sensors can change at variable times, sometimes varying by several minutes. I was hoping to use a piston like this to alert me if a garage door is left open before I even leave the neighborhood so that I could go back and close it. Unfortunately, there were times when I was already several minutes from my home before I got the SMS.

Tip : If you do something like this, it is sometimes wise to add a confirmation…

If Garage_Door 1 is closed
SMS “Garage door 1 has closed”


#4

Maybe add another condition?

If front door closes
Followed by
Garage door is open for/after 5 minutes (gives you time to leave the driveway)
Then send SMS

Then you’ve got a hard time limit.

If you have a smart switch for the garage, that could be your first condition.


#5

Like JKP said, I think it was the if/group thing that was messing up that piston.
The only problems I’m having now are that the Samsung multipurpose sensor sometimes goes offline and gives unexpected results. This is more of a problem with the sensor, not webcore or my programming. I’m guessing it’s because it’s relatively cold, and the battery voltage is dropping? I mean, it’s only like 30degF outside, so it’s not that cold, and the battery/sensor is brand new. It can’t be distance to the Samsung hub. The garage door is like 6’ below the hub. But again, that is a complaint for Samsung, not webcore.
I’ve set up another piston that txts me if the garage door is closed too (so I get a text when i leave the neighborhood either way – except when the stupid sensor is offline). Once I’m confident in the capabilities of the system, I’ll probably delete the “txt me when I leave and garage is closed” piston.
Also, Pantheon is correct that the built in presence sensor changes at variable times, because I’ve noticed that I don’t always get the text at the same point . But it’s usually close enough that I’m not all the way to work.


#6

I got a ST multi sensor 5 weeks ago and it has already gone down to 63% on the battery. But it is inside the house. Two things you may want to consider. Add a zigbee repeater between the ST hub and that sensor to improve the signal. Or swap the multi sensor with a z-wave tilt sensor. I have had one of those on my garage door and the battery is still going after 3 years. Winter temps get down to 20/30s in the winter with the occasional lower temps.


#7

For what it’s worth, my “Samsung multipurpose sensor” usually begins being a bit unreliable at about 90% battery, and is usually dead by 80%.
(although, to be fair, I am using Chinese knockoff batteries that only cost me 8 cents each)


#8

The samsung sensors seem very sensitive to battery types. I’ve found some branded batteries dont even work with them, so stick to the recommended ones now and they seem to work fine & last a reasonable time


#9

Depending on the amount of traffic thru the device… I typically average about three months before I need to change batteries at ~85%.

Not too shabby with each device costing me about 24 cents a year…


#10

I use Z-Wave-Plated-Reliability-Garage-TILT-ZWAVE2-5-ECO and I am very happy with them. I did modify the tilt switch to a mercury tilt switch. See here. I upgraded my review today to 4 stars. My batteries are still > 80% since install over a year ago.


#11

What if you simplified the trigger condition to only be the away event, then check the contact sensor within the routine?

If Presence sensor 2 changes to “Away”
Then
If Contact Sensor 1 is “Open”
Then
With Location
Do
Send SMS

I’d also wonder if that “Only while Away, Home, Night” is needed, and if the status isn’t updating quick enough.

I, too, just installed the samsumg multi-purpose sensor. I’m pretty sure I bottomed out the thermometer on it. Outside was 1F, but the sensor read 18 or so. I’m sure my un-insulated detached garage is slightly warmer, but not 15+ degrees different than the outside. My battery shows 47% after about a week of use (it didn’t start at 100%).

I’m tempted to get one of those Eco sensors, or get the visonic magnet-based contact sensor. I saw a post saying those have worked for people on outdoor fence posts.


#12


This is what the piston looks like after modifications. I’ve tested it to work.
Again, the only problem is that the samsung multisensor doesn’t always work. I’m probably going to do that Z wave garage tilt sensor linked by Pantheon if it keeps giving me headaches. I"m not too worried about the dispalyed battery %, just as long as it works.