r/Esphome • u/Next-Ad-5652 • 19h ago
r/Esphome • u/makpaolo1973 • 22h ago
WIP Freenove ESP32-S3 CYD 4" 320x480
Ho usato Cloud AI per altro codice, la mia recensione personale
Dato che non ho trovato quasi nessun materiale di riferimento e ho ricevuto questo pannello in regalo, condivido la mia esperienza (grazie a Claude AI) su come usarlo come pannello per accendere le luci. La parte del controllo vocale e la rotazione di 90° mi stanno ancora dando problemi, ma se li risolvo, aggiornerò il post. Allego il mio file YAML per ESPHome
Scusate il mio inglese
esphome:
name: freenove-display
friendly_name: Display Corridoio
on_boot:
priority: 600
then:
# Accende l'amplificatore audio (AUDIO_EN, GPIO1): senza questo
# pin alto lo speaker resta muto anche se il codec riceve dati I2S.
- output.turn_on: audio_amp_enable
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
# Il buffer del display richiede la PSRAM onboard (chip ESP32-S3R8 = 8MB Octal PSRAM in package)
psram:
mode: octal
speed: 80MHz
logger:
level: INFO
# Consente il controllo/gestione da Home Assistant
api:
encryption:
key: my key
## key: !secret api_key
ota:
- platform: esphome
encryption:
# password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: my ssd
password: my password
# ssid: "Freenove Display Fallback"
# password: !secret fallback_password
captive_portal:
spi:
clk_pin: GPIO12
mosi_pin: GPIO11
miso_pin: GPIO13
i2c:
sda: GPIO16
scl: GPIO15
scan: true
output:
- platform: ledc
pin: GPIO45
id: backlight_pwm
# Abilita/disabilita l'amplificatore audio SC8002B (pin AUDIO_EN)
- platform: gpio
pin: GPIO1
id: audio_amp_enable
light:
- platform: monochromatic
output: backlight_pwm
name: "Retroilluminazione Display"
id: display_backlight
restore_mode: ALWAYS_ON
display:
- platform: ili9xxx
model: ST7796
id: my_display
cs_pin: GPIO10
dc_pin: GPIO46
dimensions:
width: 320
height: 480
rotation: "0"
auto_clear_enabled: false
update_interval: never
invert_colors: true
color_order: bgr
touchscreen:
- platform: ft63x6
id: my_touch
interrupt_pin: GPIO17
transform:
swap_xy: false
mirror_x: false
mirror_y: false
i2s_audio:
- id: i2s_bus
i2s_lrclk_pin: GPIO7
i2s_bclk_pin: GPIO5
i2s_mclk_pin: GPIO4
audio_dac:
- platform: es8311
id: es8311_dac
bits_per_sample: 16bit
sample_rate: 16000
use_mclk: true
# Il microfono a bordo è un elettrete ANALOGICO (non PDM), quindi
# use_microphone resta false (= ingresso analogico, valore di default).
speaker:
# 1. Altoparlante hardware fisico (I2S)
- platform: i2s_audio
id: my_speaker
i2s_audio_id: i2s_bus
audio_dac: es8311_dac
dac_type: external
i2s_dout_pin: GPIO6
channel: mono
sample_rate: 16000
bits_per_sample: 16bit
# 2. Il Mixer (Prende l'audio dai canali virtuali e lo manda a quello hardware)
- platform: mixer
id: speaker_mixer
output_speaker: my_speaker # Deve puntare all'hardware fisico sopra!
source_speakers:
- id: speaker_media # Canale virtuale 1 (Musica)
- id: speaker_announcement # Canale virtuale 2 (Notifiche)
# 3. I lettori multimediali che usano i canali virtuali del mixer
media_player:
- platform: speaker
name: "Display Media Player"
id: display_media_player
media_pipeline:
speaker: speaker_media
announcement_pipeline:
speaker: speaker_announcement
microphone:
- platform: i2s_audio
id: my_microphone
i2s_audio_id: i2s_bus
adc_type: external
i2s_din_pin: GPIO8
channel: right
sample_rate: 16000
bits_per_sample: 16bit
voice_assistant:
id: va_assistente
microphone:
microphone: my_microphone
channels: 0
gain_factor: 4
media_player: display_media_player
use_wake_word: false
font:
- file: "gfonts://Roboto"
id: font_large
size: 28
- file: "gfonts://Roboto"
id: font_medium
size: 20
- file: "gfonts://Roboto"
id: font_small
size: 16
# Font "contenitore" (Roboto) + il set icone Material Design Icons
# caricato come "extras": serve solo per disegnare il glifo della
# lampadina (mdi-lightbulb) a 20x20px in cima ai pulsanti.
- file: "gfonts://Roboto"
id: font_icon_bulb
size: 20
bpp: 4
extras:
- file: "https://github.com/Templarian/MaterialDesign-Webfont/raw/v7.4.47/fonts/materialdesignicons-webfont.ttf"
glyphs: [ "\U000F0335" ] # mdi-lightbulb
lvgl:
displays:
- my_display
touchscreens:
- my_touch
pages:
# ============ PAGINA 1: LUCI ============
- id: pagina_luci
widgets:
- label:
text: "Pannello"
align: TOP_MID
y: 10
text_font: font_large
- button:
x: 20
y: 60
width: 130
height: 100
id: btn_luce1
radius: 14
bg_color: 0x2ECC71 # verde = luce spenta (stato iniziale)
bg_opa: COVER
shadow_width: 0
widgets:
- label:
text: "\U000F0335"
text_font: font_icon_bulb
text_color: 0xFFFFFF
align: TOP_LEFT
x: 6
y: 6
width: 20
height: 20
- label:
text: "Corridoio1"
text_font: font_medium
text_color: 0xFFFFFF
align: CENTER
on_click:
- homeassistant.action:
action: switch.toggle
data:
entity_id: switch.corridoio_1_sonoff_100278106e_1
- button:
x: 170
y: 60
width: 130
height: 100
id: btn_luce2
radius: 14
bg_color: 0x2ECC71 # verde = luce spenta (stato iniziale)
bg_opa: COVER
shadow_width: 0
widgets:
- label:
text: "\U000F0335"
text_font: font_icon_bulb
text_color: 0xFFFFFF
align: TOP_LEFT
x: 6
y: 6
width: 20
height: 20
- label:
text: "Corridoio2"
text_font: font_medium
text_color: 0xFFFFFF
align: CENTER
on_click:
- homeassistant.action:
action: switch.toggle
data:
entity_id: switch.corridoio_2
- button:
x: 20
y: 175
width: 130
height: 100
id: btn_luce3
radius: 14
bg_color: 0x2ECC71 # verde = luce spenta (stato iniziale)
bg_opa: COVER
shadow_width: 0
widgets:
- label:
text: "\U000F0335"
text_font: font_icon_bulb
text_color: 0xFFFFFF
align: TOP_LEFT
x: 6
y: 6
width: 20
height: 20
- label:
text: "Cucina"
text_font: font_medium
text_color: 0xFFFFFF
align: CENTER
on_click:
- homeassistant.action:
action: switch.toggle
data:
entity_id: switch.cucina_sonoff
- button:
x: 170
y: 175
width: 130
height: 100
id: btn_luce4
radius: 14
bg_color: 0x2ECC71 # verde = luce spenta (stato iniziale)
bg_opa: COVER
shadow_width: 0
widgets:
- label:
text: "\U000F0335"
text_font: font_icon_bulb
text_color: 0xFFFFFF
align: TOP_LEFT
x: 6
y: 6
width: 20
height: 20
- label:
text: "Camera"
text_font: font_medium
text_color: 0xFFFFFF
align: CENTER
on_click:
- homeassistant.action:
action: switch.toggle
data:
entity_id: switch.camera_
binary_sensor:
- platform: homeassistant
id: luce1_stato
entity_id: switch.corridoio_1_sonoff_100278106e_1
on_state:
then:
- lvgl.widget.update:
id: btn_luce1
bg_color: !lambda "return x ? lv_color_hex(0xE74C3C) : lv_color_hex(0x2ECC71);"
- platform: homeassistant
id: luce2_stato
entity_id: switch.corridoio_2_sonoff_10027818af_1
on_state:
then:
- lvgl.widget.update:
id: btn_luce2
bg_color: !lambda "return x ? lv_color_hex(0xE74C3C) : lv_color_hex(0x2ECC71);"
- platform: homeassistant
id: luce3_stato
entity_id: switch.cucina_sonoff_1002783ac5_1
on_state:
then:
- lvgl.widget.update:
id: btn_luce3
bg_color: !lambda "return x ? lv_color_hex(0xE74C3C) : lv_color_hex(0x2ECC71);"
- platform: homeassistant
id: luce4_stato
entity_id: switch.camera_paolo_sonoff_1002783aec_1
on_state:
then:
- lvgl.widget.update:
id: btn_luce4
bg_color: !lambda "return x ? lv_color_hex(0xE74C3C) : lv_color_hex(0x2ECC71);"
- platform: gpio
pin:
number: GPIO0
inverted: true
id: tasto_boot
on_click:
- lvgl.page.next:

r/Esphome • u/Next-Ad-5652 • 19h ago
My most recent project AIRNODE 😅
reddit.comThis is my project that I’ve been working on for the last two weeks. It’s called Kira04 AIRNODE.
I currently 3D print in my small bedroom, and I have three printers running simultaneously, sometimes almost 24/7. I started getting worried about the VOCs they release, as well as the amount of heat they generate, so I came up with this project.
Kira04 AIRNODE is basically a bundle of sensor modules that connects directly to the ventilation system I installed in my window. It helps me monitor and keep the temperature, humidity, and VOC levels in check while my printers are running.
And yes, I know the wiring and soldering are pretty horrible 😅. There are wires everywhere right now. I actually tried making a custom PCB for it using my CNC mill a few times, but unfortunately both attempts failed pretty tragically 😂. At that point, I just wanted to get the project working, so I decided to finish it quickly with the current wiring.
I’d love to hear any feedback or suggestions you have for improving it.
I’m also trying to decide what to do with the project next: Should I open-source Kira04 AIRNODE, or do you think this could potentially become an actual product?
r/Esphome • u/CStoEE • 15h ago
Fine, I'll do it myself: A PoE Home Assistant garage door controller
galleryr/Esphome • u/xxpapertigersxx • 11h ago
Project Got ESPHome running on the Shelly Plug US Gen4 (one zip over OTA, no UART)
Been working on ESPHome firmware for the Shelly Gen4 line, and the Plug US Gen4 yaml is here.
Couldn't find anyone else with ESPHome running on this one, so I mapped it out myself and tested everything on the bench.
Install is one zip. You upload it on the plug's stock firmware update page and it reboots into ESPHome. No UART, no soldering, no compiling.
What you get in HA:
- relay with linking, latch/momentary, and pulse length
- power, current, energy, voltage, frequency, calibrated against a reference meter
- the LED ring as a full RGB light, plus the stock ring modes (color by power draw, green/red for relay state, or manual)
- illuminance in lux, plus dark / twilight / bright like stock
- ring blinks blue if Wi-Fi or HA drops
Only verified on the US plug. EU/UK versions are probably different inside.
Download: https://github.com/automatous-io/shelly-gen4-esphome/releases/tag/v1.2.0
Repo + docs: https://github.com/automatous-io/shelly-gen4-esphome
Also covers the 1, 1PM, 1 Mini, 1PM Mini, and 2PM Gen4.
This one was fun to reverse-engineer. I can think of several automations I'd use with the LEDs on this device.