pdf-icon

Unit CamS3-5MP Home Assistant Integration

Introduction

Unit CamS3-5MP is a compact ESP32-S3–based Wi-Fi camera module featuring a 5MP PY260 sensor (2592×1944, 88° DFoV), 8MB PSRAM, and 16MB flash. It supports microSD storage, PDM audio recording, USB firmware update/serial communication, and onboard download headers. With built-in firmware for image capture and EzData cloud upload, it is ideal for remote monitoring, time-lapse photography, and industrial automation.

Preparation

Tip
In this tutorial, the firmware is compiled and uploaded with ESPHome 2025.12.5. If you encounter compile/upload issues, consider switching ESPHome to this version.

Step 1. Create New Device

  • Click the green button in the lower right corner to create a device.

Step 2. Create Device Name

  • Click CONTINUE.

  • Click New Device Setup.

  • Enter the name of the device and click NEXT.

Step 3. Choose Device Type

  • Click ESP32-S3.

  • Click SKIP.

Step 4. Start Edit YAML File

  • Click EDIT. We can customize device functionality through YAML files.

Device Setup

The following is the core part of the code. Relevant references and explanations are provided below.

PSRAM Configuration

psram:
  mode: octal
  speed: 80MHz 

Switch Configuration

switch:
  - platform: gpio
    name: "Active LED"
    pin:
      number: GPIO14
      inverted: true
    restore_mode: ALWAYS_ON

I2C Bus Configuration

  • Add the I2C components
i2c:
  - id: camera_i2c
    sda: GPIO17
    scl: GPIO41
    scan: true

Camera Configuration

esp32_camera:
  name: "PY260 camera"
  external_clock:
    pin: GPIO11
    frequency: 20MHz
  i2c_id: camera_i2c
  data_pins: [GPIO6, GPIO15, GPIO16, GPIO7, GPIO5, GPIO10, GPIO4, GPIO13]
  vsync_pin: GPIO42
  href_pin: GPIO18
  pixel_clock_pin: GPIO12
  reset_pin: GPIO21
  resolution: 1024x768
  jpeg_quality: 12

Firmware Build

  • Click INSTALL again to flash and wait for it to complete.

  • After making changes, click SAVE and INSTALL in the top-right corner, then choose Manual Download in the popup.

  • After the firmware compilation is complete, click Download and select Factory format(Previously Modern)

Tip
Click Unit CamS3-5MP to view the complete example configuration. The first build may take a while, depending on the performance of the Home Assistant host and network quality.

Firmware Upload

  • Hardware Connection Guide

Connect the camera module to the 4-pin cable → Plug the other end of the cable into the USB adapter → Use a USB-C cable to connect to a computer or power supply → Once powered on, the device is ready for firmware flashing or data transmission.

  • Connect the device to your host via a USB Type‑C cable. Open ESPHome Web and click CONNECT to connect to the device.

  • Locate the corresponding serial port number

  • Click INSTALL

  • Select the previously compiled firmware to upload.

Tip
Please note that after the download is completed, the device must be reset.

Home Assistant Integration

  • Click Settings -> Device & services to check the device.

  • We can find the corresponding device in the Discover section.

  • After adding the device, the data will be displayed correctly.

  • Finally, we add these entities to the Dashboard, and the following shows their display results.

On This Page