Bonjour,
J’ai ajouté un Esp32 sous Esphome par Web - ESPHome.
Pour afficher des données sur un écran ili9341.
Lorsque je charge la config le fichier Yaml si dessous, l’écran est blanc, l’ESP32 passe en offline sur Esphome par contre il est bien connecté à la wifi de mon réseau.
substitutions:
name: esphome-web-6a16dc
friendly_name: ESP32_ecran
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
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
# Allow provisioning Wi-Fi via serial
improv_serial:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.194
gateway: 192.168.1.254
subnet: 255.255.255.0
# Set up a wifi access point
ap: {}
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:
dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
import_full_config: true
# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
authorizer: none
# To have a "next url" for improv serial
web_server:
local: true
port: 80
auth:
username: Ecran
password: Ecran
spi:
clk_pin: GPIO18 # (Pin on display - SCK/T_CLK)
mosi_pin: GPIO23 # (Pin on display - SDI(MOSI)/T_DIN)
miso_pin: GPIO19 # (Pin on display - SDO(MISO)/T_DO)
font:
# gfonts://family[@weight]
- file: "gfonts://Roboto"
id: roboto_big
size: 27
display:
- platform: ili9xxx
model: ILI9341
#Permet de trourner l'écran en portrait
transform:
swap_xy: true
mirror_x: false
dimensions:
height: 320
width: 240
cs_pin: GPIO15 # Broche CS (Chip Select)
dc_pin: GPIO05 # Broche DC (Data/Command)
reset_pin: GPIO04 # Broche de réinitialisation
update_interval: 1s
color_order: rgb
invert_colors: false
id: ecran_ecran
pages:
- id: page1
lambda: |-
it.printf(0, 0, id(roboto_big), "t amb salon %.1f°C",id(t_amb).state);
it.printf(0, 30, id(roboto_big), "t exterieur %.1f°C",id(t_ext).state);
it.printf(0, 60, id(roboto_big), "t depart %.1f°C",id(t_depart_plancher_chauf).state);
it.printf(0, 90, id(roboto_big), "cal loi d eau %.1f°C",id(t_loi_d_eau).state);
it.printf(0, 120, id(roboto_big), "t chaudiere %.1f°C",id(t_chaudiere).state);
it.printf(0, 150, id(roboto_big), "t haut ball %.1f°C",id(t_haut_ballon).state);
it.printf(0, 180, id(roboto_big), "t bas ball %.1f°C",id(t_bas_ballon).state);
it.printf(0, 210, id(roboto_big), "p atmo %.0fmbar",id(p_atmo).state);
- id: page2
lambda: |-
it.printf(0, 0, id(roboto_big), "t amb salon %.1f°C",id(t_amb).state);
it.printf(0, 30, id(roboto_big), "t exterieur %.1f°C",id(t_ext).state);
it.printf(0, 60, id(roboto_big), "t depart %.1f°C",id(t_depart_plancher_chauf).state);
it.printf(0, 90, id(roboto_big), "cal loi d eau %.1f°C",id(t_loi_d_eau).state);
it.printf(0, 120, id(roboto_big), "t chaudiere %.1f°C",id(t_chaudiere).state);
it.printf(0, 150, id(roboto_big), "t haut ball %.1f°C",id(t_haut_ballon).state);
it.printf(0, 180, id(roboto_big), "t bas ball %.1f°C",id(t_bas_ballon).state);
it.printf(0, 210, id(roboto_big), "p atmo %.0fmbar",id(p_atmo).state);
interval:
- interval: 10s
then:
- display.page.show_next: ecran_ecran
- component.update: ecran_ecran
sensor:
- platform: homeassistant
entity_id: sensor.t_chaudiere
name: "t_chaudiere"
id: t_chaudiere
unit_of_measurement: °C
- platform: homeassistant
entity_id: sensor.t_haut_ballon
name: "t_haut_ballon"
id: t_haut_ballon
unit_of_measurement: °C
- platform: homeassistant
entity_id: sensor.t_bas_ballon
name: "t_bas_ballon"
id: t_bas_ballon
unit_of_measurement: °C
- platform: homeassistant
entity_id: sensor.t_amb
name: "t_amb"
id: t_amb
unit_of_measurement: °C
- platform: homeassistant
entity_id: sensor.t_depart_plancher_chauf
name: "t_depart_plancher_chauf"
id: t_depart_plancher_chauf
unit_of_measurement: °C
- platform: homeassistant
entity_id: sensor.esphome_web_0bf858_loi_d_eau
name: "t_loi_d_eau"
id: t_loi_d_eau
unit_of_measurement: °C
- platform: homeassistant
entity_id: sensor.t_ext
name: "t_ext"
id: t_ext
unit_of_measurement: °C
- platform: homeassistant
entity_id: sensor.p_atmo
name: "p_atmo"
id: p_atmo
unit_of_measurement: °C
switch:
- platform: gpio
name: "alim_ecran"
pin: GPIO16
id: alim_ecran
# on_turn_on:
# then:
# - lambda: id(ecran_ecran).turn_on();
# - lambda: id(ecran_ecran).set_contrast(1.0);
# # - script.execute: on_ecran
# - delay: 36s
# - switch.turn_off: alim_ecran
# on_turn_off:
# then:
# - lambda: id(ecran_ecran).set_contrast(0.0);
# - lambda: id(ecran_ecran).turn_off();
# #- script.stop: on_ecran
esp32_touch:
setup_mode: False
binary_sensor:
- platform: esp32_touch
name: "touch_Pad"
id: touch_Pad
pin: GPIO02
threshold: 500
on_press:
then:
- switch.turn_on: alim_ecran
button:
- platform: restart
name: "Restart_ecran"
Avez-vous une idée ?
J’ai fait plusieurs dizaine de reset de l’ESP et de rechargement.
Merci
Fred
System Information
version |
core-2024.10.4 |
installation_type |
Home Assistant OS |
dev |
false |
hassio |
true |
docker |
true |
user |
root |
virtualenv |
false |
python_version |
3.12.4 |
os_name |
Linux |
os_version |
6.6.54-haos |
arch |
aarch64 |
timezone |
Europe/Paris |
config_dir |
/config |
Home Assistant Community Store
GitHub API |
ok |
GitHub Content |
ok |
GitHub Web |
ok |
GitHub API Calls Remaining |
5000 |
Installed Version |
1.34.0 |
Stage |
running |
Available Repositories |
1520 |
Downloaded Repositories |
5 |
Home Assistant Cloud
logged_in |
false |
can_reach_cert_server |
ok |
can_reach_cloud_auth |
ok |
can_reach_cloud |
ok |
Home Assistant Supervisor
host_os |
Home Assistant OS 13.2 |
update_channel |
stable |
supervisor_version |
supervisor-2024.10.3 |
agent_version |
1.6.0 |
docker_version |
27.2.0 |
disk_total |
98.7 GB |
disk_used |
18.7 GB |
healthy |
true |
supported |
true |
host_connectivity |
true |
supervisor_connectivity |
true |
ntp_synchronized |
true |
virtualization |
kvm |
board |
generic-aarch64 |
supervisor_api |
ok |
version_api |
ok |
installed_addons |
ESPHome (2024.10.2), File editor (5.8.0), Mosquitto broker (6.4.1), Let’s Encrypt (5.2.3), WireGuard (0.10.2), Advanced SSH & Web Terminal (19.0.0), Zigbee2MQTT (1.40.2-1), Studio Code Server (5.17.2), go2rtc (1.9.6), Frigate (0.14.1), Home Assistant Google Drive Backup (0.112.1) |
Dashboards
dashboards |
5 |
resources |
2 |
views |
12 |
mode |
storage |
Recorder
oldest_recorder_run |
26 octobre 2024 à 12:24 |
current_recorder_run |
29 octobre 2024 à 13:39 |
estimated_db_size |
957.32 MiB |
database_engine |
sqlite |
database_version |
3.45.3 |
___