Install a Reed Switch Door Sensor: Contact States, Magnetic Margin and Event Logging
Build a dependable door-state monitor by checking the supplied contact behaviour, testing the magnet in the finished frame and separating real openings from chatter.