First Piston: Does not subscribe to events


#1

1) Give a description of the problem
This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.

2) What is the expected behaviour?
I want this piston to run all the time and complete the actions if the conditions are met but can’t work out how to make it execute.

3) What is happening/not happening?
The piston won’t run due to not having a trigger but not sure what trigger I should be using

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full

+45ms ║╔Execution stage started
+75ms ║║Comparison (enum) not present changed = false (16ms)
+84ms ║║Comparison (enum) present changed = false (7ms)
+85ms ║║Condition #3 evaluated false (36ms)
+87ms ║║Condition group #4 evaluated false (state did not change) (37ms)
+89ms ║╚Execution stage complete. (44ms)
+90ms ╚Event processed successfully (90ms)

#2

Hi,
try changing the only when to an if statement with the same conditions. You should then see a lightning bolt in the margin against line 18, indicating the piston is subscribed to that event.

I don’t use the only when statement very often, but think its used to block a section of code running when the piston executes. When any of the triggers that have been subscribed to are triggered, all code in the piston is run from top to bottom.


#3

Not at my computer and I have had limited success with presence in webcore, but I would change your only when to an IF statement. And for the Time condition, I would use the NOT option when spanning midnight…
Time is NOT between 5:00 and 18:00.


#4

Great thanks guys, I’ll give it a go when I’m back and see how it works :slight_smile: