Paramétrage du module ESP32 8 relais
Code à compiler puis à charger sur le module.
pip install esphome
esphome compile mon-app.yaml
esphome upload mon-app.yaml --device COM4 (ou autre)
esphome:
name: esphome-web-58d284
friendly_name: ESP32 8 relais
min_version: 2025.5.0
name_add_mac_suffix: false
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
web_server:
local: true
port: 80
auth:
username: Relay
password: Relay
switch:
- platform: gpio
pin: 32
name: "Relais 1"
- platform: gpio
pin: 33
name: "Relais 2"
- platform: gpio
pin: 25
name: "Relais 3"
- platform: gpio
pin: 26
name: "Relais 4"
- platform: gpio
pin: 27
name: "Relais 5"
- platform: gpio
pin: 14
name: "Relais 6"
- platform: gpio
pin: 12
name: "Relais 7"
- platform: gpio
pin: 13
name: "Relais 8"