You need a limit switch as well so it knows when the door is all the way open and closed