Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.27 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.27 KB

PiCam API

Simple Raspberry Pi Zero 2W Camera Flask REST-API and makes use of libcamera2

This project is still under development but works as POC!!!

This will be used with the Front_Door_Intercom_automation Github Porject to take a photo.

ToDo's:

  • rework code docu
  • create build and test pipelines
  • docu
  • unit tests

How to install

apt install libcap-dev libcap2-bin  libcap2

sudo apt install -y python3-libcamera python3-kms++
sudo apt install -y python3-prctl libatlas-base-dev ffmpeg libopenjp2-7
pip3 install numpy --upgrade
pip3 install picamera2

python3 -m venv --system-site-packages .venv

Further you can foolow the How to do a fresh installtion on RPi with code

System service setup

Edit file picam.service and adjust to your path ( ExecStart=/usr/local/bin/PiCam_API_2...... ).
To run fdia as a service on startup with root permissions
copy picam.serviceto /etc/systemd/system/to your RPi systemd deamon folder.
Run systemctl daemon-reload and systemctl start fdiato start it as a service.
Enable system service with systemctl enable picam.service.

How to run unit-tests

pytest --cov=./ --cov-report=html