https://github.com/hamdle/takepicture
Python/PHP scripts to take picture and post to web
https://github.com/hamdle/takepicture
Last synced: about 1 month ago
JSON representation
Python/PHP scripts to take picture and post to web
- Host: GitHub
- URL: https://github.com/hamdle/takepicture
- Owner: hamdle
- Created: 2024-07-20T17:40:30.000Z (almost 2 years ago)
- Default Branch: trunk
- Last Pushed: 2024-07-21T16:24:44.000Z (almost 2 years ago)
- Last Synced: 2025-02-28T16:40:55.574Z (over 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.txt
Awesome Lists containing this project
README
Requirements
------------
PHP
Python, Pip
Install
-------
$ pip install pygame
$ pip install opencv-python
Run
---
$ php run.php
$ php run.php /home/eric/repos/takepicture
$ php run.php /home/eric/repos/takepicture 3
Arg 1: Directory that holds takepicture python script.
Arg 2: Number of minutes between running python script.
RaspberryPi
-----------
Setup -- run script on boot. Reboot every 60 minutes to reset camera due to
Lenovo camera saturation bug.
1.
$ vim /etc/rc.local
Note: rc.local runs every time raspberrypi boots
2.
Current:
$ sh /home/eric/scripts/run.sh & sleep 60m; reboot
Should work, needs tested:
$ php /home/eric/repos/takepicture/run.php /home/eric/repos/takepicture & sleep & sleep 60m; reboot
Note: place before exit 0
TODO
----
- fix post data issue
- replace key with login token authentication
- make url configurable in .env file
- make id configurable in .env file
- write output to tmp file
- launch terminal and tail output file on startup