Noob arrival piston


#1

1) Give a description of the problem
Appreciate your patience!
Trying to create my first piston using the more granular “home” zone in Web Core vs the one in ST, and also have it turn on two momentary switches (Driveway and Garage) when I get home.
The ST Zones are so far out due to my U shaped road layout, everything opens too early.
OPTIONAL - Additionally, my DH is a bit flaky and sometimes leaves my Driveway gate open instead a momentary on/off, so I’d like a toggle command 90 seconds after piston is run.

2) What is the expected behavior?
I’m actually stuck at the design stage. Im not a coder, but am willing to roll my sleeves up here. My challenge is that I can’t find a template and am struggling to understand all the various terms in the code of similar pistons that I’d want to edit.

3) What is happening/not happening?
When I arrive, nothing happens. or it all happens way too early. I’ve gone through quote a few designs for the code and not got it right yet.
I’m deleting the pistons continually as quite often its just leaving everything open all the time.

4) Post a Green Snapshot of the pistonimage

Thanks for any help!


#2

I do not have an easy solution to share, but I highly recommend that until your coding is well tested, you do not place any unlock or open door commands in your code. For testing, I often use "Send SMS notification" or "Turn on Porch light" etc. This will give you instant feedback without any risks.
(your ‘U’ shaped road will make this one tricky to get 100% success)

Also, I would not use the command "Toggle" either. Using my example above, you could make it:
IF Presence changes to present, then Turn on Porch light
(even if this is not your end goal)

When programming, it is almost always better to be specific, and avoid vague commands like “Toggle”.

Normally, I do not recommend making a “Welcome Home” piston until you have at least 20+ pistons under your belt first, but using the tips above, at least you won’t run any risks to your family or possessions while you are learning.

And one last thing to consider:
Presence sensors occasionally drop and then reconnect, without you lifting a finger. (this could cause a poorly coded piston to run at the wrong times) Most reliable pistons have a bunch of code inserted to double check etc., which hopefully minimizes the occurrences of false positives. This is also why having some kind of notification while testing (for both successes & failures) can really help to bring awareness. The worst that can happen is your porch light may come on at 3am. (but this is much better than the garage door being opened!)