Ciao a tutti giusto per smanettare, sto utilizzando un ESP32 ed un LCD 16X2 con i2c per capirne il funzionamento ed accoppiarlo, in seguito, ad una sonda di temperatura DS18B20, per controllare la temperatura dell’acqua del mipo acquario e creare, eventualmente, delle automazioni con Home Assistant.
Per il solo LCD ho utilizzato questo codice e sul display leggo Hello World !!!
esphome:
name: lcd-test
friendly_name: lcd_test
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "smzE4PLZrsI0LQ6V4vX1VMXuxpd53BIfnOU7b3uZcm0="
ota:
- platform: esphome
password: "4120598964af97c942418f94dc72f6e5"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.178.84
gateway: 192.168.178.1
subnet: 255.255.255.0
dns1: 192.168.178.1
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lcd-Test Fallback Hotspot"
password: "ZX7CfrGD5o1h"
captive_portal:
i2c:
sda: GPIO21
scl: GPIO22
scan: True
display:
- platform: lcd_pcf8574
dimensions: 16x2
address: 0x3f
id: lcd
update_interval: 20s
lambda: |-
it.print("Lillo&Rosa");
web_server:
port: 80
Il problema è che qualsiasi modifica faccia al codice ed installi quindi, sull’ESP32 il nuovo codice, questo non viene caricato sulla scheda e resta tutto invariato (ad esempio ho cambiato Hello World !!! con Maxi Carota, ma sul display continuo a leggere Hello Word - lo stesso cambiando l’IP statico dell’esp da 192.168.178.84 a 192.168.178.80, ma resta a 84)
Considerate che l’ESP32 fisicamente non è collegato sul raspberry dove gira HA, ma sul PC ed utilizzo l’opzione “Plug on this computer”.
Ciao e grazie.
Hello everyone, just for fun, I’m using an ESP32 and a 16X2 LCD with i2c to understand how it works and to couple it with a DS18B20 temperature probe to control the water temperature in my aquarium and possibly create automations with Home Assistant.
For the LCD alone, I have used this code and on the display I read Hello World !!!
esphome:
name: lcd-test
friendly_name: lcd_test
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "smzE4PLZrsI0LQ6V4vX1VMXuxpd53BIfnOU7b3uZcm0="
ota:
- platform: esphome
password: "4120598964af97c942418f94dc72f6e5"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.178.84
gateway: 192.168.178.1
subnet: 255.255.255.0
dns1: 192.168.178.1
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lcd-Test Fallback Hotspot"
password: "ZX7CfrGD5o1h"
captive_portal:
i2c:
sda: GPIO21
scl: GPIO22
scan: True
display:
- platform: lcd_pcf8574
dimensions: 16x2
address: 0x3f
id: lcd
update_interval: 20s
lambda: |-
it.print("Lillo&Rosa");
web_server:
port: 80
The problem is that whatever changes I make to the code and then install the new code on the ESP32, it is not loaded on the board and everything remains unchanged (for example, I changed Hello World !!! to Maxi Carrot, but on the display I still read Hello Word - the same when I changed the static IP of the ESP from 192.168.178.84 to 192.168.178.80, but it remains at 84)
Consider that the ESP32 is not physically connected on the raspberry where HA runs, but on the PC and I use the ‘Plug on this computer’ option.
Hello and thank you.