Protecting my Man Cave

June 7th, 2014 3 min read

Github

The source code or files in this post are available on GitHub.

Series

This post is part of the HomeSensor series. Check out the other posts here:

    Tags

    Ads via Carbon

    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.

    image

    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.

    image

    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.

    image

    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:

    For my non-dutch visitors: above labels are dutch for: Door, Hallway, Living room, Bed room, Side room.
    For my non-dutch visitors: above labels are dutch for: Door, Hallway, Living room, Bed room, Side room.

    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!

    Loading comments …
    ©2021 - MichaelTeeuw.nl