How do I install the test version? I can’t find the option
380a2c84-092f-4bc7-a145-a81cb9d5b1d8
esphome:
name: riego
friendly_name: Controlador de Riego
esp32:
board: esp32dev
framework:
type: arduino
version: recommended
time:
- platform: sntp
id: sntp_time
timezone: "Europe/Madrid"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
on_connect:
then:
- logger.log: "WIFI: conectado"
on_disconnect:
then:
- logger.log: "WIFI: desconectado"
manual_ip:
static_ip: !secret lan_static_ip
gateway: !secret lan_gateway
subnet: !secret lan_subnet
dns1: !secret lan_dns1
dns2: !secret lan_dns2
ap:
ssid: "WIFI Riego fallback"
password: !secret fallback_password
captive_portal:
\# Safe mode: si el dispositivo falla al arrancar N veces seguidas,
\# entra en modo seguro (solo WiFi+OTA) para poder recuperarlo.
\# Importante en riego: restore_mode: ALWAYS_OFF garantiza que las
\# válvulas permanezcan cerradas durante el arranque seguro.
safe_mode:
num_attempts: 5
reboot_timeout: 3min
\# Enable OTA updates
ota:
- platform: esphome
password: !secret ota_password
\# Enable logging
logger:
level: INFO
\# Enable Home Assistant API
api:
port: 6053
#encryption:
#key: !secret api_key
reboot_timeout: 0s
on_client_connected:
- logger.log:
format: "API: cliente conectado | heap=%.0f B | loop=%.0f ms | rssi=%.1f dBm | uptime=%.0f s"
args:
- "id(heap_free).state"
- "id(loop_time_ms).state"
- "id(wifi_rssi).state"
- "id(uptime_seconds).state"
on_client_disconnected:
- logger.log:
format: "API: cliente desconectado | heap=%.0f B | loop=%.0f ms | rssi=%.1f dBm | uptime=%.0f s"
args:
- "id(heap_free).state"
- "id(loop_time_ms).state"
- "id(wifi_rssi).state"
- "id(uptime_seconds).state"
web_server:
port: 80
#Irrigation specific vars
substitutions:
pulses_per_liter: "396.0"
leak_threshold_lpm: "0.1"
\# Protección térmica
\# temp_protection_c: umbral de temperatura del chip (máx absoluto ESP32: 85°C).
\# Se actúa a 75°C; histéresis: se desactiva a 70°C.
temp_protection_c: "75.0"
\# temp_box_offset_c: diferencia estimada entre la temperatura del aire de
\# la caja y la del chip. El chip suele ser 10-20°C más caliente que el
\# aire que lo rodea según la carga y la ventilación. Ajusta este valor
\# comparando en caliente "Temp caja" vs "ESP Internal Temp" en Homey.
temp_box_offset_c: "15.0"
\# Watchdog / diagnóstico del sistema
\# - loop_time: si sube por encima de \~200ms hay riesgo de watchdog reset
\# - reset_reason: indicará "Task watchdog" si el WDT causó el último reinicio
\# - free heap: útil para detectar memory leaks a largo plazo
debug:
update_interval: 60s
\# Temp & Hum sensors. Intenal & pluged
sensor:
- platform: internal_temperature
name: "ESP Internal Temp"
id: esp_internal_temp
- platform: debug
free:
name: "Heap libre"
id: heap_free
entity_category: diagnostic
loop_time:
name: "Tiempo de loop"
id: loop_time_ms
entity_category: diagnostic
- platform: dht
model: DHT22
pin: GPIO13
temperature:
name: "Temperatura Riego"
id: box_temp
filters:
- filter_out: nan
humidity:
name: "Humedad Riego"
filters:
- filter_out: nan
update_interval: 60s
- platform: uptime
name: "Uptime"
id: uptime_seconds
entity_category: diagnostic
- platform: wifi_signal
name: "RSSI WiFi Riego"
id: wifi_rssi
update_interval: 60s
entity_category: diagnostic
\# Temperatura estimada del chip = temp caja + offset.
\# Sirve de referencia en Homey y es la que dispara la protección térmica.
\# Si en condiciones de carga ves una diferencia sistemática entre este
\# valor y "ESP Internal Temp", ajusta temp_box_offset_c.
- platform: template
name: "Temp estimada chip ESP"
id: estimated_chip_temp
unit_of_measurement: "°C"
accuracy_decimals: 1
entity_category: diagnostic
update_interval: 30s
lambda: |-
if (!id(box_temp).has_state()) return NAN;
const float t = id(box_temp).state;
if (isnan(t)) return NAN;
return t + ${temp_box_offset_c};
text_sensor:
- platform: debug
reset_reason:
name: "Motivo último reinicio"
entity_category: diagnostic
\# ---------------------------------------------------------
\# Protección térmica
\#
\# Si la temperatura interna del ESP32 supera temp_protection_c
\# durante más de 10s, se cierran todas las válvulas y se bloquea
\# la apertura hasta que el chip se enfríe por debajo de (umbral - 5°C).
\#
\# La entidad "Sobrecalentamiento" es visible en Homey para
\# automatizaciones (ej: notificación + bloqueo de riego manual).
\# ---------------------------------------------------------
binary_sensor:
- platform: template
name: "Sobrecalentamiento ESP"
id: overheat
device_class: heat
lambda: |-
if (!id(estimated_chip_temp).has_state()) return false;
const float t = id(estimated_chip_temp).state;
if (isnan(t) || isinf(t)) return false;
// Histéresis: activa en umbral, desactiva 5°C por debajo
if (id(overheat).state) {
return t > (${temp_protection_c} - 5.0f);
}
return t > ${temp_protection_c};
filters:
- delayed_on: 10s # La temperatura debe superar el umbral 10s seguidos
on_press:
then:
- logger.log:
format: "PROTECCION TERMICA ACTIVADA: caja=%.1f C (chip est.=%.1f C) - cerrando valvulas"
args: \["id(box_temp).state", "id(estimated_chip_temp).state"\]
- switch.turn_off: relay_l1
- switch.turn_off: relay_l2
- switch.turn_off: relay_l3
- switch.turn_off: relay_l4
- switch.turn_off: relay_l5
- switch.turn_off: relay_l6
on_release:
then:
- logger.log:
format: "Proteccion termica desactivada: caja=%.1f C (chip est.=%.1f C)"
args: \["id(box_temp).state", "id(estimated_chip_temp).state"\]
\# Include external packages (relays & sensors)
packages:
linea_1: !include riego/linea1.yaml
linea_2: !include riego/linea2.yaml
linea_3: !include riego/linea3.yaml
linea_4: !include riego/linea4.yaml
linea_5: !include riego/linea5.yaml
linea_6: !include riego/linea6.yaml
The device is not failing at the network connection stage. Homey connects to the ESPHome API successfully, but the ESPHome device closes the connection while Homey is requesting the entity list.
So IP, port and encryption look correct.
The main YAML includes several external package files:
riego/linea1.yaml … riego/linea6.yaml
The issue is probably inside one of those package files or in an entity exposed by them. Could you please send those included YAML files as well, and if possible the ESPHome device logs from the moment Homey tries to scan/add the device?
This is the YAML for the first line, the rest are the same changing id numbers
\# =========================================================
\# Línea 1 – Control de riego completo
\#
\# Funcionalidad:
\# - Medición de caudal instantáneo (L/min)
\# - Cálculo de litros por ciclo de riego
\# - Persistencia del último ciclo
\# - Detección de fugas (flujo con relé apagado)
\# - Generación de registro JSON al finalizar el riego
\#
\# Dependencias:
\# - pulses_per_liter (substitutions, definido en Riego.yaml)
\# - leak_threshold_lpm (substitutions)
\# - sntp_time (time: sntp en Riego.yaml)
\# =========================================================
\# ---------------------------------------------------------
\# Variables internas (estado)
\# ---------------------------------------------------------
globals:
\# Litros del ciclo actual "congelados" al apagar el relé
- id: l1_cycle_l
type: float
restore_value: no
initial_value: "0"
\# Litros del último ciclo completo (persistente tras reboot)
- id: l1_last_cycle_l
type: float
restore_value: no
initial_value: "0"
\# Contador de pulsos total al inicio del ciclo
\# Se usa como baseline para calcular litros del ciclo
- id: l1_cycle_start_pulses
type: uint32_t
restore_value: no
initial_value: "0"
\# Indica si hay un ciclo de riego real en curso.
\# Evita que on_turn_off se ejecute durante el arranque y sobrescriba
\# la fecha de fin del último riego con la fecha del reinicio.
- id: l1_cycle_active
type: bool
restore_value: no
initial_value: "false"
\# Timestamp UNIX de inicio del último riego
- id: l1_start_ts
type: uint32_t
restore_value: yes
initial_value: "0"
\# Timestamp UNIX de fin del último riego
- id: l1_end_ts
type: uint32_t
restore_value: yes
initial_value: "0"
\# ---------------------------------------------------------
\# Sensores
\# ---------------------------------------------------------
sensor:
\# -------------------------------------------------------
\# Sensor de caudal (Hall / pulse counter)
\#
\# - Mide pulsos por segundo
\# - Se convierte a L/min con el factor de calibración
\# - Se mantiene un contador total de pulsos
\# -------------------------------------------------------
- platform: pulse_counter
pin:
number: GPIO14
mode:
input: true
pullup: true
name: "Flujo Línea 1"
id: l1_flow_lpm
unit_of_measurement: "L/min"
update_interval: 10s
filters:
- multiply: !lambda 'return 1.0f / ${pulses_per_liter};'
\# Contador acumulado total de pulsos (nunca se reinicia)
total:
id: l1_total_pulses
internal: true
\# -------------------------------------------------------
\# Litros del ciclo actual
\#
\# - Mientras el relé está ON:
\# calcula litros desde el inicio del ciclo
\# - Cuando el relé se apaga:
\# muestra el valor congelado del ciclo
\# -------------------------------------------------------
- platform: template
name: "L1 Litros ciclo actual"
unit_of_measurement: "L"
accuracy_decimals: 2
update_interval: 10s
lambda: |-
if (id(relay_l1).state) {
if (!id(l1_total_pulses).has_state()) {
return id(l1_cycle_l);
}
uint32_t current = (uint32_t) id(l1_total_pulses).state;
uint32_t base = id(l1_cycle_start_pulses);
uint32_t delta;
if (current >= base) {
delta = current - base;
} else {
// Wrap-around de uint32_t
delta = (uint32_t)(0xFFFFFFFFu - base + 1u + current);
}
return (float) delta / ${pulses_per_liter};
}
return id(l1_cycle_l);
\# -------------------------------------------------------
\# Litros del último ciclo completo
\#
\# - Valor persistente
\# - Útil para histórico y reporting
\# -------------------------------------------------------
- platform: template
name: "L1 Litros último ciclo"
unit_of_measurement: "L"
accuracy_decimals: 2
update_interval: 30s
lambda: |-
return id(l1_last_cycle_l);
\# ---------------------------------------------------------
\# Relé / electroválvula
\# ---------------------------------------------------------
switch:
- platform: gpio
pin: GPIO16
name: "Relé Línea 1"
id: relay_l1
\# La mayoría de módulos de relé son activos en LOW
inverted: true
\# Seguridad: nunca arrancar encendido tras reboot
restore_mode: ALWAYS_OFF
\# -----------------------------------------------------
\# Al encender el riego
\# -----------------------------------------------------
on_turn_on:
then:
- logger.log: "L1: on_turn_on disparado"
- lambda: |-
// Guardar el contador de pulsos como baseline
// Si el contador todavía no tiene estado válido, arrancar desde 0
if (!id(l1_total_pulses).has_state()) {
id(l1_cycle_start_pulses) = 0;
} else {
id(l1_cycle_start_pulses) =
(uint32_t) id(l1_total_pulses).state;
}
// Timestamp de inicio del riego
id(l1_start_ts) =
(uint32_t) id(sntp_time).now().timestamp;
// Reset del acumulador del ciclo
id(l1_cycle_l) = 0.0f;
// Marcar que hay un ciclo real en curso
id(l1_cycle_active) = true;
\# -----------------------------------------------------
\# Al apagar el riego
\# -----------------------------------------------------
on_turn_off:
then:
- logger.log: "L1: on_turn_off disparado"
- lambda: |-
// Durante el arranque el relé puede inicializarse en OFF y disparar
// on_turn_off sin que haya habido un ciclo real de riego.
// En ese caso no hay que actualizar litros ni timestamps.
if (!id(l1_cycle_active)) {
return;
}
// Si el contador no tiene estado válido, evitar underflow/wrap falso
if (!id(l1_total_pulses).has_state()) {
id(l1_cycle_l) = 0.0f;
id(l1_last_cycle_l) = 0.0f;
id(l1_cycle_active) = false;
return;
}
// Calcular litros finales del ciclo
uint32_t current =
(uint32_t) id(l1_total_pulses).state;
uint32_t base = id(l1_cycle_start_pulses);
uint32_t delta;
if (current >= base) {
delta = current - base;
} else {
// Wrap-around de uint32_t
delta = (uint32_t)(0xFFFFFFFFu - base + 1u + current);
}
float liters =
(float) delta / ${pulses_per_liter};
// Congelar valores
id(l1_cycle_l) = liters;
id(l1_last_cycle_l) = liters;
// Timestamp de fin
id(l1_end_ts) =
(uint32_t) id(sntp_time).now().timestamp;
// Construir registro JSON para Homey / logging
char buf\[192\];
snprintf(
buf,
sizeof(buf),
"{\\"line\\":1,\\"start_ts\\":%u,\\"end_ts\\":%u,\\"liters\\":%.2f}",
id(l1_start_ts),
id(l1_end_ts),
liters
);
// Publicar el registro
id(l1_last_cycle_record).publish_state(buf);
// Cerrar el ciclo real de riego
id(l1_cycle_active) = false;
\# ---------------------------------------------------------
\# Detección de fugas
\#
\# Se considera fuga si:
\# - el relé está apagado
\# - hay caudal > leak_threshold_lpm
\# - durante más de 30 segundos
\# ---------------------------------------------------------
binary_sensor:
- platform: template
name: "Fuga Línea 1"
id: leak_l1
lambda: |-
if (!id(l1_flow_lpm).has_state()) return false;
const float f = id(l1_flow_lpm).state;
if (isnan(f) || isinf(f)) return false;
if (id(relay_l1).state) return false; // si está regando, nunca es fuga
// histeresis:
if (id(leak_l1).state) {
// ya estaba en fuga: mantener hasta bajar del umbral off
return f > 0.05f;
} else {
// no estaba en fuga: activar solo si supera umbral on
return f > 0.10f;
}
filters:
- delayed_on: 30s
- delayed_off: 10s
\# ---------------------------------------------------------
\# Registro del último ciclo (JSON)
\#
\# Ejemplo:
\# {"line":1,"start_ts":1704403200,"end_ts":1704403500,"liters":12.34}
\# ---------------------------------------------------------
text_sensor:
- platform: template
name: "L1 Último ciclo (registro)"
id: l1_last_cycle_record
internal: true
- platform: template
name: "L1 Inicio último riego"
internal: true
lambda: |-
if (id(l1_start_ts) == 0) {
return {"-"};
}
auto t = ESPTime::from_epoch_local(id(l1_start_ts));
return t.strftime("%Y-%m-%d %H:%M:%S");
- platform: template
name: "L1 Fin último riego"
internal: true
lambda: |-
if (id(l1_end_ts) == 0) {
return {"-"};
}
auto t = ESPTime::from_epoch_local(id(l1_end_ts));
return t.strftime("%Y-%m-%d %H:%M:%S");
Thanks, understood. If all six line YAML files are the same structure, then you don’t need to send all of them yet.
Could you please do one test:
temporarily comment out linea_2 to linea_6 in the main YAML and leave only linea_1 enabled, then flash the ESP32 and try adding it to Homey again.
If Homey can add the device with only one line enabled, then the problem is likely caused by the total number of exposed entities, memory usage, or the repeated line packages together.
If it still fails with only linea_1 enabled, then the issue is inside the base YAML or the linea_1 YAML itself.
https://homey.app/en-tr/app/com.ugrbnk.esphome/ESPHome-Controller/test/
I commented lines 2 to 6, & made log more verbose. I get the same error. This is what I get on the ESP32 logs [18:45:15][D][api.connection:1559]: @2colors/esphome-native-api 1.3.5 (192.168.2.35): tried to access without authentication.
[18:45:15][D][main:329]: API: cliente desconectado | heap=202504 B | loop=47 ms | rssi=-51.0 dBm | uptime=237 s
Could you please try again and run a test? If the device isn’t added, please send another diagnostic log.
https://homey.app/en-tr/app/com.ugrbnk.esphome/ESPHome-Controller/test/
Good news!! I connected and was able to scan the entities.
There is a small glitch: the selection of entities works the opposite way you would spect, those that are not selected are the ones that later appear in the homey device
I compiled again with my 6 lines and was able to connect and select the sensors and relays for my 6 lines. However, with the 6 lines there is some flapping (a couple of disconnections and disconnections) Maybe too much info coming from the esp32?
I made a diagnostic b14d058e-7ae1-48c2-a8fa-343c0a6672e2
I noticed two things in the logs.
First, you were right about the entity selection. The selection logic was working in reverse: unchecked entities were being displayed. I fixed this issue; now, checked entities will be included in the Homey device, while unchecked entities will be hidden.
Second, the fluctuation issue seems to be related to certain switch states that occur before ESPHome provides a true ON/OFF value. Homey was receiving a undefined value for some relay states, which was causing skill value errors. I’ve added a safeguard so the app ignores switch updates until a true Boolean value is obtained.
Please try the next version and check if the 6-line setup is more stable.
https://homey.app/en-tr/app/com.ugrbnk.esphome/ESPHome-Controller/test/
Could you please test the new beta version and let us know the results?
Test v 1.3.12
Changelog
- Fixed Flow support for ESPHome Climate fan modes.
- Fan Speed can now be selected in Flow cards for climate devices.
- Fan Speed options such as Auto, Low, Medium, High, Quiet, etc. are now available in Flow selection lists.
- Improved the Flow card text for select actions to make climate selections clearer.
https://homey.app/en-tr/app/com.ugrbnk.esphome/ESPHome-Controller/test/
Wauw, that’s fast. It is working now in version 1.3.12! Thanks!
A beer is on its way
Thank you for your donation.
Hi, there are still connections and disconnections [15:18:26][D][main:569]: API: cliente desconectado | heap=177940 B | loop=52 ms | rssi=-51.0 dBm | uptime=71755 s
[15:18:39][D][main:569]: API: cliente desconectado | heap=177940 B | loop=52 ms | rssi=-51.0 dBm | uptime=71755 s
[15:18:39][D][main:564]: API: cliente conectado | heap=177940 B | loop=52 ms | rssi=-51.0 dBm | uptime=71755 s
[15:19:54][D][main:569]: API: cliente desconectado | heap=168120 B | loop=55 ms | rssi=-52.0 dBm | uptime=71815 s
[15:20:15][D][main:569]: API: cliente desconectado | heap=185032 B | loop=51 ms | rssi=-52.0 dBm | uptime=71875 s
[15:20:15][D][main:564]: API: cliente conectado | heap=185032 B | loop=51 ms | rssi=-52.0 dBm | uptime=71875 s
[15:20:59][D][main:569]: API: cliente desconectado | heap=185032 B | loop=51 ms | rssi=-51.0 dBm | uptime=71935 s
[15:21:16][D][main:569]: API: cliente desconectado | heap=184496 B | loop=50 ms | rssi=-51.0 dBm | uptime=71935 s
[15:21:16][D][main:564]: API: cliente conectado | heap=184496 B | loop=50 ms | rssi=-51.0 dBm | uptime=71935 s
[15:21:31][D][main:569]: API: cliente desconectado | heap=184496 B | loop=50 ms | rssi=-51.0 dBm | uptime=71935 s
[15:21:47][D][main:569]: API: cliente desconectado | heap=184496 B | loop=50 ms | rssi=-53.0 dBm | uptime=71935 s
[15:21:47][D][main:564]: API: cliente conectado | heap=184496 B | loop=50 ms | rssi=-53.0 dBm | uptime=71935 s
[15:23:19][D][main:569]: API: cliente desconectado | heap=182340 B | loop=53 ms | rssi=-52.0 dBm | uptime=72055 s
[15:23:52][D][main:569]: API: cliente desconectado | heap=182340 B | loop=53 ms | rssi=-53.0 dBm | uptime=72055 s
[15:23:52][D][main:564]: API: cliente conectado | heap=182340 B | loop=53 ms | rssi=-53.0 dBm | uptime=72055 s
[15:24:08][D][main:569]: API: cliente desconectado | heap=156208 B | loop=50 ms | rssi=-53.0 dBm | uptime=72115 s
[15:24:25][D][main:569]: API: cliente desconectado | heap=156208 B | loop=50 ms | rssi=-53.0 dBm | uptime=72115 s
[15:24:25][D][main:564]: API: cliente conectado | heap=156208 B | loop=50 ms | rssi=-53.0 dBm | uptime=72115 s
[15:29:05][D][main:569]: API: cliente desconectado | heap=184396 B | loop=51 ms | rssi=-52.0 dBm | uptime=72415 s
[15:29:40][D][main:569]: API: cliente desconectado | heap=184396 B | loop=51 ms | rssi=-52.0 dBm | uptime=72415 s
[15:29:54][D][main:569]: API: cliente desconectado | heap=184396 B | loop=51 ms | rssi=-52.0 dBm | uptime=72415 s
[15:29:54][D][main:564]: API: cliente conectado | heap=184396 B | loop=51 ms | rssi=-52.0 dBm | uptime=72415 s
[15:32:20][D][main:569]: API: cliente desconectado | heap=178004 B | loop=50 ms | rssi=-52.0 dBm | uptime=72595 s
[15:32:44][D][main:569]: API: cliente desconectado | heap=178004 B | loop=50 ms | rssi=-52.0 dBm | uptime=72595 s
[15:32:44][D][main:564]: API: cliente conectado | heap=178004 B | loop=50 ms | rssi=-52.0 dBm | uptime=72595 s
[15:33:37][D][main:569]: API: cliente desconectado | heap=180980 B | loop=46 ms | rssi=-52.0 dBm | uptime=72655 s
[15:33:49][D][main:569]: API: cliente desconectado | heap=180980 B | loop=46 ms | rssi=-52.0 dBm | uptime=72655 s
[15:33:49][D][main:564]: API: cliente conectado | heap=180980 B | loop=46 ms | rssi=-52.0 dBm | uptime=72655 s
[15:34:39][D][main:569]: API: cliente desconectado | heap=164716 B | loop=50 ms | rssi=-52.0 dBm | uptime=72715 s
Test v 1.3.13
@Daniel_de_los_Reyes
I noticed that the app was attempting to re-establish the ESPHome API connection too aggressively; this can cause repeated disconnections and reconnections on devices hosting a large number of entities. Your device is hosting too many entities. To give the local ESPHome connection more time to recover before the app establishes a new connection, I’ve adjusted the reconnection and ping settings. Please test the next version and check whether the number of API connection loss messages has decreased.
https://homey.app/en-tr/app/com.ugrbnk.esphome/ESPHome-Controller/test/
Hi, this is what I see in the logs today
[19:08:28][D][main:564]: API: cliente conectado | heap=185340 B | loop=42 ms | rssi=-51.0 dBm | uptime=171955 s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.095s
INFO Successful handshake with riego @ 192.168.2.7 in 0.050s
[19:24:29][D][main:564]: API: cliente conectado | heap=134136 B | loop=41 ms | rssi=-51.0 dBm | uptime=172915 s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.015s
INFO Successful handshake with riego @ 192.168.2.7 in 0.045s
[19:32:47][D][main:564]: API: cliente conectado | heap=134144 B | loop=43 ms | rssi=-51.0 dBm | uptime=173395 s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.011s
INFO Successful handshake with riego @ 192.168.2.7 in 0.041s
[20:02:18][D][main:564]: API: cliente conectado | heap=111740 B | loop=44 ms | rssi=-52.0 dBm | uptime=175195 s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.016s
INFO Successful handshake with riego @ 192.168.2.7 in 0.045s
[20:18:23][D][main:564]: API: cliente conectado | heap=134152 B | loop=44 ms | rssi=-51.0 dBm | uptime=176155 s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.214s
INFO Successful handshake with riego @ 192.168.2.7 in 0.112s
[20:34:49][D][main:564]: API: cliente conectado | heap=134140 B | loop=44 ms | rssi=-52.0 dBm | uptime=177115 s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.014s
INFO Successful handshake with riego @ 192.168.2.7 in 0.032s
[20:50:54][D][main:564]: API: cliente conectado | heap=130996 B | loop=43 ms | rssi=-52.0 dBm | uptime=178135 s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.009s
INFO Successful handshake with riego @ 192.168.2.7 in 0.036s
[21:07:00][D][main:564]: API: cliente conectado | heap=152148 B | loop=42 ms | rssi=-51.0 dBm | uptime=179095 s
WARNING riego @ 192.168.2.7: Connection error occurred: riego @ 192.168.2.7: EOF received
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.024s
INFO Successful handshake with riego @ 192.168.2.7 in 0.134s
[21:39:38][D][main:569]: API: cliente desconectado | heap=178976 B | loop=45 ms | rssi=-51.0 dBm | uptime=180055 s
WARNING riego @ 192.168.2.7: Connection error occurred: riego @ 192.168.2.7: EOF received
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.013s
INFO Successful handshake with riego @ 192.168.2.7 in 0.036s
[21:39:41][D][main:564]: API: cliente conectado | heap=134212 B | loop=37 ms | rssi=-51.0 dBm | uptime=181015 s
WARNING riego @ 192.168.2.7: Connection error occurred: riego @ 192.168.2.7: EOF received
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.013s
INFO Successful handshake with riego @ 192.168.2.7 in 0.041s
WARNING riego @ 192.168.2.7: Connection error occurred: [Errno 54] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for riego @ 192.168.2.7
WARNING Disconnected from API
INFO Successfully connected to riego @ 192.168.2.7 in 0.013s
INFO Successful handshake with riego @ 192.168.2.7 in 0.032s
[21:56:13][D][main:564]: API: cliente conectado | heap=158728 B | loop=37 ms | rssi=-51.0 dBm | uptime=182035 s
From what I can tell, the ESP32 itself doesn’t seem to crash or lose its Wi-Fi connection. The RSSI is good, and the API reconnects immediately after each disconnection. The log shows that the ESPHome API/log client connection is reset and then reestablished. This situation can occur when multiple clients—such as Homey, the ESPHome Dashboard/log viewer, the web server, or another integration—are connected at the same time.
Could you check whether the Homey device actually becomes inaccessible at the same time, or if this is only visible in the ESPHome logs? If Homey remains online, this is likely a harmless API/log client reconnection issue.
For testing purposes, disable the ESPHome live log/dashboard connection and leave only Homey connected for a while. If the connection interruptions stop or become less frequent, the issue is likely related to multiple API clients rather than the Homey app itself.
V 1.3.15
Fixed an issue where light brightness was sent and read at the wrong scale (lights no longer jump to full brightness all the time)
Fixed light color temperature and RGB color mode detection; added hue/saturation feedback based on device status
The issue where the lock status was never updated and the lock/unlock command could work in reverse has been fixed
Garage door open/closed detection has been fixed; the on/off toggle now reflects the actual door status
Support for the ESPHome Siren (alarm/buzzer) entity has been added (on/off + volume)
The issue where fan/number sliders remained out of sync with the device’s actual (stepped) speed after a lockout has been fixed — they now resync to the last known state once the lockout ends
A similar synchronization issue during movement on the curtain position slider has been fixed
Fixed an issue where numerical input sliders were sending values at the wrong scale
Fixed an issue where the “Compare Sensor Value” flow card would fail when the sensor value was received as text
Hi, today it had several connections and disconnections and at one point the app disconnected from de ESP32 (that was live and working ok) and just did not reconnect again. After some time I rebooted the app and it reconnected again

