Skip to content

Commit

Permalink
A bit more detail, some typos etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
easytarget authored Mar 20, 2021
1 parent df55d0e commit 71db7b9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The WebUI and camera server communicate entirely via HTTP requests and responses
* `/?target=full|simple|portal` - Go direct to specific index
* `/capture` - Return a Jpeg snapshot image
* `/status` - Returns a JSON string with all camera status <key>/<value> pairs listed
* `/control?var=<key>&val=<val>` - Set <key> to <val>
* `/control?var=<key>&val=<val>` - Set `<key>` to `<val>`
* `/dump` - Status page

### Stream Port
Expand Down Expand Up @@ -64,7 +64,7 @@ code_ver - Code compile date and time; String
stream_url - Raw stream URL; string
```
#### Commands
These are commands; they can be sent by calling the `/control` URI with them as the `<key>`, the `<val>` must be supplied, but can be any value and is ignored.
These are commands; they can be sent by calling the `/control` URI with them as the `<key>` *(a `<val>` must also be supplied, but can be any value and is ignored)*.
```
face_enroll - Enroll a new face in the FaceDB (only when face recognition is avctive)
save_prefs - Saves preferences file
Expand All @@ -77,10 +77,13 @@ reboot - Reboots the camera
* `http://<IP-ADDRESS>/control?var=lamp&val=50`
* `http://<IP-ADDRESS>/control?var=lamp&val=0`
* Set resolution to VGA
* `http://10.0.0.180/control?var=framesize&val=6`
* `http://<IP-ADDRESS>/control?var=framesize&val=6`
* Show camera details and settings
* All settings are returned via single `status` call in [JSON](https://www.json.org/) format.
* `http://<IP-ADDRESS>/status`
`{"lamp":0,"autolamp":0,"framesize":10,"quality":10,"brightness":0,"contrast":0,"saturation":0,"sharpness":0,"special_effect":0,"wb_mode":0,"awb":1,"awb_gain":1,"aec":1,"aec2":0,"ae_level":0,"aec_value":168,"agc":1,"agc_gain":0,"gainceiling":0,"bpc":0,"wpc":1,"raw_gma":1,"lenc":1,"vflip":0,"hmirror":0,"dcw":1,"colorbar":0,"face_detect":0,"face_enroll":0,"face_recognize":0,"cam_name":"General","code_ver":"Mar 6 2021 @ 17:54:00","rotate":"0","stream_url":"http://10.0.0.190:81/"}`
* Returns:
``` {"lamp":0,"autolamp":0,"framesize":10,"quality":10,"brightness":0,"contrast":0,"saturation":0,"sharpness":0,"special_effect":0,"wb_mode":0,"awb":1,"awb_gain":1,"aec":1,"aec2":0,"ae_level":0,"aec_value":168,"agc":1,"agc_gain":0,"gainceiling":0,"bpc":0,"wpc":1,"raw_gma":1,"lenc":1,"vflip":0,"hmirror":0,"dcw":1,"colorbar":0,"face_detect":0,"face_enroll":0,"face_recognize":0,"cam_name":"General","code_ver":"Mar 6 2021 @ 17:54:00","rotate":"0","stream_url":"http://10.0.0.190:81/"}```
* Reboot the camera
* `http://<IP-ADDRESS>/control?var=reboot&val=0`

You can try these yourself in a browser address bar, from the commandline with `curl` and co. or use them programatically from your scripting language of choice.

0 comments on commit 71db7b9

Please sign in to comment.