Project: Create DIY Camera with Mobile Notifications

Project: Create DIY Camera with Mobile Notifications

by Jonathan Scott

I have a problem. My 3 year old son likes to get out of bed upstairs while my wife and I are watching a movie downstairs. We don’t know he’s up until he gets bored enough with destroying his room to come down and tell on himself. I desperately needed something that could sense motion, notify me on my phone or iPad, and show me a live video of what’s going on. While there are decent indoor cameras on the market already, I wanted to roll my own for a number of reasons, ranging from privacy to price to a desire to learn. After checking out a few different options and combos (and reaching several dead ends), I settled on MotionEyeOS loaded on a Pi3A+ with the NoIR Camera. Additionally, I used the IFTTT Maker Service to trigger an alert on my mobile devices. The end result is that motion in the room triggers an alert on my phone that contains text, a single still image, and a hyperlink to the live video feed. Oh yeah, and the still image pops up on my smart watch too. Pretty awesome.

One quick note -- my original goal was to have 2-way audio. My plan was to use UV4L, which is a video conferencing application for the Raspberry Pi. It has a RESTfulAPI to leverage the audio and video features into your own project, but this proved to be far too difficult for my limited skills. In the future, I would like to use a PAM8403 stereo amplifier, 8 ohm 2 watt mini speakers, and a mini USB mic on the Pi to set this up. Bo from ameriDroid did a few videos about hacking together an ODROID Audio Adapter with the amp and speaker into a very small package. The Smoothcam case I chose from ameriDroid has just enough room inside for the extra devices when paired with the smaller Pi 3A+.

Assuming most readers know the basics, I’ll get right to configuring MotionEyeOS. MotionEye is a labor of love from a single developer, and it serves as a webpage GUI for configuring the Motion Project (which otherwise is all command line). Even with the GUI, Motion was still a pain to install on a Pi back in the day, so MotionEyeOS rolled it all into a single OS that can be burned to the SD card with Etcher. The only issue I had seemed to involve the lack of an Ethernet port on the Pi3A+. The bootup would stop unless I had my USB Ethernet dongle plugged in. Other than that, the instructions in the project’s wiki are straightforward, so getting going is pain free. You can see a little bit of the system configuration webpage on the video I made about the project.

I mentioned IFTTT above. The beauty of IFTTT is their mobile application. When making your own applet, use the “Webhooks” service as the first step. You’ll get a unique URL that third-party apps, in this case the OS, will contact, triggering an IFTTT event. The mobile app allows you to customize notifications on your device, so I included a still shot and a link to the live video feed. The result feels far more professional than most “roll your own“ solutions. And like I said, having the still image pop up on my Apple Watch makes it feel that much more awesome!

Editor's Note: This same project could be done with other SBCs as well, but would require more work to install and setup the necessary software.

Demo video

 

Some Handy Links

 

Previous article More SONOFF Zigbee products available!

Leave a comment

Comments must be approved before appearing

* Required fields

x