Contact sensors
Contact sensors — are devices that register the presence or absence of physical contact between two surfaces or objects. They are widely used in security systems, automation, industry and household appliances.
Magnetic contact sensors (reed switches)
Principle: work with the help of a magnet and a reed switch. When the magnet approaches, the contacts close.
Application: security alarms (opening doors/windows).
Pros: inexpensive, easy to install.
Cons: may trigger false alarms due to strong vibrations.