u
This commit is contained in:
47
README.md
47
README.md
@@ -162,7 +162,7 @@ curl -H "X-API-Key: your-secret-key" http://localhost:3080/stats/front-door
|
||||
GET /settings/:cameraId
|
||||
```
|
||||
|
||||
Get v4l2 camera settings (focus, exposure, etc.) for a camera.
|
||||
Get v4l2 camera settings (focus, exposure, etc.) for a camera. The camclient automatically registers available controls on first connection.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
@@ -173,13 +173,44 @@ curl -H "X-API-Key: your-secret-key" http://localhost:3080/settings/front-door
|
||||
```json
|
||||
{
|
||||
"cameraId": "front-door",
|
||||
"settings": {
|
||||
"focus_automatic_continuous": 0,
|
||||
"focus_absolute": 30,
|
||||
"exposure_auto": 1,
|
||||
"exposure_absolute": 200,
|
||||
"availableControls": [
|
||||
{"name": "brightness", "type": "int", "min": -64, "max": 64, "step": 1, "default": 0},
|
||||
{"name": "exposure_auto", "type": "menu", "min": 0, "max": 3, "default": 3, "options": {"1": "Manual Mode", "3": "Aperture Priority Mode"}}
|
||||
],
|
||||
"values": {
|
||||
"brightness": 10,
|
||||
"focus_absolute": 40
|
||||
},
|
||||
"config": {
|
||||
"rotation": null,
|
||||
"crop": null,
|
||||
"ocr": null,
|
||||
"chartLabel": null,
|
||||
"insertBrightnessToDb": false
|
||||
},
|
||||
"updatedAt": "2025-12-21T22:00:00.000Z",
|
||||
"updatedBy": "webcam1"
|
||||
}
|
||||
```
|
||||
|
||||
### Register Available Controls
|
||||
|
||||
```bash
|
||||
POST /settings/:cameraId/available
|
||||
```
|
||||
|
||||
Called by the camclient to register all available v4l2 controls with their metadata. The camclient parses `v4l2-ctl -L` output and reports the schema.
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"controls": [
|
||||
{"name": "brightness", "type": "int", "min": -64, "max": 64, "step": 1, "default": 0},
|
||||
{"name": "exposure_auto", "type": "menu", "options": {"1": "Manual", "3": "Auto"}, "default": 3}
|
||||
],
|
||||
"currentValues": {
|
||||
"brightness": 0,
|
||||
"contrast": 32
|
||||
"exposure_auto": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -190,7 +221,7 @@ curl -H "X-API-Key: your-secret-key" http://localhost:3080/settings/front-door
|
||||
PUT /settings/:cameraId
|
||||
```
|
||||
|
||||
Update camera settings. Settings are applied by the capture client via v4l2-ctl.
|
||||
Update camera v4l2 control values or config settings (rotation, crop, ocr). Settings are applied by the capture client via v4l2-ctl.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user