Preventing flapping of a devcie


#1

I’m trying to prevent a device from flapping. Using Geo Fencing open a garage door. However, if the presence sensor briefly moving in and out of the fence. I want it to prevent the trigger. I just made a change today that I think will fix that but I would like to see if anyone else has ideas. Thank you.


#2

I moved this to the “Piston Design Help” category to give you better exposure.


#3

Food for thought…

Line 26 & 40
“does not change” is broke, and does not function at all.

Line 53
“stays unchanged” is always true, regardless of how often it changes

I believe we lost @ady624 shortly after he started coding those two, so it was never finished.


Examples and discussion:
Stays unchanged (October 2018)
Did not change (June 2020)


Motion trigger off
#4

Thank you! I’m just making sure that I understand this correctly. Those two functions don’t work? What do you mean by lost @andy624? Is this something that is gong to get fix?

I guess may concern is I have put a lot into Webcore (ST and now Hubitat). This is so much better then the built in rule engines. Is Webcore sticking around? I do still see updates from time to time.

I’m sorry for all of the questions. Thank you for your help.


#5

Correct. Those will not work properly.

Adrian created webcore. He was hired by ST/Samsung and has been working with them for several months now. The last that I read was he is helping with the rules API. There has been talk of webcore ver. 2, but I have not seen anything recently to confirm that.


#6

Thank you! Is there any concern that Webcore will abandoned completely? I would hate to got back to RM. Thank you both for your help.


#7

I’ve been pondering how to do this safely myself. One thought I had was to trigger “away” using tasker to detect if I’m actually using my car. If Car’s bluetooth is connected, set away to True.

Did your piston work for you?

Has anyone else watched for the car’s bluetooth connection to trigger stuff using tasker (or IFTTT, etc)? This also would solve the issue of going for a walk; I might not want to open the garage if I would go for a walk around the neighborhood.


#8

Oh yes, I love this!

If my Android connects to my car’s Bluetooth, then Tasker sends a GET request directly to a piston (which does a bunch of stuff).

Likewise, when my Android disconnects from my car’s Bluetooth, then Tasker sends a different GET request to a different piston (and does different stuff).


Edit:

I use the piston’s External URL for the HTTP GET request.


#9

I leave a samsung ST presence sensor in the car which is used to open the door when the car arrives. I also set a bool variable that is also checked to determine if the car was away. The bool is ony set to away if the car has been away for 5 mins. This gets around the problem of the sensor sometimes reporting it is away when it isn’t. I also only open the door of location mode is not set to night.


#10

I’m just not there yet. I have not crossed the threshold of presence unlocking doors or opening garage doors.


#11

I think its reasonably safe! It can’t open over night, and any false detections will only open the door while we’re home.

The main problem is when the battery in the contact sensor fails and you don’t know if its open or closed. I have considered using two contact sensors (or maybe 3 and taking the most common value from the 3)


#12

What about picking up a Zen15 from thesmartesthouse and running a hard wired sensor? I’m very tempted to pick one of those up, but the MyQ has been pretty stable after I added a second AP in my house.


#13

I’ll have a look at that, I’m not a fan of battery powered sensors really. I’ve been looking at the Konnected smart alarm, It piggybacks onto your existing alarm, and allows ST access to all alarm sensors.


#14

I have been using Konnected for a couple of years now and I love it.


#15

Nice suggestion. Thanks!

Is there any concern about the future state of WebCore?


#16

Ooops, I never expected that there would be triggers/conditions that simply do not work. That indeed explains some of the problems I had recently, where I experimented with exactly “does not change” and “stays unchanged”, and never got the expected behavior. Is there a documentation somewhere that lists these details?

What’s up with ady624 - did he quit developing WebCore?


#17

Yes. The two links in that post covers a lot of details & examples.


#18

For lines 26 and 40, you may use this:

Expression:
previousAge([$currentEventDevice : presence])

is greater than

Value:
180,000

This would give you a comparison of 3 minutes to compare to…


#19

Nice I like that! Let me try that.


#20

Quick test it looks good. I will have to see how this will work with Person1 and Person2. Example would be. If person1 leaves with in a 3 minutes of Person2 arrives will the door still open or close. Hopefully that makes sense.

Thank you so much for your help. This has been driving me crazy to get fixed.