Calling Another Piston


#1

Hi,

I’m new to webCoRE and have a question regarding calling another piston. I’ve divided up two pistons (for organizational purpose sake) and want Piston #1 to call Piston #2 when its finished.

The only problem I’m noticing is that Piston #2 has conditions in it and what I understand from conditions is the piston will still trigger/run because webCoRE will subscribe to those events.

So in order to properly do this, do I need to disable Piston #2…and have Piston #1 enable/disable it when it needs to call it so the conditions that webCoRE is subscribed to in Piston #2 don’t run by themselves? Or how is this typically handled? Thanks for any insight…


Best way to activate a piston from another piston?
#2

Is there ever an instance/situation where you want Piston 2 to run independently of Piston 1? If not, just remove any conditions from it and only have Actions that are executed when called by Piston 1.

If it does run independently, you can leave your conditions/triggers in place and add another condition (OR) that is only triggered by Piston 1.


#3

Gotcha, makes sense. Thank you!


#4

Just tell your conditions not to subscribe.

Click on the condition
Click the cog symbol
Change subscription to ‘never’


#5

There’s no need to disable the piston. You can choose to unsubscribe from events on an event by event (or condition) basis within a piston, or you can elect to unsubscribe from every trigger/condition at the top like this:

image


#6

Cross posting lol… looks like I posted ahead of you by a whisker lol

Though you covered the master switch of disabling all subscriptions too… good job!


#7

One advantage to using the master switch is that the piston will no longer “warn” you that it does not subscribe to any events. :slight_smile:


#8

That damn warning often appears even when the piston is subscribed to something lol… I’ve become accustomed to ignoring it haha


#9

Sweet, I really like this idea and never would have found it…thanks to both!

BTW @Robin - Your YouTube video on getting setup with webCORE was much appreciated and helped me out a lot. Also helped me understand (from a general standpoint) how SmartApps, Device Handlers work, and how I can directly link to a repository and update it v.s. ‘Paste From Code’ (which some of the manufacturers advertise instead of direct repository linking from Github).


#10

Glad it helped!