185 lines
10 KiB
HTML
185 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.3"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>ESP32 WebCam Server: Basic HTTP Commands;</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectlogo"><img alt="Logo" src="logo.svg"/></td>
|
|
<td id="projectalign">
|
|
<div id="projectname">ESP32 WebCam Server<span id="projectnumber"> 5.0</span>
|
|
</div>
|
|
<div id="projectbrief">Fully customizable WebCam server based on Espressif ESP32-based board with a camera.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.3 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div><div class="header">
|
|
<div class="headertitle"><div class="title">Basic HTTP Commands; </div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><p >The WebUI and camera server communicate entirely via HTTP requests and responses; this makes controlling all functions of the camera via GET requests possible.</p>
|
|
<h1><a class="anchor" id="autotoc_md1"></a>
|
|
URI's</h1>
|
|
<h2><a class="anchor" id="autotoc_md2"></a>
|
|
Web UI pages</h2>
|
|
<ul>
|
|
<li><code>/</code> or <code>/portal</code> - Default index (portal)</li>
|
|
<li><code>/view?mode=full|simple|stream|still</code> - Go direct to specific page:</li>
|
|
<li>- full: taking still and video with complete set of camera controls</li>
|
|
<li>- simple: taking still and video with limited set of camera controls</li>
|
|
<li>- stream: starting video capture with full screen mode</li>
|
|
<li>- still: taking a still image with full screen mode</li>
|
|
<li><code>/dump</code> - Status page (automatically refreshed every 5 sec)</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md3"></a>
|
|
Special <em>key / val</em> settings and commands</h2>
|
|
<ul>
|
|
<li><code>/control?var=<key>&val=<val></code> - Set a Control Variable specified by <code><key></code> to <code><val></code></li>
|
|
<li><code>/status</code> - JSON response containing camera settings</li>
|
|
<li><code>/system</code> - JSON response containing all parameters displayed on the <code>/dump</code> page</li>
|
|
</ul>
|
|
<h3><a class="anchor" id="autotoc_md4"></a>
|
|
Supported Control Variables:</h3>
|
|
<div class="fragment"><div class="line">lamp - Lamp value in percent; integer, 0 - 100 (-1 = disabled)</div>
|
|
<div class="line">framesize - See below</div>
|
|
<div class="line">frame_rate - Frame rate in FPS. Must be positive integer</div>
|
|
<div class="line">quality - 10 to 63 (ov3660: 4 to 10)</div>
|
|
<div class="line">contrast - -2 to 2 (ov3660: -3 to 3)</div>
|
|
<div class="line">brightness - -2 to 2 (ov3660: -3 to 3)</div>
|
|
<div class="line">saturation - -2 to 2 (ov3660: -4 to 4)</div>
|
|
<div class="line">sharpness - (ov3660: -3 to 3)</div>
|
|
<div class="line">denoise - (ov3660: 0 to 8)</div>
|
|
<div class="line">ae_level - (ov3660: -5 to 5)</div>
|
|
<div class="line">special_effect - 0=No Effect, 1=Negative, 2=Grayscale, 3=Red Tint, 4=Green Tint, 5=Blue Tint, 6=Sepia</div>
|
|
<div class="line">awb - 0 = disable, 1 = enable</div>
|
|
<div class="line">awb_gain - 0 = disable, 1 = enable</div>
|
|
<div class="line">wb_mode - if awb enabled: 0=Auto, 1=Sunny, 2=Cloudy, 3=Office, 4=Home</div>
|
|
<div class="line">aec - 0 = disable, 1 = enable</div>
|
|
<div class="line">aec_value - 0 to 1200 (ov3660: 0 to 1536)</div>
|
|
<div class="line">aec2 - 0 = disable, 1 = enable</div>
|
|
<div class="line">ae_level - -2 to 2 (not ov3660)</div>
|
|
<div class="line">agc - 0 = disable, 1 = enable</div>
|
|
<div class="line">agc_gain - 0 to 30 (ov3660: 0 to 64)</div>
|
|
<div class="line">gainceiling - 0 to 6 (ov3660: 0 to 511)</div>
|
|
<div class="line">bpc - 0 = disable, 1 = enable</div>
|
|
<div class="line">wpc - 0 = disable, 1 = enable</div>
|
|
<div class="line">raw_gma - 0 = disable, 1 = enable</div>
|
|
<div class="line">lenc - 0 = disable, 1 = enable</div>
|
|
<div class="line">hmirror - 0 = disable, 1 = enable</div>
|
|
<div class="line">vflip - 0 = disable, 1 = enable</div>
|
|
<div class="line">rotate - Rotation Angle; integer, only -90, 0, 90 values are recognised</div>
|
|
<div class="line">dcw - 0 = disable, 1 = enable</div>
|
|
<div class="line">colorbar - Overlays a color test pattern on the stream; integer, 1 = enabled</div>
|
|
<div class="line">face_detect - Face Detection; 1 = enabled, Only settable if framesize <= 4 (CIF)</div>
|
|
<div class="line">face_recognize - Face recognition; 1 = enabled, only settable if Face detection is already enabled</div>
|
|
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md5"></a>
|
|
Framesize values</h4>
|
|
<p >These may vary between different ESP framework releases </p><div class="fragment"><div class="line"> 0 - THUMB (96x96)</div>
|
|
<div class="line"> 1 - QQVGA (160x120)</div>
|
|
<div class="line"> 3 - HQVGA (240x176)</div>
|
|
<div class="line"> 5 - QVGA (320x240)</div>
|
|
<div class="line"> 6 - CIF (400x296)</div>
|
|
<div class="line"> 7 - HVGA (480x320)</div>
|
|
<div class="line"> 8 - VGA (640x480)</div>
|
|
<div class="line"> 9 - SVGA (800x600)</div>
|
|
<div class="line">10 - XGA (1024x768)</div>
|
|
<div class="line">11 - HD (1280x720)</div>
|
|
<div class="line">12 - SXGA (1280x1024)</div>
|
|
<div class="line">13 - UXGA (1600x1200)</div>
|
|
<div class="line">Only for 3Mp+ camera modules:</div>
|
|
<div class="line">14 - FHD (1920x1080)</div>
|
|
<div class="line">17 - QXGA (2048x1536)</div>
|
|
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md6"></a>
|
|
Commands</h3>
|
|
<p >These are commands; they can be sent by calling the <code>/control</code> URI with them as the <code><key></code> parameter. </p><div class="fragment"><div class="line">* save_prefs - Saves preferences</div>
|
|
<div class="line"> `val=cam` or not specified will save camera preferences</div>
|
|
<div class="line"> `val=conn` will save network preferences</div>
|
|
<div class="line">* clear_prefs - Deletes camera the preferences</div>
|
|
<div class="line"> `val=cam` or not specified will reset camera preferences</div>
|
|
<div class="line"> `val=conn` will reset network preferences. Attention! after this the server will boot as access point after restart, and all</div>
|
|
<div class="line"> connection settings will be lost. </div>
|
|
<div class="line">* reboot - Reboots the board</div>
|
|
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md7"></a>
|
|
Examples</h1>
|
|
<ul>
|
|
<li>Flash light: on/mid/off<ul>
|
|
<li><code><a href="http://">http://</a><IP-ADDRESS>/control?var=lamp&val=100</code></li>
|
|
<li><code><a href="http://">http://</a><IP-ADDRESS>/control?var=lamp&val=50</code></li>
|
|
<li><code><a href="http://">http://</a><IP-ADDRESS>/control?var=lamp&val=0</code></li>
|
|
</ul>
|
|
</li>
|
|
<li>Set resolution to VGA<ul>
|
|
<li><code><a href="http://">http://</a><IP-ADDRESS>/control?var=framesize&val=8</code></li>
|
|
</ul>
|
|
</li>
|
|
<li>Show camera details and settings<ul>
|
|
<li>All settings are returned via single <code>status</code> call in <a href="https://www.json.org/">JSON</a> format.</li>
|
|
<li><code><a href="http://">http://</a><IP-ADDRESS>/status</code></li>
|
|
<li>Returns: <code>{"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"}</code></li>
|
|
</ul>
|
|
</li>
|
|
<li>Reboot the camera<ul>
|
|
<li><code><a href="http://">http://</a><IP-ADDRESS>/control?var=reboot&val=0</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p >You can try these yourself in a browser address bar, from the commandline with <code>curl</code> and co. or use them programatically from your scripting language of choice. </p>
|
|
</div></div><!-- contents -->
|
|
</div><!-- PageDoc -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
|
|
</small></address>
|
|
</body>
|
|
</html>
|