-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create CONTRIBUTING.md * key/val pair definitions, fix #55
- Loading branch information
1 parent
5e1ec6f
commit e2dfb77
Showing
5 changed files
with
165 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Basic HTTP Commands; | ||
It's an API Jim, but not as we know it | ||
|
||
The WebUI and camera server communicate entirely via HTTP requests and responses; this makes controlling all functions of the camera via GET requests possible. An API in effect. | ||
|
||
## URI's | ||
### Http Port | ||
* `/` - Default index | ||
* `/?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> | ||
* `/dump` - Status page | ||
|
||
### Stream Port | ||
* `/` - Raw stream | ||
* `/view` - Stream viewer | ||
|
||
## *key / val* settings and commands | ||
|
||
Call the `/status` URI to recieve a JSON response containing all the available settings and current value. | ||
|
||
Call `/control?var=<key>&val=<val>` with a settings key and value to set camera properties or trigger actions. | ||
|
||
#### Settings | ||
``` | ||
lamp - Lamp value in percent; integer, 0 - 100 (-1 = disabled) | ||
framesize - 0=QQVGA, 3=HQVGA, QVGA=4, CIF=5, VGA=6, SVGA=7, XGA=8, SXGA=9, UXGA=10, QXGA(ov3660)=11 | ||
quality - 10 to 63 (ov3660: 4 to 10) | ||
contrast - -2 to 2 (ov3660: -3 to 3) | ||
brightness - -2 to 2 (ov3660: -3 to 3) | ||
saturation - -2 to 2 (ov3660: -4 to 4) | ||
sharpness - (ov3660: -3 to 3) | ||
denoise - (ov3660: 0 to 8) | ||
ae_level - (ov3660: -5 to 5) | ||
special_effect - 0=No Effect, 1=Negative, 2=Grayscale, 3=Red Tint, 4=Green Tint, 5=Blue Tint, 6=Sepia | ||
awb - 0 = disable, 1 = enable | ||
awb_gain - 0 = disable, 1 = enable | ||
wb_mode - if awb enabled: 0=Auto, 1=Sunny, 2=Cloudy, 3=Office, 4=Home | ||
aec - 0 = disable, 1 = enable | ||
aec_value - 0 to 1200 (ov3660: 0 to 1536) | ||
aec2 - 0 = disable, 1 = enable | ||
ae_level - -2 to 2 (not ov3660) | ||
agc - 0 = disable, 1 = enable | ||
agc_gain - 0 to 30 (ov3660: 0 to 64) | ||
gainceiling - 0 to 6 (ov3660: 0 to 511) | ||
bpc - 0 = disable, 1 = enable | ||
wpc - 0 = disable, 1 = enable | ||
raw_gma - 0 = disable, 1 = enable | ||
lenc - 0 = disable, 1 = enable | ||
hmirror - 0 = disable, 1 = enable | ||
vflip - 0 = disable, 1 = enable | ||
rotate - Rotation Angle; integer, only -90, 0, 90 values are recognised | ||
dcw - 0 = disable, 1 = enable | ||
colorbar - Overlays a color test pattern on the stream; integer, 1 = enabled | ||
face_detect - Face Detection; 1 = enabled, Only settable if framesize <= 4 (CIF) | ||
face_recognize - Face recognition; 1 = enabled, only settable if Face detection is already enabled | ||
``` | ||
#### Read Only | ||
These values are returned in the `/status` JSON response, but cannot be set via the `/control` URI. | ||
``` | ||
cam_name - Camera Name; String | ||
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. | ||
``` | ||
face_enroll - Enroll a new face in the FaceDB (only when face recognition is avctive) | ||
save_prefs - Saves preferences file | ||
clear_prefs - Deletes the preferences file | ||
reboot - Reboots the camera | ||
``` | ||
## Examples | ||
* Flash light: on/off | ||
* `http://<IP-ADDRESS>/control?var=lamp&val=100` On | ||
* `http://<IP-ADDRESS>/control?var=lamp&val=50` 50% | ||
* `http://<IP-ADDRESS>/control?var=lamp&val=0` Off | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Contributing to ESP32-CAM revisited | ||
I love your input! and want to make contributing to this project as easy and transparent as possible, whether it's: | ||
|
||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features | ||
- Becoming a maintainer | ||
|
||
## I Develop with Github | ||
I use github to host code, to track issues and feature requests, as well as accept pull requests. | ||
|
||
## I Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests | ||
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: | ||
|
||
1. Fork the repo and create your branch from `master`. | ||
2. Give your branch a clear descriptive name and do your changes there. | ||
3. If you've changed the HTTP APIs, update the documentation. | ||
4. Issue a pull request against a branch *of the same name* in the main repo. | ||
5. Clearly describe your changes and the reason for them in the pull request. | ||
|
||
## Any contributions you make will be under the GNU Lesser General Public License v2.1 | ||
In short, when you submit code changes, your submissions are understood to be under the same [License](./LICENSE) that covers the project. | ||
|
||
## Report bugs using Github's [issues](https://github.com/easytarget/esp32-cam-webserver/issues) | ||
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy! | ||
|
||
## Write bug reports with detail, background, and sample code | ||
|
||
**Great Bug Reports** tend to have: | ||
|
||
- A quick summary and/or background | ||
- Steps to reproduce | ||
- Be specific! | ||
- What you expected would happen | ||
- What actually happens | ||
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) | ||
|
||
People *love* thorough bug reports. I'm not even kidding. | ||
|
||
## Use a Consistent Coding Style | ||
* 4 spaces for indentation rather than tabs in the main code | ||
|
||
## License | ||
By contributing, you agree that your contributions will be licensed under its GNU Lesser General Public License v2.1 | ||
|
||
|
||
## References | ||
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters