... | @@ -147,12 +147,31 @@ note: do not close the terminal window, let it run endlessly |
... | @@ -147,12 +147,31 @@ note: do not close the terminal window, let it run endlessly |
|
|
|
|
|
in case the window gets closed, just re-do step 1, 3, 9
|
|
in case the window gets closed, just re-do step 1, 3, 9
|
|
|
|
|
|
advanced: if you have more cameras, repeat these steps, and open
|
|
#### advanced camera scripts
|
|
more terminal windows (one per camera) fetching the unique camera
|
|
|
|
|
|
if you have more than one camera, repeat these steps with more
|
|
|
|
terminal windows (one per camera) fetching the unique camera
|
|
snapshot url. don't forget to change the `-O` parameter so that each
|
|
snapshot url. don't forget to change the `-O` parameter so that each
|
|
camera will be written to a different snapshot file e.g.
|
|
camera will be written to a different snapshot file e.g.
|
|
"`wget ... -O cam1.jpg`", "`wget ... -O cam2.jpg`", etc
|
|
"`wget ... -O cam1.jpg`", "`wget ... -O cam2.jpg`", etc
|
|
|
|
|
|
|
|
alternatively, you can also create a single file `.sh` like this:
|
|
|
|
|
|
|
|
```
|
|
|
|
wget <cam 1 snapshot url, as before> -O cam1.jpg
|
|
|
|
wget <cam 2 snapshot url, as before> -O cam2.jpg
|
|
|
|
wget <cam X snapshot url, as before> -O camX.jpg
|
|
|
|
sleep 3
|
|
|
|
./camera.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
lastly, if you don't like the `sleep 3` and `./camera.sh` line
|
|
|
|
that calls the file over and over again, you can also use the
|
|
|
|
`watch` command to schedule periodic running of the file
|
|
|
|
e.g. `watch -n 5 ./camera.sh` - note: it is beyond the scope
|
|
|
|
of this document to discuss usage of this command, but feel
|
|
|
|
free to try it out :)
|
|
|
|
|
|
### camera server - part 1: preparing the environment
|
|
### camera server - part 1: preparing the environment
|
|
|
|
|
|
we must install `php` on the raspberry pi so we can run a
|
|
we must install `php` on the raspberry pi so we can run a
|
... | | ... | |