Skip to content

Latest commit

 

History

History
137 lines (102 loc) · 5.61 KB

ESP_32_Cam.md

File metadata and controls

137 lines (102 loc) · 5.61 KB

ESP-32-Cam

  1. Hardware
    1. Pinout
  2. Firmware
    1. Source
    2. Download
  3. Integration
  4. Setup
  5. Templates
    1. Files
    2. Constants
      1. Warning
  6. Programming
  7. Access
    1. Web & API
    2. Streaming
  8. Links

Hardware

Using a cheaper and simple ESP-32-Cam:

Pinout

Firmware

It comes from the release with all necessary files into the archive.

Source

https://github.com/easytarget/esp32-cam-webserver

Download

https://github.com/easytarget/esp32-cam-webserver/tags https://github.com/easytarget/esp32-cam-webserver/releases

Integration

Setup

  1. Uncompress the release file esp32-cam-webserver-VERSION.zip downloaded
  2. Use the file TEMPLATE of the setup provided to configure your firmware/device:
  • ESP/ESP_32_Cam/myconfig_TEMPLATE.h

Templates

Files

Component Sub component Template file Generated file Comment
ESP PlatformIO ESP/ESP_32_Cam/platformio.ini generated/ESP/ESP_32_Cam/platformio.ini
ESP Firmware ESP/ESP_32_Cam/myconfig_TEMPLATE.h generated/ESP/ESP_32_Cam/myconfig_[ESP_NAME].h
OpenHAB API OpenHAB/API/ESP_32_Cam/items_TEMPLATE.json generated/OpenHAB/API/ESP_32_Cam/items_[ESP_NAME].json
OpenHAB API OpenHAB/API/ESP_32_Cam/links_TEMPLATE.json generated/OpenHAB/API/ESP_32_Cam/links_[ESP_NAME].json
OpenHAB API OpenHAB/API/ESP_32_Cam/rules_TEMPLATE.json generated/OpenHAB/API/ESP_32_Cam/rules_[ESP_NAME].json
OpenHAB API OpenHAB/API/ESP_32_Cam/things_TEMPLATE.json generated/OpenHAB/API/ESP_32_Cam/things_[ESP_NAME].json
OpenHAB Web pages OpenHAB/web_pages/ESP_32_Cam/Overview_HEADER.yml generated/OpenHAB/web_pages/ESP_32_Cam/Overview.yml
OpenHAB Web pages OpenHAB/web_pages/ESP_32_Cam/Overview_TEMPLATE.yml generated/OpenHAB/web_pages/ESP_32_Cam/Overview_[ESP_NAME].yml
OpenHAB Web pages OpenHAB/web_pages/ESP_32_Cam/Page_TEMPLATE.yml generated/OpenHAB/web_pages/ESP_32_Cam/Page_[ESP_NAME].yml
HABPanel Web pages HABOpen/web_pages/ESP_32_Cam/Camera_TEMPLATE.yml generated/HABOpen/web_pages/ESP_32_Cam/Camera_[ESP_NAME].yml
NodeRED Workflow NodeRED/ESP_32_Cam/functions.json generated/NodeRED/ESP_32_Cam/functions.json no more used
NodeRED Workflow NodeRED/ESP_32_Cam/settings_TEMPLATE.json generated/NodeRED/ESP_32_Cam/settings_[ESP_NAME].json no more used

Constants

  • ESP_NAME
  • ESP_REFERENCE
  • AP_SSID
  • AP_SSID_PASSWORD
  • OH_WEB_URL

Warning

IP addresses must be separated with commas (,) and not decimals (.).

Thanks to do it manually if you need to change the standard conf.

... l.59
#define ST_IP       10,1,1,1ESP_REFERENCE
#define ST_GATEWAY  10,1,1,1
#define ST_NETMASK  255,255,255,0
#define ST_DNS1     10,1,1,1

Programming

Follow the editor's guide (README.md file) and don't miss importing the previous TEMPLATE file as settings (cf. setup).

In summary:

  1. Connect your ESP-32-Cam to your PC via USB
  2. Only when flashing, connect the GPI0 to the Ground
  3. Install and open the Arduino IDE
  4. Open the Arduino sketch: esp32-cam-webserver.ino (from the uncompressed archive :)
  5. Configure the Arduino compiler
    1. Install the driver for the board esp32
    2. Select the board: AI Thinker ESP32-CAM
    3. Select your USB port
  6. Run the check and compile command

Ready to be used!

Access

Pretty well documented here.

Web & API

  • TCP Port: 80 (cf. ESP/ESP_32_Cam/myconfig_TEMPLATE.h l.96)
  • Flow: In/Out
    /                             - 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 / pairs listed
    /control?var=<key>&val=<val>  - Set <key> to <val>
    /dump - Status page
    

Streaming

  • TCP Port: 8080 (cf. ESP/ESP_32_Cam/myconfig_TEMPLATE.h l.97)
  • Flow: Out
    /                             - Raw stream
    /view                         - Stream viewer
    

Links