feat: Implement server-managed camera settings with new API endpoints, client-side application, and updated documentation.
This commit is contained in:
@@ -76,6 +76,58 @@ VIDEO_DEVICE="/dev/video0"
|
||||
./capture-upload.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Camera Settings (Focus & Exposure)
|
||||
|
||||
Camera settings are stored on the PicUpper server and applied before each capture.
|
||||
|
||||
### Set camera settings via API
|
||||
|
||||
```bash
|
||||
# Set focus and exposure for your camera
|
||||
curl -X PUT \
|
||||
-H "X-API-Key: your-api-key" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"focus_automatic_continuous": 0,
|
||||
"focus_absolute": 30,
|
||||
"exposure_auto": 1,
|
||||
"exposure_absolute": 200,
|
||||
"brightness": 0,
|
||||
"contrast": 32
|
||||
}' \
|
||||
https://dev.seedheads.de/picUploadApi/settings/rpi-webcam-1
|
||||
```
|
||||
|
||||
### Get current settings
|
||||
|
||||
```bash
|
||||
curl -H "X-API-Key: your-api-key" \
|
||||
https://dev.seedheads.de/picUploadApi/settings/rpi-webcam-1
|
||||
```
|
||||
|
||||
### Available settings (for Logitech C922)
|
||||
|
||||
| Setting | Range | Description |
|
||||
|---------|-------|-------------|
|
||||
| `focus_automatic_continuous` | 0-1 | 0=manual, 1=auto |
|
||||
| `focus_absolute` | 0-255 | Lower=closer (manual mode) |
|
||||
| `exposure_auto` | 1-3 | 1=manual, 3=auto |
|
||||
| `exposure_absolute` | 3-2047 | Shutter speed (manual mode) |
|
||||
| `brightness` | -64 to 64 | Image brightness |
|
||||
| `contrast` | 0-64 | Image contrast |
|
||||
|
||||
### Find your camera's available controls
|
||||
|
||||
```bash
|
||||
v4l2-ctl -d /dev/video0 --list-ctrls
|
||||
```
|
||||
|
||||
**Note:** Install `v4l-utils` on the Pi: `sudo apt install v4l-utils`
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Check if webcam is detected
|
||||
|
||||
Reference in New Issue
Block a user