Esphome setting up the esp device

Hi Everyone, I am trying to get a relay working. I have an ESP32 wroom connected to a relay board.
I went through the esphome instructions there is no mention of how to set up the esp itself. Is there any info on this anywhere?

thanks

Did you see this?

no i didn’t see that, thank you very much.

thanks again brooksben11, that was a great guide, I feel like im so close to getting this working.

installed the add on esphome and then ended up at the web.esphome.io as there was “some wrong with my browser or something.”
clicked prepare for first use. I get installing and wheel turning for 2 minutes
configuration installed yay!!!
click close

details"esphome-web-41c9c4
software: esphome/2024.7.3"

next i select connect to wifi
enter wifi name and password

esphome-web-41c9c4
provisioning…
this fails…

I have a dongle that if i put its un and pw in it will work… but obviously this wont help me.

esp is an expessif esp32 wroom 32
there are a few different esp32’s to select when adding the esp, I am working my way through all of them so far all are the same result.
thanks

just use esp32dev

also, there are high changes to have wrong relay module/connections.
just post your module and wiring here…

Hi Karosm, thanks for the info,

thank you will do!
It’s just occurred to me that maybe its a 2.4 or 5.0 ghz wifi band issue.

awesome cheers, will do this when i get home, thanks again

Better to have separate ssid for different frequencies.

good idea, done.
The esp is now connected to the 2.4 I can ping it from my desktop which is on the other 5ghz band.

Seems you are right maybe a code error, as it still says offline and I cant get it to connect to the HA.

code if I press edit:

esphome:
  name: backofhouse
  friendly_name: backofhouse

esp32:
  board: esp32-s2-saola-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "wNMtzqEhdsEEt3dvuk3E+UOn6Z1VphWgeLT2taUPGfU="

ota:
  - platform: esphome
    password: "df19c436f902335cf57075f345a371fa"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Backofhouse Fallback Hotspot"
    password: "nc98PkSWnMfN"

captive_portal:
    

the validate button gives me this:

esphome:
  name: backofhouse
  friendly_name: backofhouse
  build_path: build/backofhouse
  area: ''
  platformio_options: {}
  includes: []
  libraries: []
  name_add_mac_suffix: false
  min_version: 2024.8.1
esp32:
  board: esp32-s2-saola-1
  framework:
    version: 2.0.5
    source: ~3.20005.0
    platform_version: platformio/[email protected]
    type: arduino
  flash_size: 4MB
  variant: ESP32S2
logger:
  baud_rate: 115200
  tx_buffer_size: 512
  deassert_rts_dtr: false
  hardware_uart: USB_CDC
  level: DEBUG
  logs: {}
api:
  encryption:
    key: wNMtzqEhdsEEt3dvuk3E+UOn6Z1VphWgeLT2taUPGfU=
  port: 6053
  password: ''
  reboot_timeout: 15min
ota:
- platform: esphome
  password: df19c436f902335cf57075f345a371fa
  version: 2
  port: 3232
wifi:
  ap:
    ssid: Backofhouse Fallback Hotspot
    password: nc98PkSWnMfN
    ap_timeout: 1min
  domain: .local
  reboot_timeout: 15min
  power_save_mode: LIGHT
  fast_connect: false
  passive_scan: false
  enable_on_boot: true
  networks:
  - ssid: electrickery
    password: sh6d0wh6t
    priority: 0.0
  use_address: backofhouse.local
captive_portal: {}

INFO Configuration is valid!

oh yeah and the relay board is a Z6328 funduino 8ch relay module

cheers

i have got this kind of working, well the lights on the relays come on, but the relays themselves do not click or turn on or off. any help would be much appreciated, my code is below:

substitutions:
  name: "family-room"
  friendly_name: Family Room 41c9c4

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  min_version: 2024.6.0
  name_add_mac_suffix: false
  project:
    name: esphome.web
    version: dev
 
esp32:
  board: esp32dev
  framework:
    type: arduino

logger:

api:

ota:
- platform: esphome

improv_serial:

wifi:
  ap: {}

captive_portal:

dashboard_import:
  package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
  import_full_config: true

esp32_improv:
  authorizer: none

web_server:

switch:    
  - platform: gpio
    name: "Relay_1"
    pin: 25
    restore_mode: RESTORE_DEFAULT_OFF

  - platform: gpio
    name: "Relay_2"
    pin: 26
    restore_mode: RESTORE_DEFAULT_OFF

  - platform: gpio
    name: "Relay_3"
    pin: 27
    restore_mode: RESTORE_DEFAULT_OFF

  - platform: gpio
    name: "Relay_4"
    pin: 32
    restore_mode: RESTORE_DEFAULT_OFF

  - platform: gpio
    name: "Relay_5"
    pin: 33
    restore_mode: RESTORE_DEFAULT_OFF

  - platform: gpio
    name: "Relay_6"
    pin: 18
    restore_mode: RESTORE_DEFAULT_OFF

  - platform: gpio
    name: "Relay_7"
    pin: 19
    restore_mode: RESTORE_DEFAULT_OFF

  - platform: gpio
    name: "Relay_8"
    pin: 21
    restore_mode: RESTORE_DEFAULT_OFF

bad relay board!!! all working yay!
thank you guys, i appreciate the time and help you have given :+1: