Virtual Motion Switch occasionally missing when all sensors are inactive


#1

1) Give a description of the problem
I have a virtual switch to encapsulate multiple motion detectors.
When any of the motion sensors activate then switch on the virtual switch.
When all the motion sensors become inactive then turn off the virtual switch.

2) What is the expected behavior?
See above

3) What is happening/not happening?
Ocassionally it seems that the piston is missing the event when all motion sensors become inactive.
I have added a guard to reset the virtual switch when the virtual switch stays on even though the motion sensors are inactive. but would like to resolve this.
Your advice is appreciated

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Will enabling parallelism for these encapsulating pistons help?


#3

Have you tried taking out the variables and putting the actual devices into the functions? When you select a variable it doesn’t allow you to select “ALL” or “ANY”. I think you’d be better off selected multiple devices instead of the one variable.


#4

Ryan
YOu can select the variable within Physical Devices of a condition or statement and then select Any, All

Unless someone is going to say different I dont think this is the issue here


#5

Then why doesn’t that show up in your piston?


#6


#7

Can you try this one for a test drive, see if it catches the events better.

Edit: I removed the Mode restrictions as I didn’t have those.


#8

Thanks for this suggestion.
Can I ask how this will turn off the virtual switch when all of the sensors have become inactive?
Will the else do this?


#9

It should, since we only get two possible values, that should take care of it (that’s how it worked out in my head lol).