Sign inSign up

misalcedo/picam-stream

By misalcedo

•Updated over 7 years ago

The camera feed streaming component.

Image
0

615

misalcedo/picam-stream repository overview

⁠picam

A raspberry pi-powered home camera

⁠Prerequisites

  • A DNS name with Google Domains
  • A TLS certificate with Let's Encrypt
  • A Rapsberry Pi
  • A Raspberry Pi camera
  • An internet connection
  • A client_secret.json file from Google Developer APIs⁠ for OATH 2.0 authentication.
  • Create user.env with a space-delimited list of allowed e-mail addresses.
  • Create .env file with values for the environment variables in docker-compose.yml.

⁠Installation

  1. Clone the git repo into the desired host.
  2. Run bin/setup from a shell to install Debian packages and create a virtual environment for Python3.
  3. Run bin/dependencies from a shell to install python dependcies in your virtual environment.
  4. Run bin/dns with the desired USERNAME, PASSWORD, SUB_DOMAIN, and DOMAIN in Google Domains to schedule a CRON job that updates DNS with your dynamic IP address.
  5. Follow the instructions on Let's Encrypt⁠ to create a TLS certificate.
  6. Run bin/cert from a shell to schedule a CRON that renews the TLS certificates.
  7. Run bin/copy-cert to copy the certificates for your domain into the repo root.
    1. Run bin/generate-cert to create a self-signed TLS certificate in the repo root.
  8. Run bin/run to execute the camera.
    1. Or run TAG=<TAG> bin/docker-compose up, where <TAG> is one of: x86, pi3, zero.

⁠Build

To build the images run: TAG=build bin/docker-compose build x86 zero pi3 from the root of the repo. Then, run TAG=build bin/docker-compose push x86 zero pi3 to publish the images to Docker Hub.

⁠Assumptions

The bin/copy-cert script assumes that the Raspberry Pi's OS is Hypriot (it uses chown for the default hypriot user name). When exposing your Pi to the Internet, make sure to change the password from the default for the pirate user.

⁠References

Tag summary

Content type

Image

Digest

Size

6.1 MB

Last updated

over 7 years ago

docker pull misalcedo/picam-stream