All Projects → pageauc → picamera-motion

pageauc / picamera-motion

Licence: other
Raspberry Pi python PiCamera Lightweight Motion Detection. Includes easy curl script install/upgrade, whiptail admin menu system, single file web server and Rclone for uploading to a variety of web storage services.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to picamera-motion

Htmr
Simple and lightweight (< 2kB) HTML string to React element conversion library
Stars: ✭ 214 (+167.5%)
Mutual labels:  lightweight, simple
jpopup
Simple lightweight (<2kB) javascript popup modal plugin
Stars: ✭ 27 (-66.25%)
Mutual labels:  lightweight, simple
simple-jwt-provider
No description or website provided.
Stars: ✭ 33 (-58.75%)
Mutual labels:  lightweight, simple
Qtwebserver
Qt based web application server
Stars: ✭ 56 (-30%)
Mutual labels:  lightweight, webserver
khudro
Khudro is a very light weight web-server built with C.
Stars: ✭ 19 (-76.25%)
Mutual labels:  lightweight, webserver
Proxy.py
⚡⚡⚡Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging
Stars: ✭ 1,291 (+1513.75%)
Mutual labels:  lightweight, webserver
ytmous
Anonymous Youtube Proxy
Stars: ✭ 60 (-25%)
Mutual labels:  lightweight, simple
Wondercms
WonderCMS - fast and small flat file CMS (5 files)
Stars: ✭ 330 (+312.5%)
Mutual labels:  lightweight, simple
Hexo-Theme-MengD
A simple, lightweight Hexo theme(支持:pjax、discuss、twikoo、waline、valine评论)
Stars: ✭ 69 (-13.75%)
Mutual labels:  lightweight, simple
logger
☠ 😈 👀 Simple,Secure & Undetected (6.11.2017) keylogger for Windows :)
Stars: ✭ 37 (-53.75%)
Mutual labels:  lightweight, simple
Katwebx
An extremely fast static web server and reverse proxy for the modern web.
Stars: ✭ 39 (-51.25%)
Mutual labels:  lightweight, webserver
tb-grid
tb-grid is a super simple and lightweight 12 column responsive grid system utilizing css grid.
Stars: ✭ 19 (-76.25%)
Mutual labels:  lightweight, simple
Qview
Practical and minimal image viewer
Stars: ✭ 460 (+475%)
Mutual labels:  lightweight, simple
Bonsai
🌱 a tiny distro-independent package manager
Stars: ✭ 188 (+135%)
Mutual labels:  lightweight, simple
Embassy
Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux
Stars: ✭ 440 (+450%)
Mutual labels:  lightweight, webserver
hugoblog
Hugoblog is responsive, simple, and clean that would fit for your personal blog based on Hugo Theme Static Site Generator (SSG)
Stars: ✭ 48 (-40%)
Mutual labels:  lightweight, simple
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (+120%)
Mutual labels:  lightweight, simple
cli
a lightweight and simple cli package
Stars: ✭ 12 (-85%)
Mutual labels:  lightweight, simple
MatrixLib
Lightweight header-only matrix library (C++) for numerical optimization and machine learning. Contact me if there is an exciting opportunity.
Stars: ✭ 35 (-56.25%)
Mutual labels:  lightweight, simple
esp32 snow
esp32 evk
Stars: ✭ 74 (-7.5%)
Mutual labels:  webserver

Lightweight python Motion Detection

Description

Based on original code written by brainflakes and modified by pageauc user utpalc rewrote motion detection using picamera stream and pageauc modified this sample code to this example application This code uses the picamera python libraries rather than raspistill. Posted on Raspberry Pi forum under Lightweight Python Motion Detection Sample video posted at http://youtu.be/ZuHAfwZlzqY Code modified to exit image scanning loop as soon as the sensitivity value is exceeded. This speeds taking larger photo if motion detected early in scan Code is python3 compatible. This project is available on github at https://github.com/pageauc/picamera-motion

Note: This is sample code to assist development. For a full feature app see my pi-timolo GitHub repo at https://github.com/pageauc/pi-timolo

How To Install

Log in to RPI using putty ssh or raspberry pi console terminal session. Prior to install it is recommended you run

sudo apt-get update
sudo apt-get upgrade

Cut and Paste curl command below into RPI console/Putty SSH session.

curl -L https://raw.github.com/pageauc/picamera-motion/master/install.sh | bash

Press enter key to run the install.sh bash script. This will download files, install dependencies and change permissions as appropriate.

How To Test Run

cd ~/picamera-motion
./picamera-motion.py

Confirm camera and program motion detection per logging messages. Trouble shoot as required.

How to Run menubox.sh

Use menubox.sh menu picks to Edit settings.py as well as Start/Stop picamera-motion.py and/or webserver.py in Background as pi user. (when running PID will be displayed).

./menubox.sh

menubox main menu

How to View Images

Use menubox.sh to START webserver menu pick (PID will be displayed). This will run webserver.py as a pi user background task using default 8080 port per settings.py Access the web page from a LAN (Local Area Network) computer/device web browser per URL displayed by webserver menu pick message.

Example

http://192.168.1.150:8080

Replace ip address above with a valid entry for your system. Note multiple ip addresses may be displayed by menubox.sh message when you START webserver from menu pick To view web page image(s) select a link from right pane web page listing.

Webserver Browser Example

Use browser refresh to update listing. Auto refresh can be enabled in settings.py per

web_page_refresh_on = True
web_page_refresh_sec = "180"

Default refresh frequency is 180 seconds. You can change this as required. Note seconds value MUST be in quotes. See other webserver variables per comments.

How To Change Settings

You can edit setting using menubox.sh EDIT menu pick or edit settings.py using nano or python IDLE.

nano settings.py

ctrl x y to Save Changes and Exit nano

How to Run On Boot

To start picamera-motion and/or webserver on startup

sudo nano /etc/rc.local

Add the following as appropriate

su pi -c "/home/pi/picamera-motion/picamera-motion.sh start"
su pi -c "/home/pi/picamera-motion/webserver.sh start"

ctrl-x to exit and save changes

How to Upload Images

Rclone can upload images to a Remote Storage Service of your choice eg Google Drive, DropBox, Etc. For remote service name setup see wiki details.

To Run rclone sync (You Must have a Remote Service Name Configured)

./rclone-sync.sh

Review output for further details or trouble shooting

How to Automate Upload

Create a crontab entry to run rclone-sync.sh regularly

sudo crontab -e

Add/Edit the following entry. Will run every 5 minutes as pi user

*/5 * * * * su pi -c "/home/pi/picamera-motion/rclone-sync.sh" > /dev/null 2>&1

ctrl-x y to exit and save changes

That's it Please note this code is pretty basic but a good learning tool if you need to implement a simple python only motion detection application using the picamera python libraries.

Claude Pageau

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].