You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API.md
+20-24
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,24 @@
1
1
# Basic HTTP Commands;
2
-
The WebUI and camera server communicate entirely via HTTP requests and responses; this makes controlling all functions of the camera via GET requests possible.
2
+
The WebUI and camera server communicate entirely via HTTP requests and responses;
3
+
this makes controlling all functions of the camera via GET requests possible.
3
4
4
5
## URI's
5
-
### Http Port
6
-
*`/` - Default index (portal)
6
+
### Web UI pages
7
+
*`/`or `/portal`- Default index (portal)
7
8
*`/view?mode=full|simple|stream|still` - Go direct to specific page:
8
9
*- full: taking still and video with complete set of camera controls
9
10
*- simple: taking still and video with limited set of camera controls
10
11
*- stream: starting video capture with full screen mode
11
12
*- still: taking a still image with full screen mode
12
-
*`/status` - Returns a JSON string with all camera status <key>/<value> pairs listed
13
-
*`/control?var=<key>&val=<val>` - Set `<key>` to `<val>`
14
-
*`/dump` - Status page
15
-
*`/stop` - End all active streams
13
+
*`/dump` - Status page (automatically refreshed every 5 sec)
16
14
15
+
### Special *key / val* settings and commands
17
16
18
-
## *key / val* settings and commands
17
+
*`/control?var=<key>&val=<val>` - Set a Control Variable specified by `<key>` to `<val>`
18
+
*`/status` - JSON response containing camera settings
19
+
*`/system` - JSON response containing all parameters displayed on the `/dump` page
19
20
20
-
Call the `/status` URI to recieve a JSON response containing all the available settings and current value.
21
-
22
-
Call `/control?var=<key>&val=<val>` with a settings key and value to set camera properties or trigger actions.
23
-
24
-
#### Settings
21
+
#### Supported Control Variables:
25
22
```
26
23
lamp - Lamp value in percent; integer, 0 - 100 (-1 = disabled)
27
24
framesize - See below
@@ -56,13 +53,7 @@ colorbar - Overlays a color test pattern on the stream; integer, 1 = enab
56
53
face_detect - Face Detection; 1 = enabled, Only settable if framesize <= 4 (CIF)
57
54
face_recognize - Face recognition; 1 = enabled, only settable if Face detection is already enabled
58
55
```
59
-
#### Read Only
60
-
These values are returned in the `/status` JSON response, but cannot be set via the `/control` URI.
61
-
```
62
-
cam_name - Camera Name; String
63
-
code_ver - Code compile date and time; String
64
-
stream_url - Raw stream URL; string
65
-
```
56
+
66
57
##### Framesize values
67
58
These may vary between different ESP framework releases
68
59
```
@@ -82,13 +73,16 @@ Only for 3Mp+ camera modules:
82
73
14 - FHD (1920x1080)
83
74
17 - QXGA (2048x1536)
84
75
```
76
+
85
77
#### Commands
86
-
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)*.
78
+
These are commands; they can be sent by calling the `/control` URI with them as
79
+
the `<key>`*(a `<val>` must also be supplied, but can be any value and is ignored)*.
* All settings are returned via single `status` call in [JSON](https://www.json.org/) format.
94
+
* All settings are returned via single `status` call in [JSON](https://www.json.org/)
95
+
format.
101
96
*`http://<IP-ADDRESS>/status`
102
97
* Returns:
103
98
``` {"lamp":0,"autolamp":0,"frame_rate":0,"framesize":9,"quality":10,"xclk":8,"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":204,"agc":1,"agc_gain":0,"gainceiling":0,"bpc":0,"wpc":1,"raw_gma":1,"lenc":1,"vflip":1,"hmirror":1,"dcw":1,"colorbar":0,"cam_name":"ESP32 test camera","code_ver":"Mar 10 2022 @ 14:00:45","rotate":"0","stream_url":"ws://<IP-ADDRESS>/ws"}```
104
99
* Reboot the camera
105
100
*`http://<IP-ADDRESS>/control?var=reboot&val=0`
106
101
107
-
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.
102
+
You can try these yourself in a browser address bar, from the commandline with `curl`
103
+
and co. or use them programatically from your scripting language of choice.
I love your input! and want to make contributing to this project as easy and transparent as possible, whether it's:
2
+
We love your input and want to make contributing to this project as easy and transparent
3
+
as possible, whether it's:
3
4
4
5
- Reporting a bug
5
6
- Discussing the current state of the code
6
7
- Submitting a fix
7
8
- Proposing new features
8
9
- Becoming a maintainer
9
10
10
-
## I Develop with Github
11
-
I use github to host code, to track issues and feature requests, as well as accept pull requests.
11
+
## We Develop with Github
12
+
We use github to host code, to track issues and feature requests, as well as accept pull
13
+
requests.
12
14
13
-
## I Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
14
-
Pull requests are the best way to propose changes to the codebase (I use [Github Flow](https://guides.github.com/introduction/flow/index.html)). I actively welcome your pull requests:
15
+
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html)
16
+
So All Code Changes Happen Through Pull Requests. Pull requests are the best way to
17
+
propose changes to the codebase (use [Github Flow](https://guides.github.com/introduction/flow/index.html)).
18
+
We actively welcome your pull requests:
15
19
16
20
1. Fork the repo and create your branch from `master`.
17
21
2. Give your branch a clear descriptive name and do your changes there.
@@ -20,10 +24,12 @@ Pull requests are the best way to propose changes to the codebase (I use [Github
20
24
5. Clearly describe your changes and the reason for them in the pull request.
21
25
22
26
## Any contributions you make will be under the GNU Lesser General Public License v2.1
23
-
In short, when you submit code changes, your submissions are understood to be under the same [License](./LICENSE) that covers the project.
27
+
In short, when you submit code changes, your submissions are understood to be under
28
+
the same [License](./LICENSE) that covers the project.
24
29
25
-
## Report bugs using Github's [issues](https://github.com/abratchik/esp32-cam-webserver/issues)
26
-
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
30
+
## Report bugs using Github's issues
31
+
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that
32
+
easy!
27
33
28
34
## Write bug reports with detail, background, and sample code
29
35
@@ -34,15 +40,16 @@ We use GitHub issues to track public bugs. Report a bug by opening a new issue;
34
40
- Be specific!
35
41
- What you expected would happen
36
42
- What actually happens
37
-
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
38
-
39
-
People *love* thorough bug reports. I'm not even kidding.
43
+
- Notes (possibly including why you think this might be happening, or stuff you
44
+
tried that didn't work)
45
+
40
46
41
47
## Use a Consistent Coding Style
42
48
* 4 spaces for indentation rather than tabs in the main code
43
49
44
50
## License
45
-
By contributing, you agree that your contributions will be licensed under its GNU Lesser General Public License v2.1
51
+
By contributing, you agree that your contributions will be licensed under its GNU
0 commit comments