What is a door sensor and how does it work?