How to Build a Motion-Triggered Raspberry Pi Security Camera

Raspberry Pi Security Camera
(Image credit: Tom's Hardware)

Home security camera systems have exploded in popularity while decreasing in price over the past few years. For example, you could purchase a Ring Indoor Security Camera for around $60, but there are some drawbacks: first, vendors like Ring often charge a monthly fee to store your data and second, you might not want video and photos from inside your home being shared with a third party (in Ring’s case, Amazon) where strangers could potentially see them. 

MotionEyeOS, a free open-source application, allows you to turn a Raspberry Pi with a camera into a home video monitoring system, where the photos and videos can either stay on your device (and home network) or, if you choose, be uploaded automatically to a cloud-storage service such as Google Drive or Dropbox. 

Contributor

Caroline Dunn is a freelance writer for Tom's Hardware. Her expertise lies in covering Raspberry Pi projects, creating video tutorials, writing guides, and exploring other entertaining tech DIY initiatives.

  • jverner101
    I'm stuck on Step 13. Find your internal IP address on the Pi screen. The attached shows what's on the screen. Any suggestions? TIA
    Reply
  • Matt_ogu812
    jverner101 said:
    I'm stuck on Step 13. Find your internal IP address on the Pi screen. The attached shows what's on the screen. Any suggestions? TIA

    I see it's been a while since you posted this question which is rather unfortunate.
    I'm exploring this, so if I can answer your question at a later time as I get into this, I'll be happy to help you.
    Reply
  • namnam4
    dear all. we try to capture raw pictures with motioneye. therefor we wrote a script that works in the terminal but not when it is triggered by motioneeye. any suggestions. could it be done within the motioneye software itself?

    from picamera2 import Picamera2, Preview
    from libcamera import controls
    import subprocess
    import time
    from datetime import datetime
    from datetime import date

    subprocess.run("sudo", "systemctl", "stop", "motioneye"])

    time.sleep(1)
    print("now")

    dt = datetime.now().strftime("%Y-%m-%d_%H-%M-00Z")
    date= date.today()
    print(str(dt))

    picam2 = Picamera2()
    camera_config = picam2.create_still_configuration(main={"size": (1920, 1080)}, lores={"size": (640, 480)}, display="lores")
    picam2.configure(camera_config)
    picam2.start_preview(Preview.NULL)
    picam2.start()
    picam2.set_controls({"AfMode": controls.AfModeEnum.Auto})

    time.sleep(1)
    picam2.capture_file("/home/pi/Desktop/cam1/"+str(date)+"/"+str(dt)+".jpg")

    time.sleep(1)
    subprocess.run("sudo", "systemctl", "start", "motioneye"])
    quit()
    Reply
  • Jan12345678
    I have tried all to allow for ftp access but still have error 550 Requested action not taken. File unavailable (e.g., file not found, no access).
    It works with other cams on same ftp address and location on the server.
    What could still be wrong?
    Reply
  • alixcz
    Hi all,
    I have tricky problem
    I downloaded the correct platform 20201026 image and after uploading it to SD, my RPIs does not boot. Led Error reports "kernel.img not found". It's on the SD card! I tried everything. Different RPi, different SD card, differet different img (older 2020XXXXimg), recording SW, turn off antivirus on the home machine.... Another raspi OS img boots normally.
    Thanks for ideas.

    HW RPi3B+ and RPi3A+ (all original)
    SD Sandisk
    RPi Imager 1.8.5 + Rufus 4.15

    V.
    Reply