English
English
简体中文
日本語
pdf-icon

AtomS3R-CAM Home Assistant Integration

1. Preparation

  1. Hardware
  • 1 x AtomS3R-CAM
  • 1 x Home Assistant host (server, mini PC, NAS, etc.)
  1. Software & versions

2. Create Device

  1. Open ESPHome Dashboard. If the initial wizard appears, click CONTINUE.
  1. Click the green + button in the bottom right to create a new device.
  1. Click New Device Setup to enter the device creation wizard.
  1. Enter a device name and click NEXT.
  1. Select the device type and click ESP32S3.
  1. Click SKIP to skip the encryption key setup.
  1. Click EDIT to open the YAML editor and customize the device configuration.

3. Device Configuration

3.1 External Components Configuration

Add the External Components entry to load the early_init component from the M5Stack ESPHome repository.

external_components:
  - source: github://m5stack/esphome-yaml/components
    components: [early_init]

3.2 PSRAM Configuration

Add the PSRAM component to enable the on-chip octal PSRAM required by the camera.

psram:
  mode: octal
  speed: 80MHz

3.3 I2C Bus Configuration

Add the I2C bus for the OV3660 camera.

i2c:
  - id: camera_i2c
    sda: GPIO12
    scl: GPIO9
    frequency: 100kHz
    timeout: 10ms
    scan: true

3.4 Camera Configuration

Add the ESP32 Camera component to stream video from the OV3660 camera.

esp32_camera:
  name: "OV3660 Camera"
  external_clock:
    pin: GPIO21
    frequency: 20MHz
  i2c_id: camera_i2c
  data_pins: [GPIO3, GPIO42, GPIO46, GPIO48, GPIO4, GPIO17, GPIO11, GPIO13]
  vsync_pin: GPIO10
  href_pin: GPIO14
  pixel_clock_pin: GPIO40
  resolution: 640X480
  jpeg_quality: 10

4. Build and Flash Firmware

4.1 Build firmware

  1. After editing the YAML configuration, click SAVE in the top right, then click INSTALL.
  1. In the popup dialog, select Manual Download.
  1. Wait for the firmware to compile, then click Download and choose Factory format (Previously Modern) to save the firmware file locally.
Info
For a complete example configuration, see AtomS3R-CAM. The first build may take some time depending on the performance of your Home Assistant host and network conditions.

4.2 Flash firmware

  1. Connect AtomS3R to your computer using a USB Type-C cable. Open ESPHome Web and click CONNECT.
  1. In the serial port selection dialog, select the correct port.
  1. Click INSTALL.
  1. Select the firmware file downloaded in step 3 and start flashing.
Warning
After flashing is complete, you must reset the device; otherwise the firmware may not start correctly.

5. Start Using in Home Assistant

  1. In Home Assistant, go to Settings > Devices & Services to open the integration management page.
  1. In the Discovered section, find the AtomS3R-CAM device, click CONFIGURE, and follow the wizard to complete the setup.
  1. After the device is added, you can view it in the Devices list.
  1. Finally, add these sensor entities to a dashboard.
On This Page