This is my first try on creating a working piston, but I am trying to get the light switch to go off only after both motion sensor show no motion.
What I have does not work so any suggestions would be appreciated.
I would also like to be able to put a time delay in there.
I have tried change from active and change to inactive and neither works.
From what I can tell it is working. I haven’t tested the time delay but with two sensors I may not need it.
Ignore the milliseconds its just the for while testing the function.
Why are you using the same sensors twice.
I think you have misread my statement above.
When I said OR I meant a different way of doing it.
I’ll post one.
What I would recommend is that you change Task Cancellation Policy (TCP) to 'never for that action.
This way if motion is detected before the timer has matured the timer will cancel and start again when no motion is detected.
I don’t quite understand
“What I would recommend is that you change Task Cancellation Policy (TCP) to 'never for that action.
This way if motion is detected before the timer has matured the timer will cancel and start again when no motion is detected.”
You have used 'change to inactive.
I used ‘are inactive’. There is a difference between the two.
Also you haven’t changed TCP to 'never.
Copy mine if you wish. Use the code at the top.
Also for information, if you look at the bottom of the piston next to the edit button you will see a green camera. Click in that for an anonamised screen shot of the piston. Makes life easier.
Yeah I did have ‘are inactive’ on the first one and I messed up on the second pistion.
I don’t quite understand
"What I would recommend is that you change Task Cancellation Policy (TCP) to 'never for that action.
This way if motion is detected before the timer has matured the timer will cancel and start again when no motion is detected."
I do not see anything about the TCP.
And on yours what are the faded character on the right like '#5"?
That’s just a line number that is useful when debugging using the logs.
As for TCP, when in edit click on the with.
At the bottom you will see a settings cog.
Click on that and then you will see some options.
Click on TCP and select never.
Save.
You will now see red N next to the actions.
I would of thought the timers would of reset anyway. They seamed to on my previous piston because the lights never went off as long as either sensor had motion. I will try it. Thanks again.
Sorry to bother you again, but I just had the light go out on me with both sensors showing motion. We had left the room and both motion sensors timed out. Came back before lights were timed to go off. Both sensors picked up motion at the same time and two minutes later the lights were instructed by the piston to shut off.