Hi there. I’ve been having some issues with a custom made esphome device that I use for my furnace. From time to time, the board seems to lose connection. It started doing so recently and I did not change anything.
When I download the esphome logs it says:
WARNING stufa @ 192.168.1.199: Connection error occurred: Ping response not received after 90.0 seconds
INFO Processing unexpected disconnect from ESPHome API for stufa @ 192.168.1.199
WARNING Disconnected from API
WARNING Can't connect to ESPHome API for stufa @ 192.168.1.199: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.199', port=6053))]: [Errno 113] Connect call failed ('192.168.1.199', 6053) (SocketAPIError)
INFO Trying to connect to stufa @ 192.168.1.199 in the background
INFO Successfully connected to stufa @ 192.168.1.199 in 0.028s
WARNING stufa @ 192.168.1.199: Connection error occurred: stufa @ 192.168.1.199: Connection lost
And in HA it says:
Can't connect to ESPHome API for stufa @ 192.168.1.199: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.199', port=6053))]: [Errno 113] Connect call failed ('192.168.1.199', 6053) (SocketAPIError)
Here is the full esphome config for the device:
esphome:
name: stufa
friendly_name: stufa
esp8266:
board: nodemcu
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "***"
ota:
- platform: esphome
password: "***"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Stufa Fallback Hotspot"
password: "JGwtFfXgiSV2"
captive_portal:
image:
- file: "images/thermometer.png"
id: temperature_image
resize: 35x35
type: TRANSPARENT_BINARY
- file: "images/fire-flame.png"
id: flame_small
resize: 15x15
type: TRANSPARENT_BINARY
- file: "images/fire-flame.png"
id: flame_big
resize: 35x35
type: TRANSPARENT_BINARY
- file: "images/wifi.png"
id: wifi_image
resize: 15x15
type: TRANSPARENT_BINARY
- file: "images/no-signal.png"
id: no_signal
resize: 15x15
type: TRANSPARENT_BINARY
switch:
- platform: gpio
pin:
number: GPIO16
inverted: true
name: "Stufa forte/piano"
id: forte
- platform: gpio
pin: GPIO3
name: "Accensione"
id: power
one_wire:
- platform: gpio
pin: GPIO5
id: dallastemp
sensor:
- platform: dallas_temp
one_wire_id: dallastemp
address: 0xf403179779378428
name: "Temperatura"
id: temperature
update_interval: 30s
- platform: homeassistant
id: set_temperature
entity_id: climate.stufa_custom
attribute: temperature
- platform: rotary_encoder
name: "Rotary Encoder"
pin_a: GPIO13
pin_b: GPIO2
on_clockwise:
- homeassistant.service:
service: climate.set_temperature
data_template:
entity_id: climate.stufa_custom
temperature: !lambda "return id(set_temperature).state - 0.5;"
on_anticlockwise:
- homeassistant.service:
service: climate.set_temperature
data_template:
entity_id: climate.stufa_custom
temperature: !lambda "return id(set_temperature).state + 0.5;"
font:
- file: "fonts/ARIAL.TTF"
id: font1
size: 10
spi:
clk_pin: GPIO4
mosi_pin: GPIO0
binary_sensor:
- platform: status
name: "Stufa Status"
id: status_ha
display:
- platform: ssd1306_spi
model: "SSD1306 128x64"
cs_pin: GPIO14
dc_pin: GPIO12
lambda: |-
it.printf(50, 5, id(font1), "Stufa");
if(id(status_ha).state==1){
it.image(85,5,id(wifi_image));
} else {
it.image(85,5,id(no_signal));
}
it.image(10, 10, id(temperature_image));
it.printf(50, 25, id(font1), "%.1f°C", id(set_temperature).state);
if (id(power).state && !id(forte).state) {
it.image(90,25,id(flame_small));
}else if (id(power).state && id(forte).state){
it.image(90,10,id(flame_big));
} else {
it.printf(90,25,id(font1),"OFF");
}
it.printf(10, 50, id(font1), "Temp. attuale: %.1f°C", id(temperature).state);
Am I missing something?