Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 2.03 KB

README.md

File metadata and controls

65 lines (42 loc) · 2.03 KB

A small solution for motion registration. Based on Raspberry PI 4 and appropriate DIY components.

Brief explanation: When PIR sensor registers any motion, the script logic is checking the status of the owner (is he at home?), and then, if the owner is not at home, noIR camera takes a shot and send it to telegram. In case when the owner is at home, the camera doesn't take a shot, also PIR sensor pauses for 10 seconds.

Example of notification telegram message:

This solution is one part of the personal smart home idea that runs on the Raspberry PI board(s).

Features

Hardware

Scheme of connection

Software

  • GPIO manage via library - gpiozero
  • Script configuration parameters in data.yaml
  • Script works with Python 3.7 and higher
  • Database for owner status here

Main logic:

Installation

  • Clone or download project from github.

  • Create and activate special venv for project:

    $ cd rpi_pirsensor_camera_telegram/
    $ python3.7 -m venv venv
    $ source venv/bin/activate
  • Install required packets to the venv:

    (venv) $ pip install -U pip setuptools wheel
    (venv) $ pip install -r requirements.txt
  • Start the script:

    (venv) $ python main.py
  • Alternative variant of starting:

    $ ./main.py