ESP-Cam disconnecting

Hi!
I have an issue with an ESP-Cam that keeps disconnecing and reconnecting every few seconds.
I have other ESP-Cam in the same room that have no issue and use pretty much the same code except the IP, names and keys

Example of the log:

Code:

esphome:
  name: esp-cam-4
  friendly_name: ESP-Cam-4

esp32:
  board: esp32cam
  #framework:
  #type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxx"

ota:
  password: "xxxx"

wifi:
  ssid: Phantom
  password: xxxxx

  manual_ip:
      # Set this to the IP of the ESP
      static_ip: 192.168.0.18
      # Set this to the IP address of the router. Often ends with .1
      gateway: 192.168.0.1
      # The subnet of the network. 255.255.255.0 works for most home networks.
      subnet: 255.255.255.0
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Camera-4 Fallback Hotspot"
    password: "xxxxx"

captive_portal:

# --------------------------------------------
# Camera Settings
# --------------------------------------------

esp32_camera:
  name: Camera 4
  external_clock:
    pin: GPIO0
    frequency: 20MHz
  i2c_pins:
    sda: GPIO26
    scl: GPIO27
  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22
  power_down_pin: GPIO32
  resolution: 1024x768
  jpeg_quality: 10
  vertical_flip: False
  max_framerate: 15 fps
  idle_framerate: 0.5 fps

# --------------------------------------------
# Controls
# --------------------------------------------

output:
  - platform: gpio
    pin: GPIO4
    id: gpio_4 

  - platform: ledc
    id: pwm_output
    pin: GPIO2
    frequency: 50 Hz

light:
  - platform: binary
    output: gpio_4
    name: Camera 4 - Light

any idea why this is happening?

Thanks!

I have the exact same issue, keeps disconnecting when I look at the feed (disconnects after a few seconds of viewing). Any idea?

Try with a lower resolution, quality and framerate and see if it’s the same?
Is the device overheating as some (or one device at least) is prone to it.
Finally, is the power supply sufficient and clean?

@PhantomX have you figured it out? I have the exact same issue.

Sorry for late reply, but it just started to work fine again by itself. I don’t recall doing anything special…