- Python 80.9%
- Dockerfile 13.7%
- HTML 2.7%
- Shell 2.7%
|
|
||
|---|---|---|
| .woodpecker | Updated Dockerfile; deleted woodpecker files | |
| .flake8 | Dateien hochladen nach „" | |
| docker-compose.yml | „docker-compose.yml" ändern | |
| Dockerfile | „Dockerfile" ändern | |
| index.html | initial code base | |
| LICENSE | Initial commit | |
| ntfy.py | Publish text and image to ntfy client | |
| pyapp.py | Updated readme | |
| pycam.jpg | Dateien hochladen nach „" | |
| pycam.sh | „pycam.sh" ändern | |
| README.md | Updated readme | |
| requirements.txt | Updated requirements.txt and Readme | |
| utils.py | Utils fore reading and writing to a json file | |
PyCam
PyCam is a Python script to be deployed on a Raspberry Pi for reading a Raspberry Pi camera and stream a image to a URL. The image is embedded into a html website or can be viewed directly. The image stream can be read for example by FritzBox Fon integrated into a door bell system.
Codeberg CI is focusing on code quaility.
status-badge
How to deploy
Prepare the Raspberry Pi for accessing picam from Docker.
sudo nano /etc/udev/rules.d/99-camera.rules and insert the following content SUBSYSTEM=="vchiq",MODE="0666".
Activate the camera interface:
sudo raspi-config
-> 3 Interface Options Configure connections to peripherals
-> I1 Legacy Camera Enable/disable legacy camera support
-> yes
Clone the repository to you Raspberry Pi:
git clone https://codeberg.org/mat/pycam.git
sudo apt install python3-virtualenv
virtualenv ./venv_pycam
source venv_pycam/bin/activate
pip install -r requirements.txt
cd pycam
python3 pyapp.py
Navigate to the devices IP address and the port 5000, e.g. http://192.168.178.10:5000/, to open the welcome site
and open http://192.168.178.10:5000/image to receive an image.
Install Docker and Docker-compose (not working for now on Raspberry Pi)
curl -fsSL https://get.Docker.com -o get-Docker.sh sudo sh get-Docker.sh
sudo usermod -aG docker $USER newgrp docker
sudo apt install docker-compose
Clone the repository to you Raspberry Pi:
git clone https://codeberg.org/mat/pycam.git
Build the Dockerfile with:
docker build -t pycam .
Start the application from your directory:
docker-compose up