pdf-icon

TimerCamera Series Home Assistant Integration

This tutorial explains in detail the method of connecting TimerCamera series devices to Home Assistant, applicable to TimerCamera (U082), TimerCamera-X (U082-X), and TimerCamera-F (U082-F).

Preparation

Note

  • In this tutorial, the kit is compiled and uploaded under ESPHome 2025.12.3. If you encounter compilation / upload issues, consider switching ESPHome to this version. TimerCamera-X is used here as an example configuration. Except for some inconsistent camera models, the rest of the hardware configuration is the same. You can modify information such as the name according to your specific model.

Create Device

  1. Open ESPHome Builder, click NEW DEVICE in the lower right corner to create a new device.

  2. Click CONTINUE in the pop-up window.

  3. Select New Device Setup to create a new configuration file.

  4. Name the new configuration file.

  5. Select the device type, keep the default configuration here, and select ESP32.

  6. Copy the Encryption Key for backup, and click SKIP to skip.

Configuration

  1. Click EDIT under the generated configuration file card to edit.

  2. Open the configuration file for modification

psram:
  mode: quad
  speed: 80MHz
yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
i2c:
  - id: bsp_i2c
    sda: GPIO12
    scl: GPIO14
  - id: cam_i2c
    sda: GPIO25
    scl: GPIO23

esp32_camera:
  name: OV3660 Camera
  external_clock:
    pin: GPIO27
    frequency: 20MHz
  i2c_id: cam_i2c
  data_pins: [GPIO32, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19]
  vsync_pin: GPIO22
  href_pin: GPIO26
  pixel_clock_pin: GPIO21
  reset_pin: GPIO15
  resolution: 640x480
  jpeg_quality: 10

The default image configuration is used here. To change the configuration, you can refer to the configuration examples provided by ESPHome.

esphome:
  name: timercamera-x
  friendly_name: timercamera-x
  ...
  on_boot:
    then:
      # read the RTC time once when the system boots
      bm8563.read_time:

...
time:
  - platform: bm8563
    i2c_id: bsp_i2c
    # repeated synchronization is not necessary unless the external RTC
    # is much more accurate than the internal clock
    update_interval: never
  - platform: homeassistant
    # instead try to synchronize via network repeatedly ...
    on_time_sync:
      then:
        # ... and update the RTC when the synchronization was successful
        bm8563.write_time:

The system will read the time information in the RTC when it starts. After connecting to Home Assistant, it will automatically synchronize the Home Assistant time information.

  • Configure LED.
yaml
1 2 3 4 5 6 7 8 9 10
output:
  - platform: ledc
    id: blue_led
    pin: GPIO2

light:
  - platform: monochromatic
    output: blue_led
    name: "Blue LED"
    restore_mode: RESTORE_DEFAULT_ON

The blue LED will be turned on by default after the device is powered on. You can control the LED switch and brightness in Home Assistant.

  • Use battery.
yaml
1 2 3 4 5 6
switch:
  - platform: gpio
    id: bat_hold_pin
    name: "Battery Hold Pin"
    pin: GPIO33
    restore_mode: RESTORE_DEFAULT_ON

GPIO33 is used here to control whether to use the battery. Turning it on and keeping it pulled high allows the battery to work. By default, it will stay high. If this switch is turned off, the device will shut down when there is no external power supply.

  • Monitor battery level information.

TimerCamera-X and TimerCamera-F come pre-installed with a battery. You can obtain battery voltage information through the ADC reading of GPIO38, and get approximate battery level information after conversion:

yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
sensor:
  - platform: adc
    pin: GPIO38
    attenuation: 12dB
    name: "Battery Voltage"
    id: battery_voltage
    update_interval: 10s
    filters:
      - multiply: 1.51

  - platform: template
    id: battery_percent
    name: "Battery Percentage"
    unit_of_measurement: "%"
    accuracy_decimals: 0
    lambda: |-
      float voltage = id(battery_voltage).state;
      float min_voltage = 3.350f;
      float max_voltage = 4.150f;

      if (voltage <= min_voltage) return 0.0;
      if (voltage >= max_voltage) return 100.0;

      float percent = ((voltage - min_voltage) / (max_voltage - min_voltage)) * 100.0;
      return percent;
Note
Battery level can only be effectively monitored when no external USB power is connected and BAT_HOLD_Pin (GPIO33) is kept high. If HOLD status is not maintained, battery power will not be used, and the ADC reading will be very low (<1 V); if external USB power is connected and HOLD status is maintained, the voltage information here is the charging voltage.

Download and Burn Firmware

  1. After the modification is complete, click SAVE and INSTALL in the upper right corner, and select Manual Download in the pop-up options.
Note
Click TimerCamera-X/TimerCamera-F to view the complete configuration file example. The first compilation may take a long time, and the compilation time is related to the Home Assistant host performance and network quality.
  1. After the compilation is complete, click the Download button and select Factory Format to download the firmware.

  2. Connect the kit to the host via a USB Type-C data cable, open ESPHome Web, and click CONNECT to connect the device.

  3. Then click INSTALL and select the previously compiled firmware for uploading.

  4. Click INSTALL again to burn, and wait for the burning to complete.

Start Using

  1. After completing the firmware burning, the device will automatically perform Wi-Fi connection when powered on. Navigate to Settings->Device & services to view the device status. Click Add to add the device to Home Assistant.
  1. Dashboard example:
  1. Click on the camera entity to view the real-time preview screen.

TimerCamera (TimerCamera-X) is shown on the left, and TimerCamera-F uses a fisheye lens, so the rendering effect is as shown on the right.

Video

On This Page