Code that runs the door status