This commit is contained in:
CaCO3
2025-03-15 22:28:53 +01:00
parent 8d5bdda7d2
commit 95cc4501ec
2 changed files with 18 additions and 17 deletions

View File

@@ -34,12 +34,12 @@ There are several ways to collect images from your device:
1. Use the Webhook to send the raw image on each round to a dedicated server, see [Webhook](../Webhook) resp. [../Parameter `UploadImg`](Parameters/#parameter-uploadimg).
1. Another option is to pull the images periodically from `http://<IP>/img_tmp/raw.jpg`. Eg. with an external service. Below is a (Linux)-Bash script to do it:
```bash
```Bash
#!/bin/bash
while [[ true ]]; do
echo "fetching value..."
wget -q http://192.168.1.151/value -O value.txt
value=`cat value.txt`
echo "Value: $value"
@@ -47,23 +47,24 @@ There are several ways to collect images from your device:
changed=$?
#echo "Diff: $diff"
if [[ $changed -ne 0 ]]; then
echo "Value changed:"
echo $diff
echo "fetching image..."
wget -q http://192.168.1.151/img_tmp/raw.jpg -O $value.jpg
else
echo "Value did not change, skipping image fetching!"
fi
if [[ $changed -ne 0 ]]; then
echo "Value changed:"
echo $diff
echo "fetching image..."
wget -q http://192.168.1.151/img_tmp/raw.jpg -O $value.jpg
else
echo "Value did not change, skipping image fetching!"
fi
cp value.txt value_previous.txt
cp value.txt value_previous.txt
echo "waiting 60s..."
sleep 60
done
```
echo "waiting 60s..."
sleep 60
done
```
## Use prepared images
See the selection below with prepared images.
Instead of recoding your own images, you can use one of the selections of prepared images below.
## How does it work
The Demo Mode tries to interfere as less as possible with the normal behavior. Whenever a Cam framebuffer gets taken (`esp_camera_fb_get()`), it replaces the framebuffer with the image from the SD card.