ESP32 Cam - working!

I don’t think anyone has done the ESP32-cam/ESPHome setup with just a FTDI TTL + rasp pi & Hassio? So I thought it was unique in that I was confirming a hardware combination was working. Or am I mistaken?

Edit: Reading more thoroughly (and soberly) I can see others have already done it. So yeah, it’s a bit of a spammy post I guess.

Is there a way to trigger the reset pin as a switch in ESPHome?

If what you are trying to achieve is to restart the esp remotely. There is a component for that:

No not reboot or restart. I want to emulate pushing the reset button

It is difficult to find info on what reset does. What are you trying to achieve?

In case you’re still looking for a solution… I just use a long camera cable gently bending around the back of the board with a 90° twist back to the front.

1 Like

I have a strange issue with one of my cams. When power is off for an extended period and then restored the device comes online but I get no image. There is an error in the logs when trying to initialize the cam. Rebooting the device does not fix the issue. If I toggle power it starts to work again. The camera is not easily accessible so I was hoping the reset button could restore the camera state.

How about feeding power through a normally closed relay. When you want to power cycle turn the relay on, cutting the power. The relay then switches off and the esp power is restored.

Before I go that route wanted to check If it was possible to trigger the reset remotely. Sounds like it’s not an easy option at the moment?

I have a setup with latest hassio and a esp32 cam on my network.
The stream works fine in a browser, but when i try to have the stream in hassio i don’t get any picture at all.
I think i know the issue but i don’t have a solution for it, my access to home assistant is via duckdns and ssl but i don’t have a clue how to fix my stream.

Br
Fredric

Are you using esphome?

I hooked up a BH1750 Illuminance sensor to my esp32-cam (first time I’ve done that). Was easy and seems to be performing solidly.

Edit: Also now running a motor controller and a end stop switch (My take on a @DrZzs Motorised Automated Crank Window Opener)

I see a lot of configs passing by in this topic and noticed a lot don’t have an API password set. Why is that? Is it not advisable to use a password?

Yes but people often omit it from here as they are secret.

Ofcourse. Makes sense.

Ok. Stupid question…

What does this protect?
Well, the api server obviously, it says that in the docs. But what does that actually mean?

Yes I’m new to ESPHome. I’ve only been playing with it up until now but am about to use it ‘seriously’.

The password protects access to the esp device (it is the api server).

Without it, anyone could access your esp device.

However unlikely that sounds, it is better than leaving it open!

1 Like

Did anyone get the TTGO-T Camera Plus to work properly with homeassistant/esphome? Been fighting it for several months and no matter what I do it get’s a api block. If you got the answer please do share ^^

Try this you can remove the mqtt section if you dont need it

substitutions:
  devicename: "ttgocam"
  friendly_name: "woonkamer_camera"
  ip_address: ************
  ssid: 'WiFi_*********
  password: '***********'

esphome:
  "name": $devicename
  "platform": ESP32
  board: esp-wrover-kit

wifi:

  manual_ip:
    static_ip: $ip_address
    gateway: *************
    subnet: 255.255.255.0
  ssid: $ssid
  "password": $password
  fast_connect: True


# Enable logging
logger:

# Enable Home Assistant API
api:
font:
  - file: "Arial Black.ttf"
    id: my_font
    size: 18
  - file: "Arial Black.ttf"
    id: my_font1
    size: 20
  - file: "ComicSansMSRegular.ttf"
    id: my_font2
    size: 10
  - file: "ComicSansMSRegular.ttf"
    id: my_font3
    size: 16  
  - file: "Shadeerah.ttf"
    id: my_font4
    size: 18  
ota:


binary_sensor:
  - "platform": gpio
    pin: GPIO33
    "name": "$friendly_name PIR"
    device_class: "motion"
    id: "motion"

  - "platform": gpio
    pin:
      number: GPIO34
      mode: INPUT_PULLUP
      inverted: True
    "name": "$friendly_name Button"
    id: button

  - "platform": status
    "name": "$friendly_name Status"
    
switch:
  - "platform": gpio
    "name": "$friendly_name LED"
    pin: GPIO13
    id: relay
  - "platform": restart
    "name": "$friendly_name Restart"    

sensor:
  - "platform": wifi_signal
    "name": "$friendly_name WiFi Signal"
    "update_interval": 10s
  - "platform": "uptime"
    "name": "$friendly_name Uptime"

esp32_camera:
  "name": $friendly_name 
  external_clock:
    pin: GPIO32
    frequency: 20MHz
  i2c_pins:
    sda: GPIO13
    scl: GPIO12
  data_pins: [GPIO5, GPIO14, GPIO4, GPIO15, GPIO18, GPIO23, GPIO36, GPIO39]
  vsync_pin: GPIO27
  href_pin: GPIO25
  pixel_clock_pin: GPIO19
  power_down_pin: GPIO26
  resolution: 640X480
  jpeg_quality: 10
  vertical_flip: true
  horizontal_mirror: true

i2c:
  sda: GPIO21
  scl: GPIO22
text_sensor:
  - platform: mqtt_subscribe
    name: "ttgo1"
    id: text_ttgo1
    topic: ttgo1
  - platform: mqtt_subscribe
    name: "ttgo"
    id: text_ttgo2
    topic: ttgo2 
  - platform: mqtt_subscribe
    name: "ttgo"
    id: text_ttgo3
    topic: ttgo3   
  - platform: mqtt_subscribe
    name: "ttgo"
    id: text_ttgo4
    topic: ttgo4    


time:
  - "platform": homeassistant
    id: homeassistant_time

display:
  - "platform": ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    rotation: "180"
    lambda: |-
      if (id(motion).state) {
      it.printf(64,0, id(my_font), " %s",id(text_ttgo1).state.c_str(), TextAlign::BASELINE_CENTER);
      it.printf(64,42, id(my_font), " %s",id(text_ttgo2).state.c_str(), TextAlign::BASELINE_CENTER);
      }
      else {
      it.printf(64,0, id(my_font4), " %s",id(text_ttgo3).state.c_str(), TextAlign::BASELINE_CENTER);
      it.printf(64,42, id(my_font4), " %s",id(text_ttgo4).state.c_str(), TextAlign::BASELINE_CENTER);
      it.strftime(64, 64, id(my_font1), TextAlign::BASELINE_CENTER, "%H:%M", id(homeassistant_time).now());
      }
mqtt:
  broker: 192.168.1.111
  port: 1883
  username: **********
  password: ************
  client_id: woonkamer
  birth_message:
    topic: woonkamer/cam
    payload: online
  will_message:
    topic: woonkamer/cam
    payload: offline    
  on_message:
    - topic: woonkamer/cam/on_off
      qos: 0
      then:
        - switch.toggle: relay

This looks like the ttgo camera with motion sensor:) I have 2 of them and they work like a charm. It’s the ttgo plus that is the problem :slight_smile: but I can try the code with some pin change to see if it works :slight_smile: