Both Automatic and Manual Piston Execution


#1

1) Give a description of the problem
I would like to be able to execute a piston both automatically via timer and manually.

2) What is the expected behaviour?
Once a day the piston will run based on timer and also let me manually execute it from other pistons.

3) What is happening/not happening?
The piston works fine using the timing function but I can’t figure out how to enable the agility to call it from another piston and not be stopped due to the timer restrictions.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full


#2

Your piston is small enough that I would just duplicate the piston but use a virtual switch for the trigger.


#3

When you say manually, do you mean you want it turn on the light then?

if so you can use

Leave the if statement, but put the with block below it (not inside the then or else - you have empty then or else)

The result is the if statement subscribes and uses the timer

but if you run manually, the with block still runs.


#4

Wow, a true case of over thinking something. Thanks!


#5

I agree, that works great if you also want to execute via the piston url from an external source, for example. Just remember that anything not in the IF will execute every time the piston runs.

If I only need manual execution via test button, for debugging as an example, use $currentEventAttribute = test as a condition (add as an “or” in the IF block)
image