Skip to content

Commit 2e98e1f

Browse files
committed
version 5.0 beta 2
1 parent cbf96d1 commit 2e98e1f

10 files changed

+240
-136
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.pio
66
.vscode
77
.DS_Store
8+
.idea
89
*.code-workspace
910
/data/conn.json
1011
/data/cam.json

API.md

+20-24
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
# 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.
34

45
## URI's
5-
### Http Port
6-
* `/` - Default index (portal)
6+
### Web UI pages
7+
* `/` or `/portal` - Default index (portal)
78
* `/view?mode=full|simple|stream|still` - Go direct to specific page:
89
* - full: taking still and video with complete set of camera controls
910
* - simple: taking still and video with limited set of camera controls
1011
* - stream: starting video capture with full screen mode
1112
* - 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)
1614

15+
### Special *key / val* settings and commands
1716

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
1920

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:
2522
```
2623
lamp - Lamp value in percent; integer, 0 - 100 (-1 = disabled)
2724
framesize - See below
@@ -56,13 +53,7 @@ colorbar - Overlays a color test pattern on the stream; integer, 1 = enab
5653
face_detect - Face Detection; 1 = enabled, Only settable if framesize <= 4 (CIF)
5754
face_recognize - Face recognition; 1 = enabled, only settable if Face detection is already enabled
5855
```
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+
6657
##### Framesize values
6758
These may vary between different ESP framework releases
6859
```
@@ -82,13 +73,16 @@ Only for 3Mp+ camera modules:
8273
14 - FHD (1920x1080)
8374
17 - QXGA (2048x1536)
8475
```
76+
8577
#### 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)*.
8780
```
8881
save_prefs - Saves preferences file
8982
clear_prefs - Deletes the preferences file
90-
reboot - Reboots the camera
83+
reboot - Reboots the board
9184
```
85+
9286
## Examples
9387
* Flash light: on/mid/off
9488
* `http://<IP-ADDRESS>/control?var=lamp&val=100`
@@ -97,11 +91,13 @@ reboot - Reboots the camera
9791
* Set resolution to VGA
9892
* `http://<IP-ADDRESS>/control?var=framesize&val=8`
9993
* Show camera details and settings
100-
* 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.
10196
* `http://<IP-ADDRESS>/status`
10297
* Returns:
10398
``` {"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"}```
10499
* Reboot the camera
105100
* `http://<IP-ADDRESS>/control?var=reboot&val=0`
106101

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.

CONTRIBUTING.md

+19-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Contributing to ESP32-CAM revisited
2-
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:
34

45
- Reporting a bug
56
- Discussing the current state of the code
67
- Submitting a fix
78
- Proposing new features
89
- Becoming a maintainer
910

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.
1214

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:
1519

1620
1. Fork the repo and create your branch from `master`.
1721
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
2024
5. Clearly describe your changes and the reason for them in the pull request.
2125

2226
## 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.
2429

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!
2733

2834
## Write bug reports with detail, background, and sample code
2935

@@ -34,15 +40,16 @@ We use GitHub issues to track public bugs. Report a bug by opening a new issue;
3440
- Be specific!
3541
- What you expected would happen
3642
- 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+
4046

4147
## Use a Consistent Coding Style
4248
* 4 spaces for indentation rather than tabs in the main code
4349

4450
## 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
52+
Lesser General Public License v2.1
4653

4754

4855

0 commit comments

Comments
 (0)