DIY Home security with Raspberry pi zero w + Perl

I got a ring doorbell for Christmas.  It was a very thoughtful gift and I gotta admit it is very slick.  However, for some time, I have been using a home made security system based on the raspberry pi zero w and perl.

home made home security node based on pi zero w
home made home security node based on pi zero w

I designed it so that each node sends udp messages to a udp + LAMP server. I can view all the events on the server’s web interface.

UDP server receiving message from a node
UDP server receiving message from a node

The front-door node also has a TMP36 temperature sensor read by an MCP3008 adc, and a raspberry pi camera.  When the door is opened, it takes a picture two seconds later, and uploads it to the LAMP server.

diy home security web interface
diy home security web interface

I set up port forwarding on my ISP router so I can view my LAMP server from anywhere.

The udp client and server scripts are incredibly simple.

perl udp client script
perl udp client script
perl udp server script
perl udp server script
tmp36 + MCP3008 schematic
tmp36 + MCP3008 schematic
entry contact and LCD schematic
entry contact and LCD schematic

I go into somewhat more detail on my hackster account.  Off-the-shelf home security and automation products are fairly inexpensive and easy to set up nowadays, but for me, it’s just so much fun to build my own from scratch.

Leave a Reply

Your email address will not be published. Required fields are marked *