Pausing a piston help (ST)


#1

1) Give a description of the problem
I have a piston the turn the kitchen lights on/off by motion at night.
I don’t want the lights to turn on by motion while watching a movie so i created a pause piston.

2) What is the expected behaviour?
Kitchen lights will not turn on by motion when switch is on

3) What is happening/not happening?
Kitchen lights still turn on by motion
I have 2 questions:
Besides the obvious of what did I do wrong,
Can these be combined into the same piston?
I am new to this and am really trying to learn!

**4) Post a Green Snapshot of the

5) Attach logs after turning logging level to Full
No logs available for pause piston


#2

Your pause piston includes an explicit trigger on line 26 that means it will only automatically fire when the state of the switch changes. So if the switch is already on at sunset nothing will happen. If the switch does get turned on between sunset and 8am the piston should be paused. Could that be what you are experiencing?

I would recommend changing line 26 to the condition ‘is off’. That removes the explicit trigger from the piston and the piston will instead run at sunset, 8am, and whenever the switch state changes to try and best serve the conditions.

Obviously you can’t literally combine the two as a paused piston can’t resume itself, but you could add in the override to the logic.


#3

Thank you. I will test this tonight and let you know if that fixed the problem.


#4

Everytime I see that, I am reminded of this:


#5

@WCmore Thank you for making me feel like an idiot


#6

The override you mentioned is what I was thinking to combine them. I saw it used in a youtube tutorial.

  1. I couldn’t remember what it was called
  2. I don’t know how to write it
  3. I didn’t know if it would matter

#7

Please accept my apologies… That was not my intention.
(I just find paradoxes fascinating)


#8

@orangebucket the change to line 26 fixed it. Thank you