@chionglab: Door alarm sensor: the magnet comes near. Reeds snap together, or push apart? How it works: • Magnet: a bar magnet in a block on the door, N and S at its ends. • Reed switch: two springy iron-nickel reeds sealed in glass on the frame, tips overlapping across a gap. • Field lines: from the magnet's N, along the reeds and across the gap, back to its S. • Induced poles: the magnet makes each reed a temporary magnet. Look at the letters on the two tips. • Alarm panel: wired to the reed switch, it shows DOOR OPEN or DOOR SHUT.