Maybe a relay and a dry contact sensor.
The video shows an Arduino and I know there have been some projects here using those. ST_Anything was one but I don’t know if it is still going.