Although one can argue a soldering iron can have a lot of emotional value, I don’t think my Man Cave aka The Xonay Mansion contains a lot valuable items. Never the less, the idea of some protection makes me sleep better. Unfortunately a regular alarm system has such an annoying interface I never tend to turn it on. And more important: it’s an extremely closed system resulting in a lot of unused possibilities. Not that I need a reason, but these facts are reason enough to built my own modular alarm system.
When I bought my apartment, It was already equipped with an professional alarm system. Although the system is closed, user unfriendly and extremely annoying, it’s great that every room of my apartment already includes a subtle but professional alarm sensor. A nice basis for my own system.
My best friend Google and some common sense helped me figuring out how I could connect the current sensors to a self made alarm system. Besides feeding it with a 12v power supply, i just needed to connect the alarm pins to a digital-in of any micro controller or micro processor. In this process the most complicated task was figuring out which cable was connected to which sensor.
When finished my journey thru the jungle of wires, I set up a testcase using an Raspberry Pi, a breadboard and some resistors. The GPIO pins of the Raspberry are perfect for this application and allowed me to connect up to 8 sensors. Although the breadboard is temporary, the Raspberry found it’s final purpose. This is my new alarm! Especially because it can easily function on backup battery power.
The software part of the Raspberry Alarm is comparable to the Annoying Dishwasher Setup. But instead of serial communication, I read out the GPIO’s pins directly using the pi-gpio Node.js module. As a testcase I built a small mobile interface which shows the current status of all sensors connected:
This interface allows me to monitor all sensors with realtime (socket!) updates.
Of course this interface is only the tip of the iceberg of what is possible. I currently use this system to control the (screen) power of my Magic Mirror, push messages to my iPhone in case of unexpected detected motion, and automatically control my Philips Hue lights.
If you are interested in the source code of the alarm, feel free to check it out on GitHub. Need to install Node.js on your Raspberry Pi? Check out my super easy guide.
Interested in one of the extensions of this alarm system? Let me know so I can write a post about it!