Giter Club home page Giter Club logo

camera-clock-wireguard's Introduction

Camera-Clock-Wireguard

Objective: I want a have a IR camera using Motioneye and an Adafruit 1.2" clock connected to one Ras Pi Zero W. OS: Bullseye 32bit Disclaimer: I found that sometimes some of the updates / upgrades eventually timed out so I had to repeat them. You need to keep an eye out for this.

Wiring - https://hackster.imgix.net/uploads/attachments/408336/pyowmclock_breadboard_wWTN3jzSar.png?auto=compress%2Cformat&w=740&h=555&fit=max Note I didn't bother with the temp sensor.

Clock First

  sudo apt-get update && sudo apt-get upgrade -y
  sudo apt-get install ntp
  sudo apt-get install python3-pip -y
  sudo apt-get install python3-pil -y
  sudo pip3 install --upgrade setuptools
  sudo pip3 install adafruit-circuitpython-ht16k33

Download the above scripts and check it out

All the clock info and wiring can be found here: https://learn.adafruit.com/adafruit-led-backpack/1-2-inch-7-segment-backpack Then I made it a service by following this: https://medium.com/codex/setup-a-python-script-as-a-service-through-systemctl-systemd-f0cc55a42267

Before you head off to the Camera - There's a bit more:

NTP

Edit this file

  /etc/ntp.conf

I added:

  pool 0.uk.pool.ntp.org iburst
  pool 1.uk.pool.ntp.org iburst
  pool 2.uk.pool.ntp.org iburst
  pool 3.uk.pool.ntp.org iburst

Restart the service and check its running with:

  sudo service ntp restart
  sudo service ntp status

Camera Second

Based on this: https://github.com/motioneye-project/motioneye/wiki/Install-on-Raspbian-Bullseye As i said earlier - this is for a ras pi zero so is a 32bit OS, the above link has the 64bit version

   sudo -i
   apt-get install ffmpeg libmariadb3 libpq5 libmicrohttpd12 -y
   wget https://github.com/Motion-Project/motion/releases/download/release-4.3.2/pi_buster_motion_4.3.2-1_armhf.deb 
   dpkg -i pi_buster_motion_4.3.2-1_armhf.deb 
   systemctl stop motion
   systemctl disable motion 

The next block has to be entered one at a time. No exceptions.

  apt-get install python2 python-dev-is-python2 -y

  curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py

  python2 get-pip.py

  apt-get install libssl-dev libcurl4-openssl-dev libjpeg-dev zlib1g-dev -y
  pip2 install motioneye
  mkdir -p /etc/motioneye
  cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
  mkdir -p /var/lib/motioneye
  cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
  systemctl daemon-reload
  systemctl enable motioneye
  systemctl start motioneye

note: If pillow installation fails (hangs and ends at 99%), you can install it from official repos using apt-get install python-pil -y and rerun pip2 install motioneye

Unable to load video resource

  sudo vi cat /etc/motioneye/motion.conf

On the last line add input -1

  sudo vi cat /etc/motioneye/camera-1.conf

Find videodevice /dev/video10 note it could be any number really. Change it to: videodevice /dev/video0

  sudo service motion restart

Now to remotely manage the device(s)

camera-clock-wireguard's People

Contributors

s2owl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.