Skip to content
Simple door opening sensor based on a Raspberry Pi and a magnetic switch.
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Door Sensor Soundbox

This project aims to create a simple sound player which triggers whenever a door has been opened to play some fun introduction sounds. It's based on a Raspberry Pi, a magnetic switch and some other low-cost and accessible hardware pieces. Of course, anyone could go ahead and buy something mass produced, but it's always more fun to build stuff yourself.I got the idea a while back from seeing a YouTube video where this guy had created a custom door opening sensor that would play the iconic bass riffs from Seinfeld whenever the door opened. Seeing as how I love technology I figured it would make a good addition to my office, so I built an enhanced version. This is the resulting project.

This project was developed in partnership with Conrad in their efforts to showcase makers around Sweden. I would therefore like to thank them for providing the hardware used in this project. Please also check out their website for more interesting projects.


Clone the repository to a folder of your liking and use the following command to start the software:


Build guide

Please refer to this link for a complete description on how and where to use this software.

Supervisor job

If you wish to have the software running all the time, you can use Supervisor to accomplish this. This is the configuration file that I use. It should be placed in /etc/supervisor/conf.d and named sensor.conf or similar.


Finished product

This section will in time be updated with a video of the final build and product.

You can’t perform that action at this time.