Doc update step 1

This commit is contained in:
Owen 2020-10-14 13:16:05 +02:00
parent 7f27938379
commit 9c70f59de4
3 changed files with 44 additions and 60 deletions

73
API.md
View File

@ -11,52 +11,55 @@ The WebUI and camera server communicate entirely via HTTP requests and responses
## URI's
### Http Port
* `/` - Default index
* `/?target=full|simple|portal - Go direct to specific 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
* `/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
* `/` - Raw stream
* `/view` - Stream viewer
## *key / val* settings and commands
### Use
Call the `/status` URI to recieve a JSON response containing all the available settings and responses.
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
```
framesize - QQVGA|HQVGA|QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA|QXGA(ov3660)
quality - 10 ro 63
contrast - -2 to 2
brightness - -2 to 2
saturation - -2 to 2
gainceiling - 0 to 6
colorbar - Overlays a color test pattern on the stream; integer, 1 = enabled
awb - 0 = disable , 1 = enable
agc - 0 = disable , 1 = enable
aec - 0 = disable , 1 = enable
hmirror - 0 = disable , 1 = enable
vflip - 0 = disable , 1 = enable
awb_gain -
agc_gain - 0 to 30
aec_value - 0 to 1200
aec2 - 0 = disable , 1 = enable
dcw - 0 = disable , 1 = enable
bpc - 0 = disable , 1 = enable
wpc - 0 = disable , 1 = enable
raw_gma - 0 = disable , 1 = enable
lenc - 0 = disable , 1 = enable
special_effect - 0 - No Effect, 1 - Negative, 2 - Grayscale, 3 - Red Tint, 4 - Green Tint, 5 - Blue Tint, 6 - Sepia
wb_mode - if awb enabled: 0 - Auto, 1 - Sunny, 2 - Cloudy, 3 - Office, 4 - Home
ae_level - -2 to 2
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
lamp - Lamp value in percent; integer, 0 - 100 (-1 = disabled)
```
#### Read Only
These values are returned in the `/status` JSON response, but cannot be set via the `/control` URI.
@ -78,7 +81,3 @@ reboot - Reboots the camera
* `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
## Timelapse Example (for Linux Users)
* Install ffmpeg
* `Work this out... I've got an example somewhere`

View File

@ -14,9 +14,10 @@ I use github to host code, to track issues and feature requests, as well as acce
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. If you've changed the HTTP APIs, update the documentation.
3. Ensure the test suite passes.
4. Issue that pull request!
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.
@ -38,7 +39,7 @@ We use GitHub issues to track public bugs. Report a bug by opening a new issue;
People *love* thorough bug reports. I'm not even kidding.
## Use a Consistent Coding Style
* 4 spaces for indentation rather than tabs
* 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

View File

@ -57,14 +57,11 @@ By default the sketch assumes you have an AI-THINKER board, it creates an Access
To make a permanent config for a different board, or with your home wifi settings etc. copy (or rename) the file `myconfig.sample.h` in the sketch folder to `myconfig.h`
Additional boot-time changes to other camera properties can be made in the main sketch file; see the comments [around line 253](https://github.com/easytarget/esp32-cam-webserver/blob/doc-options/esp32-cam-webserver.ino#L253).
You can now set a camera name, board model, wifi settings and some other defaults in that file. And because this is your private copy it will not get overwritten if you update the main sketch!
### Programming
Assuming you are using the latest Espressif Arduino core the AI-THINKER board (or whatever you use) will appear in the ESP32 Arduino section of the boards list.
![IDE board config](Docs/board-selection-small.png)
Compile and upload the code from the IDE, when the `Connecting...` appears in the console reboot the ESP32 module while keeping **GPIO0** grounded. You can release GPO0 once the sketch is uploading, most boards have a 'boot' button to trigger a reboot.
@ -77,8 +74,6 @@ Go to the URL given in the serial output, the web UI should appear with the sett
## My Modifications:
The basic example is extended to allow control of a high power LED FlashLamps, which are present on my modules. It can also blink a status LED to show when it connects to WiFi.
The WiFi details can be stored in an (optional) header file to allow easier code development, and a camera name for the UI title can be configured. The lamp and status LED's are optional, and the lamp uses a exponential scale for brightness so that the control has some finess.
The compressed and binary encoded HTML used in the example has been unpacked to raw text, this makes it much easier to access and modify the Javascript and UI elements. Given the relatively small size of the index page there is very little benefit from compressing it.
@ -101,11 +96,7 @@ I would also like to shoutout to @jmfloyd; who suggested rotating the image in t
## Contributing
Contributions are welcome!
To make a PR please first fork the repo in github, and make a branch in that fork with a sensible name. Apply your changes to that branch (and test if you can), commit and then create a PR to merge to a branch of the same name in my repo.
Please do not submit PR's onto the master branch of my repo unless they are very trivial (spellings etc). Make sure your changes are consistent with the style and purpose of the existing code; and provide a coherent explanation of what/why in the PR.
Contributions are welcome; please see the [Contribution guidelines](CONTRIBUTING.md).
## Plans
@ -117,19 +108,12 @@ V3 Options, UI and server enhancements;
* UI now shows stream links and build info
* Nearly Complete
V4 Preferences;
* Cam module preferences and face recognition Db saved between sessions in LittleFS (formerly SPIFS).
* Upload/Download FaceDB as Json document in browser
V4 Remove face recognition entirely;
* Dont try to make it optional, this is a code and maintenance nightmare. V3 can be maintained on a branch for those who need it.
* Investigate using SD card to capture images
* Not started; will have to wait until I have time.
V5 Remove face recognition entirely;
* Dont try to make it optional, this is a code and maintenance nightmare. V4 can be maintained on a branch for those who need it.
* implement OTA and a better network stack for remembering multiple AP's, auto-config etc.
* UI Skinning/Theming
You can check the [enhancement list](https://github.com/easytarget/esp32-cam-webserver/issues?q=is%3Aissue+label%3Aenhancement) (past and present), and add any thoghts you may have there. Things that have occurred to me are, in no particular order:
* Improve Wifi, add a captive portal for setup and fallback, better disconnect/reconnect behaviour.
* The module has a SD/TF card slot; this is currently unused, but I would like to add the ability to store snapshots; recording Video at low resolution may be possible, but the card interface is too slow for HD video as far as I know.
* Remove face rcognition to save a Mb+ of code space and then implement over the air updates.
* Combine current split html pages (one per camera type) into one which adapts as needed.