Jacuzzi automation

Today I planned to program the Raspberry Pi in order to start the filtration pump and turn on the underwater lights when we are using the jacuzzi.

I needed some magnetic contacts in order to close a contact pin from the GPIO. Unfortunately, it seems that most hardware store are no more carrying these in their inventory. So I bought a cheap door alarm and disassembled it in order to use the magnetic contact for my sensor.

Cheap alarm with magnetic contact
Cheap alarm with magnetic contact
Lid sensor
Lid sensor
Lid sensor test
Lid sensor test