CoRE - Get peer assistance here with setting up Pistons

I would do:
if GATE is open
and
! BEAM stays closed for 2 minutes
then
{
Do whatever.
}

I tried then if but don’t see how to put a timer on that. If the beam is backyard isn’t crossed in 5 minutes maybe someone just opened gate but didn’t proceed into backyard.

I’m thinking I need something like:

If gate opens and closes then start watching for a maximum of 5 minutes to see if beam gets crossed then notify.

Perhaps I need to create a virtual switch that stays open for 5 minutes that get’s opened when gate opens and if that’s open and then backyard beam is crossed then notify me.

The only difference between the two capabilities as far as selecting the same device goes… is that the default attribute selected for the condition depends on the capability selected. If Expert Mode is not enabled, then you’ll need to make sure you select the right capability. If Expert Mode is on, you get an Attribute field while building the condition, so regardless of which capability you used, you have access to all options. But the default pre-selected Attribute will differ from one capability to another.

I wouldn’t call it “more restrictive”, athough it may seem so for programmers. In programming, a case needs to end with a break, otherwise the commands of whatever next matching case are also executed. Went on a limb here and assumed most users won’t be aware of such an inherent feature/bug so each new case automatically implies a break for the previous. The downside is you need to repeat the actions if you have two values that are supposed to do the same. The upside is, we won’t get hammered with questions as to why all actions run :wink: I can still change that behavior, if needed, but I personally feel that the implied break helps more people.

  1. device implementations define commands that CoRE is able to do. What each command does is really dependent on the DTH (device type handler, aka device driver) code. You would need to look into that code to see if there is any difference between on(), off(), enable(), and disable()

  2. Simulate is not able to alter current states so as far as presence goes, it may not help much. You can however add a virtual button or minimote and add a backdoor condition into the (presence is away OR minimote button #1 is pushed) that will allow you to run that side of the piston with a push of a virtual minimote button - use the ST app to push the button

1 Like

This line reads “If not BEAM stays closed for 2 minutes” It will only trip if the beam is broken within the time limit. A trick of logic.

OK, how about “slightly restrictive”? LOL

No argument from me here :smile: Agree completely with your implementation.

1 Like

Does anyone know the answers to these?
@ady624

So, I am trying to diagnose my issue with the dimmer and made the rule simpler to isolate it, only including if the dimmer is on in the IF statement, but it still never becomes true. Here’s the screen shot of the piston. Any thoughts?

First question - No
Second - those arrows are supposed to be a quick way to get an app to run. I do not find them that reliable in the parent/child apps.

Did you ever actually turn the dimmer off? And then back on?

Yes, turned it off and on again multiple times.

Good morning, everyone… is there any way to build pistons on my laptop, or is this only possible on my phone/iPad?

On windows you can try android emulator like MEmu and then install the ST app in it.

Thank you, sir!

Trying to write a Piston that will remind me when my garage door is open in 2 steps…1 when it’s been open for 10 minutes and again when it’s been open for 30 minutes. I was trying to see if I could do it via a a single piston (then-if) - I know how to do it in 1 but trying to learn more about using the different types.

I created a then-if piston that first looked for the garage door sensor staying open for 10 minutes and then it sends me a message and this part works…then, if the contact sensor did not change in the last 30 minutes (sensor staying open isn’t a option in the second part for some reason) I have it sending a 2nd message. I get both messages at the 10 minute mark…any help would be appreciated - thanks!

Without seeing the piston I may be wrong, but how about puttingin a wait 20 minutes and then follow that with a repeat piston.
Also enable the cancel on piston state change.
This way you will get a message every 30 mins that the door is left open for until the piston goes false and then the messages will stop.

@bamarayne
I used this piston too.
But when I got the notification it actually listed the device ID in the push notification.
Shouldn’t it provide the device name?

So would this be something other than a then-if to start with?