Problem with Door State Piston


#1

I have a virtual sensor that allows me to see the state of all the doors (either open if one or more is open or closed if all are closed) for use as a quick view on my ActionTiles panel. However, I’m finding it just isn’t reliable. It is often wrong in showing as Open when all doors are closed.

Is there a better way to go about this than what we’ve done with this piston?


#2

I follow your logic and seems like it would work up until the if at line 57. This if seems to say ‘if CS 18 changes to open, close it, if it changes to closed, open it’. Am I mis-interpreting?

Try disabling that if statement and see if the piston does what you want.

EDIT: Also, this if is problematic since it triggers off a change in CS 18 and then changes CS 18. Seems like it would be running continuously and your CS 18 would be opening and closing all the time.


#3

AT has it’s moments.
Sometimes the reaction time is almost instant, sometimes a sensor won’t register for hours.

& Everything @guxdude said.

I would follow your logic but maybe something slightly simpler.
Here is a draft I would try:

IF any of contact sensors 1, 2, 3, 4, 5, 6, 7
Changes to OPEN
Then
Turn ON 
Contact sensor 18 (Assuming it's virtual)

IF ANY of contact sensors changes to CLOSED
      Then
         IF ALL of contact sensors are CLOSED.
         Then
         With contact sensor 18 
         Do TURN OFF

#4

I had to load his piston to see but your outline is exactly what he followed up until the if at line 57. Remove that if, and I think it will be fine.


#5

Thanks guys. Not sure how that code segment got in there. It’s a holdover from an earlier attempt and somewhere it got entirely overlooked!