Help with a motion piston that stops after good night routeen


#1

Hi,

I have made some very basic pistons but cannot seem to get this one to work. The idea is, when motion is detected after sunset then turn on bedside lamps. Once the goodnight routine is requested the variable changes to true and stops the lamps coming on with motion. At 9am the variable is set to false.

First time at using variables! any advice would be most appreciated!

1) Give a description of the problem
The piston will not turn off the light after 30 minutes of no movement. Gets stuck on the first IF. Also very unreliable at switching on.

2) What is the expected behavior?
after 30 mins of no movement, the light should turn off.

3) What is happening/not happening?
light is staying ON or not coming on.

4) Post a Green Snapshot of the pistonimage

thanks

Dale


#2

You’re not subscribed to the motion sensor on line 24 (no orange lightning bolt in the border).

Click into that line, click the cog symbol and then change subscription to ‘always’ instead of ‘Automatic’.


#3

You should also remove the switch is on and motion is inactive conditions on lines 35 and 37… not achieving anything.

Else
With switch 6
Wait 30 minutes
turn off

You already know motion is inactive because the else fired, and if the switch was is off it won’t hurt to turn it off again (webCoRE Just ignores the command)


#4

Thanks, it worked.

Slowly picking stuff up.