GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Bakhtaki/camp: A websocket-powered raspberry pi camera webserver

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
img
img
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
client.js
client.js
 
 
favicon.ico
favicon.ico
 
 
index.html
index.html
 
 
login.html
login.html
 
 
password.txt
password.txt
 
 
server.py
server.py
 
 
style.css
style.css
 
 

Repository files navigation

camp

Another Raspberry Pi camera webserver.

What it does

Hosts a website where you can view your webcam in real time.

Why I wrote it

There are a lot of tutorials out there on how to turn your pi into a webcam server. Most of them involve installing motion, which works great in many use cases. However, I wanted something simpler. Namely, I wanted:

  • Minimal configuration
  • Password protection
  • One-way streaming
  • Easily customizable webpage
  • Extensible server

camp does just this. Nothing else. This (hopefully) makes it the simplest and fastest option out there.

Installation

Camp uses tornado to create a web server. It can interact with the Pi camera with the aptly named picamera module, or it can use USB webcams with opencv and Pillow. The command below installs both sets of dependencies.

sudo apt-get install python-dev python-pip python-opencv libjpeg-dev
sudo pip install tornado Pillow picamera

Once the dependencies are installed on your pi, you can clone this repository and run the server.

git clone https://github.com/patrickfuller/camp.git
python camp/server.py

Navigate to http://your.r.pi.ip:8000 and check out your webcam.

USB Camera

Use with python server.py --use-usb.

Password

With the --require-login flag, camp will open a login page before allowing webcam access.

The default password is "raspberry". In order to change it, run this in your camp directory:

python -c "import hashlib; import getpass; print(hashlib.sha512(getpass.getpass())).hexdigest()" > password.txt

This will prompt you for a password, encrypt it, and save the result in password.txt.

Note that this level of password protection is basic - it's fine for keeping the occasional stranger out, but won't stand up to targeted hacking.

Run on startup

It's nice to have your pi start camp whenever it turns on. Let's make that happen. Type sudo nano /etc/rc.local to open this file for editing, and add the line nohup python /home/pi/camp/server.py & before the last line. Note that you may need to change the path (/home/pi/camp/server.py) to point to the right file.

Customization

The website consists of index.html, login.html, and style.css. These can be edited to change the look of camp.

If you want to add in extra functionality, edit client.js and server.py. The client should send a request to the server, which will then cause the server to do something.

If you want to add in extra camera features, opencv comes with a lot of useful computer vision algorithms. Check out its functionality before writing your own.

About

A websocket-powered raspberry pi camera webserver

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.