ESP32 CAM / Smart Switch / 2X Button / DHT11 Sensor (Humidity / Temp) (3d Printed)

======== Description ========
Hello community! I created a wall switch with an ESP32-CAM camera, I added 2 momentary buttons to control home automation devices, in my case leds under my kitchen counter. I did the programming in ESPHOME and I then integrated into my home automation system which is Home-Assistant. For the moment it is a prototype I will update it when I have time.

Thingiverse Link


!

ha2

======== Parts List ========

Buttons

Sensor

ESP32-CAM

Cam Extention

PM-01

======== ESPHOME ========

esphome:
  name: switch_cam_cuisine_2btn
  platform: ESP32
  board: esp-wrover-kit

wifi:
  ssid: "YOUR WIFI SSID"
  password: "YOURWIFIPASSWORD"
  ap:
    ssid: "Switch Cam Cuisine 2Btn"
    password: "YOURWIFIPASSWORD"

captive_portal:
logger:
api:
ota:


esp32_camera:
  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
  name: Camera Cuisine
  horizontal_mirror: false
  
binary_sensor:
# Bouton 01
  - platform: gpio
    pin:
      number: GPIO12
      mode: INPUT_PULLUP
      inverted: true
    name: "Cuisine_BTN_01"

# Bouton 02
  - platform: gpio
    pin:
      number: GPIO13
      mode: INPUT_PULLUP
      inverted: true
    name: "Cuisine_BTN_02"

sensor:
# Senseur de Temperature et Humidity
  - platform: dht
    pin: GPIO2
    model: DHT11
    temperature:
      name: "Cuisine Temperature"
    humidity:
      name: "Cuisine Humidity"
    update_interval: 60s

switch:
  - platform: gpio
    pin: 14
    name: "Led_BTN_01"
  - platform: gpio
    pin: 15
    name: "Led_BTN_02"
3 Likes

super cool idea. really like this.

Updated with more picture and video / Fix Code

Nice project nicecube!
Im waiting for note update!

Added a sliding cover for the DHT11 Sensor

I installed it this weekend this is the final result


ha2

I used automation to keep the led sync with my device

1 Like

I edited the code for ESPhome

Hello, nice Project! How did you wire up the DHT sensor?