Device partially stops responding after "HTTP Request failed"
Hi,
I am using a ESP device for monitoring. I retrieve the data via the API interface using the http_request component. Sometimes it happens that the device partially stops responding - the display gets stuck, the sensors stops updating and the logs stop being loaded into the HA ESPhome interface - see. below.
Ping to device works.
The web page of the sensors responds, but loads the header with information about the running time only (the time continues on).
The device cannot be updated via OTA.
The only thing that helps is a reboot.
The problem appears randomly, propably depending on the unspecified responses of monitored device, which is difficult to simulate.
But the identical problem occurs and appears almost immediately when I set the timeout of request to a low value. The following logs describe such a situation.
[18:11:59][D][esp-idf:000]: W (285574) HTTP_CLIENT: Connection timed out before data was ready!
[18:11:59][E][http_request.idf:172]: HTTP Request failed; URL: http://10.27.27.200/; Code: -1
[18:11:59][E][component:164]: Component http_request set Error flag: unspecified
AND NOW IS OVER
After some time the following messages are added:
WARNING guition-esp32-4848s040 @ 10.27.28.30: Connection error occurred: Ping response not received after 90.0 seconds
INFO Processing unexpected disconnect from ESPHome API for guition-esp32-4848s040 @ 10.27.28.30
WARNING Disconnected from API
INFO Successfully connected to guition-esp32-4848s040 @ 10.27.28.30 in 0.133s
WARNING Can't connect to ESPHome API for guition-esp32-4848s040 @ 10.27.28.30: Timeout waiting for HelloResponse, ConnectResponse after 30.0s (TimeoutAPIError)
INFO Trying to connect to guition-esp32-4848s040 @ 10.27.28.30 in the background
WARNING guition-esp32-4848s040 @ 10.27.28.30: Connection error occurred: guition-esp32-4848s040 @ 10.27.28.30: Connection lost
INFO Successfully connected to guition-esp32-4848s040 @ 10.27.28.30 in 0.121s
WARNING guition-esp32-4848s040 @ 10.27.28.30: Connection error occurred: guition-esp32-4848s040 @ 10.27.28.30: Connection lost
INFO Successfully connected to guition-esp32-4848s040 @ 10.27.28.30 in 0.155s
WARNING guition-esp32-4848s040 @ 10.27.28.30: Connection error occurred: guition-esp32-4848s040 @ 10.27.28.30: Connection lost
INFO Successfully connected to guition-esp32-4848s040 @ 10.27.28.30 in 0.250s
WARNING guition-esp32-4848s040 @ 10.27.28.30: Connection error occurred: guition-esp32-4848s040 @ 10.27.28.30: Connection lost
Finally, I managed to catch the error message with a long enough timeout (8s):
21:15:45 [D] [esp-idf:000] �[0;31mE (2416453) transport_base: poll_read select error 104, errno = Connection reset by peer, fd = 60
21:15:45 [E] [http_request.idf:172] HTTP Request failed; URL: http://10.27.27.200/; Code: -1
21:15:45 [E] [component:164] Component http_request set Error flag: unspecified
It looks like a problem in http_request when the request fails.
Thx for help.
Which version of ESPHome has the issue?
2024.12.2
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2025.1.0
What platform are you using?
ESP32-IDF
Board
Guition ESP32-S3-4848S040
Component causing the issue
http_request
YAML Config
# Substitution variables used through the codebase
substitutions:
lightbulb: "\U000F0335"
ceiling_light: "\U000F0769"
lamp: "\U000F06B5"
floor_lamp: "\U000F08DD"
string_lights: "\U000F12BA"
track_light: "\U000F0914"
bulkhead_light: "\U000F1A2F"
led_strip: "\U000F07D6"
coach_lamp: "\U000F1020"
ceiling_fan_light: "\U000F1798"
icon_font: light40
text_font: roboto24
screen_height: '480px'
screen_width: '480px'
button_on_color: "burnt_sienna"
button_off_color: "very_dark_gray"
icon_on_color: "yellow"
icon_off_color: "gray"
label_on_color: "white"
label_off_color: "gray"
button_text_color: "white"
button_height_single: '109px'
button_height_double: '228px'
button_width: '150px'
touchscreen_idle_timeout: "120s"
touchscreen_daytime_brightness: "100%"
touchscreen_nighttime_brightness: "50%"
# Boot screen configuration
boot_screen_delay: 60s
# Screen goes to sleep at Mightnight
screen_sleep_hour: '0'
screen_sleep_minute: '0'
# Screen wakes up at 5:30am
screen_wake_hour: '5'
screen_wake_minute: '30'
# Button 1 is a local relay
button_1_name: "Local Light"
button_1_id: local_light
button_1_icon: $lightbulb
button_1_device: "internal_relay_1"
# Button 2 is a switch (some devcies show up as switches some as lights make sure you use the corresponding file)
button_2_name: "Button 2"
button_2_id: couch_lamp
button_2_icon: $lightbulb
button_2_device: "switch.athom_smart_plug_v3_50ebc0_switch"
# Button 3 is an empty object that requires no settings. It just pushes everything down one button
# Button 4 is dimmable light
button_4_name: "RGB light"
button_4_id: rgb_light
button_4_icon: $string_lights
button_4_device: light.athom_rgb_light_d93662_rgb_light_strip
esphome:
name: "guition-esp32-4848s040"
friendly_name: "Guition480"
comment: "Guition ESP32-4848S040 480px * 480px Smart Screen"
ota:
- platform: esphome
password: "*****************************"
debug:
packages:
# Generic configuration for ESP32 screens
base: !include modules/common/base.yaml
globals: !include modules/common/globals.yaml
wifi: !include modules/common/wifi.yaml
colors: !include modules/common/color.yaml
fonts: !include modules/common/fonts.yaml
images: !include modules/common/images.yaml
# Harware description file
hardware: !include modules/hardware/guition-esp32-s3-4848s040.yaml
# Base settings for LVGL libary
lvgl_time: !include modules/lvgl/base/lvgl_time_sntp.yaml
lvgl_sensors: !include modules/lvgl/base/lvgl_sensors_base.yaml
lvgl_base: !include modules/lvgl/base/lvgl_base.yaml
# Time update script
lvgl_time_update: !include modules/lvgl/base/lvgl_time_update_none.yaml
# -------------------------------------------------------------------------
# LVGL pages and buttons
# -------------------------------------------------------------------------
lvgl:
theme: !include { file: modules/lvgl/base/lvgl_theme.yaml }
page_wrap: false
# Boot screen
top_layer: !include { file: modules/lvgl/screens/boot_screen.yaml }
style_definitions:
- id: popisky
text_font: montserrat_14 # Nastavte požadovanou velikost fontu
# Main Page
pages:
- id: main_page
width: "100%"
scrollbar_mode: "OFF" # Zakáže zobrazení posuvníků
scroll_chain: "OFF" # Zakáže pohyb obrazovky při posunu prstem
bg_color: black
bg_opa: cover
#pad_all: 5
widgets: # Include all the buttons
- label:
align: CENTER
x: 0
y: -100
id: lbl_idkw
recolor: true
text_color: 0x404040 # barva a velikost popisků
text_font: montserrat_40
text: "kW"
- label:
align: CENTER
x: 0
y: -50
id: lbl_time
recolor: true
text_color: 0x404040 # barva a velikost popisků
text_font: montserrat_32
text: "hodiny"
- label:
align: CENTER
x: 0
y: 50
id: lbl_uptime
recolor: true
text_color: 0x404040 # barva a velikost popisků
text_font: montserrat_32
text: "uptime"
- label:
align: CENTER
x: 0
y: 100
id: lbl_idbat
recolor: true
text_color: 0x0000FF # barva a velikost popisků
text_font: montserrat_40
text: "XX%"
- label:
align: CENTER
x: 0
y: 210
id: lbl_idcomment
recolor: true
text_color: 0x00ff00 # barva a velikost popisků
text_font: montserrat_32
text: "#CC9900 FVE# #3333FF BATT# #009933 GRID#"
#text: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- arc: # Vyroba FVE
id: arc_id1
align: CENTER
x: 0
y: 0
width: 480
height: 480
value: 4000
min_value: 0
max_value: 10000
adjustable: false
arc_opa: 0
arc_color: 0x404040
arc_width: 20
bg_opa: 0
start_angle: 150
end_angle: 30
arc_rounded: false
indicator:
arc_width: 20
arc_color: 0xcc9900
arc_rounded: false
- arc: # polozka 2
id: arc_id2
align: CENTER
x: 0
y: 0
width: 460
height: 460
bg_opa: 0
value: 0
min_value: 0
max_value: 10000
adjustable: false
arc_opa: 0
arc_color: 0x444444
arc_width: 10
start_angle: 150
end_angle: 30
arc_rounded: false
indicator:
arc_width: 10
arc_color: 0xFF00FF
arc_rounded: false
- arc: # polozka nabijeni/vybijeni baterie
id: arc_batt_power
align: CENTER
x: 0
y: 0
width: 460
height: 460
bg_opa: 0
value: 3000
rotation: 0
min_value: 0
max_value: 10000
adjustable: false
arc_opa: 0
arc_color: 0x444444
arc_width: 10
start_angle: 150
end_angle: 30
arc_rounded: false
indicator:
arc_width: 10
arc_color: 0x3333FF
arc_rounded: false
- arc: # polozka GRID
id: arc_feedin
align: CENTER
x: 0
y: 0
width: 460
height: 460
bg_opa: 0
value: 3000
rotation: 90
min_value: 0
max_value: 10000
adjustable: false
arc_opa: 0
arc_color: 0x444444
arc_width: 10
start_angle: 150
end_angle: 30
arc_rounded: false
indicator:
arc_width: 10
arc_color: 0x009933
arc_rounded: false
- meter:
id: meter1
x: 0
y: 0
width: 480
height: 480
border_width: 0
border_color: red
bg_opa: 0
align: CENTER
text_color: 0x404040 # barva a velikost popisků
text_font: montserrat_20
on_press:
then:
#- lvgl.page.next:
- logger.log: "dotyk meter"
scales:
- range_from: 0 # scale for the needle value
range_to: 10000
angle_range: 240
rotation: 150
indicators:
- line:
id: spotreba_needle
width: 3
color: 0xFF0000
r_mod: -4
- tick_style: # styl carek
start_value: 0
end_value: 10
color_start: 0x404040
#color_end: 0xbd0000
color_end: 0x404040
width: 1
- range_from: 0 # scale for the value labels
range_to: 10
angle_range: 240
rotation: 150
ticks:
width: 1
count: 21
length: 10
color: 0xff0000
major:
stride: 2
width: 2
length: 20
color: 0xff0000
label_gap: 20
#text_
#labels:
# font_size: 16 # Change this to your desired font size
# color: 0xFF0000 # Change this to your desired font color
- id: page2
# layout:
# type: flex
# flex_flow: COLUMN_WRAP
width: "100%"
scrollbar_mode: "OFF"
bg_color: black
bg_opa: cover
pad_all: 5
widgets: # Include all the buttons
- arc: # Vyroba FVE
id: arc_id21
align: CENTER
x: 0
y: 0
width: 480
height: 480
value: 4000
min_value: 0
max_value: 10000
adjustable: false
arc_color: 0x404040
arc_width: 20
start_angle: 150
end_angle: 30
arc_rounded: false
on_press:
then:
#- lvgl.page.next:
- logger.log: "aaaaaa"
indicator:
arc_color: "gold"
arc_rounded: false
- button:
width: 20
height: 20
id: page_prevp2
align: CENTER
x: -220
y: -220
pressed: # set some button colors to be different in pressed state
bg_color: 0x006699
bg_grad_color: 0x00334d
widgets:
- label:
align: center
text: "<" #\uF053
on_press:
then:
- lvgl.page.next:
- logger.log: "<"
globals:
- id: touch_timer_reset
type: bool
restore_value: no
initial_value: 'true'
touchscreen:
on_touch: #zapinani displeje pri dotyku
then:
# - light.turn_on:
# id: display_backlight
- lambda: |-
auto call = id(display_backlight).turn_on();
call.perform();
id(touch_timer_reset) = true;
- logger.log: "dotyk"
http_request:
id: solaxdotaz
timeout: 2s #10s
verify_ssl: false
watchdog_timeout: 14s #60s
switch:
- platform: restart
name: "Restart device"
id: restart_sw
time:
- platform: sntp
id: sntp_time
interval:
- interval: 1s
id: interval1s
then:
- lambda: |-
auto time = id(sntp_time).now();
lv_label_set_text(id(lbl_time), (time.strftime("%H:%M:%S")).c_str());
//uptime
int seconds = id(uptime_sensor).state;
int days = seconds / 86400;
seconds = seconds % 86400;
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
char buffer[32];
sprintf(buffer, "Uptime: %d d %02d:%02d:%02d", days, hours, minutes, seconds);
lv_label_set_text(id(lbl_uptime), buffer);
- interval: 15s #20s
then:
- http_request.post:
url: "http://10.27.27.200/"
headers:
Content-Type: application/x-www-form-urlencoded
body: "optType=*******&pwd=*********"
capture_response: true
on_error:
then:
- logger.log: "HTTP Request failed - problem"
#- switch.turn_on: restart_sw
on_response:
then:
- lambda: |-
ESP_LOGI("solaxdotaz", "before RS!");
int status_code = response->status_code;
if (status_code == 200) {
ESP_LOGI("solaxdotaz", "Request succeeded!");
json::parse_json(body, [](JsonObject root) -> bool {
if (root["Data"]) {
static int polozky[310];
String data = root["Data"];
const char* str = data.c_str();
int num = 0;
int j = 0;
for (int i = 0; str[i] != '\0'; i++) {
if (isdigit(str[i])) {
num = num * 10 + (str[i] - '0');
} else if (str[i] == ',' || str[i] == ' ') {
polozky[j++] = num;
num = 0;
}
}
polozky[j++] = num;
id(spotrebasum).publish_state(std::to_string(polozky[7]));
// vyroba fve
id(fve_vyroba).publish_state(std::to_string(polozky[4]+polozky[5]));
id(pv1_power).publish_state(std::to_string(polozky[4])+"W");
id(pv2_power).publish_state(std::to_string(polozky[5])+"W");
id(soc).publish_state(std::to_string(polozky[203])+"%");
if (polozky[144] > 32767) {polozky[144] -= 65536 ; } //odecteni 65536
id(feedin).publish_state(polozky[144]);
if (polozky[147] > 32767) {polozky[147] -= 65536 ; }
id(consumption).publish_state((polozky[147]));
if (polozky[141] > 32767) {polozky[141] -= 65536 ; }
id(battery_power).publish_state(polozky[141]);
id(gridintoday).publish_state(std::to_string(polozky[192]/100)+"W");
id(datasolaxpocet).publish_state(std::to_string(j));
//zapis do senzoru
ESP_LOGI("solaxdotaz", "zacatek nastavovani sensoru");
lv_label_set_text(id(lbl_idbat), id(soc).state.c_str());
lv_meter_set_indicator_value( id(meter1), id(spotreba_needle), id(consumption).state ) ;
lv_arc_set_value(id(arc_id1), atoi(id(fve_vyroba).state.c_str()) );
lv_arc_set_value(id(arc_id21), id(consumption).state );
//nastaveni baterie bar
lv_arc_set_rotation(id(arc_batt_power), std::min( (id(consumption).state + id(battery_power).state), id(consumption).state ) * 0.024 );
lv_arc_set_value(id(arc_batt_power), fabs(id(battery_power).state) );
//nastaveni feed in
lv_arc_set_rotation(id(arc_feedin), std::min( (id(consumption).state + id(battery_power).state + id(feedin).state), id(consumption).state + id(battery_power).state ) * 0.024 );
lv_arc_set_value(id(arc_feedin), fabs(id(feedin).state) );
ESP_LOGI("solaxdotaz", "konec nastavovani sensoru");
return true;
} else {
ESP_LOGD(esphome::st7701s::TAG,"No 'Data' key in this json!");
return false;
}
});
} else {
ESP_LOGE("solaxdotaz", "Request failed with status code %d", status_code);
}
text_sensor:
- platform: wifi_info
ip_address:
name: "IP Address"
entity_category: diagnostic
ssid:
name: "Connected SSID"
entity_category: diagnostic
mac_address:
name: "Mac Address"
entity_category: diagnostic
- platform: template
name: "dataSOLAX"
id: data_solax
- platform: template
name: "dataSOLAX-pocet"
id: datasolaxpocet
- platform: template
name: "FVE vyroba"
id: fve_vyroba
- platform: template
name: "sporeba SUM"
id: spotrebasum
- platform: template
name: "PV1"
id: pv1_power
- platform: template
name: "PV2"
id: pv2_power
- platform: template
name: "Stav baterie"
id: soc
- platform: template
name: "Grid in today"
id: gridintoday
sensor:
- platform: debug
free:
name: "Heap Free"
block:
name: "Heap Max Block"
loop_time:
name: "Loop Time"
psram:
name: "Free PSRAM"
- platform: uptime
name: "Uptime Sensor"
id: uptime_sensor
- platform: template
name: "battery power"
id: battery_power
- platform: template
name: "solax consumption"
id: consumption
- platform: template
name: "Feed in" # zaporne dodavka z gridu, kladné - prodej energie
id: feedin
Anything in the logs that might be useful for us?
full log from boot with small timeout set:
INFO ESPHome 2024.12.2
INFO Reading configuration /config/esphome/guition-esp32-s3-4848s040-display_modular.yaml...
WARNING GPIO45 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Detected timezone 'Europe/Prague'
INFO Detected timezone 'Europe/Prague'
INFO Starting log output from 10.27.28.30 using esphome API
INFO Successfully connected to guition-esp32-4848s040 @ 10.27.28.30 in 0.177s
INFO Successful handshake with guition-esp32-4848s040 @ 10.27.28.30 in 0.026s
[19:00:47][I][app:100]: ESPHome version 2024.12.2 compiled on Jan 13 2025, 18:03:30
[19:00:47][C][wifi:600]: WiFi:
[19:00:47][C][wifi:428]: Local MAC: 24:58:7C:D7:9F:24
[19:00:47][C][wifi:433]: SSID: [redacted]
[19:00:47][C][wifi:436]: IP Address: 10.27.28.30
[19:00:47][C][wifi:439]: BSSID: [redacted]
[19:00:47][C][wifi:441]: Hostname: 'guition-esp32-4848s040'
[19:00:47][C][wifi:443]: Signal strength: -64 dB ▂▄▆█
[19:00:47][C][wifi:447]: Channel: 1
[19:00:47][C][wifi:448]: Subnet: 255.255.255.0
[19:00:47][C][wifi:449]: Gateway: 10.27.28.1
[19:00:47][C][wifi:450]: DNS1: 10.27.28.1
[19:00:47][C][wifi:451]: DNS2: 31.30.90.11
[19:00:47][C][logger:185]: Logger:
[19:00:47][C][logger:186]: Level: DEBUG
[19:00:47][C][logger:188]: Log Baud Rate: 115200
[19:00:47][C][spi:064]: SPI bus:
[19:00:48][C][spi:065]: CLK Pin: GPIO48
[19:00:48][C][spi:066]: SDI Pin:
[19:00:48][C][spi:067]: SDO Pin: GPIO47
[19:00:48][C][spi:072]: Using HW SPI: SPI2_HOST
[19:00:48][C][ledc.output:180]: LEDC Output:
[19:00:48][C][ledc.output:181]: Pin GPIO38
[19:00:48][C][ledc.output:182]: LEDC Channel: 0
[19:00:48][C][ledc.output:183]: PWM Frequency: 100.0 Hz
[19:00:48][C][ledc.output:184]: Phase angle: 0.0°
[19:00:48][C][ledc.output:185]: Bit depth: 14
[19:00:48][C][gpio.output:010]: GPIO Binary Output:
[19:00:48][C][gpio.output:011]: Pin: GPIO40
[19:00:48][C][gpio.output:010]: GPIO Binary Output:
[19:00:48][C][gpio.output:011]: Pin: GPIO2
[19:00:48][C][gpio.output:010]: GPIO Binary Output:
[19:00:48][C][gpio.output:011]: Pin: GPIO1
[19:00:48][C][uptime.sensor:033]: Uptime Sensor 'Uptime Sensor'
[19:00:48][C][uptime.sensor:033]: Device Class: 'duration'
[19:00:48][C][uptime.sensor:033]: State Class: 'total_increasing'
[19:00:48][C][template.sensor:022]: Template Sensor 'solax consumption'
[19:00:48][C][template.sensor:022]: State Class: ''
[19:00:48][C][template.sensor:022]: Unit of Measurement: ''
[19:00:48][C][template.sensor:022]: Accuracy Decimals: 1
[19:00:48][C][template.sensor:023]: Update Interval: 60.0s
[19:00:48][C][template.sensor:022]: Template Sensor 'Feed in'
[19:00:48][C][template.sensor:022]: State Class: ''
[19:00:48][C][template.sensor:022]: Unit of Measurement: ''
[19:00:48][C][template.sensor:022]: Accuracy Decimals: 1
[19:00:48][C][template.sensor:023]: Update Interval: 60.0s
[19:00:48][C][template.text_sensor:020]: Template Sensor 'Last Restart'
[19:00:48][C][template.text_sensor:020]: Icon: 'mdi:clock'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'dataSOLAX'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'dataSOLAX-pocet'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'FVE vyroba'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'sporeba SUM'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'PV1'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'PV2'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'Stav baterie'
[19:00:48][C][template.text_sensor:020]: Template Sensor 'Grid in today'
[19:00:48][C][light:092]: Light 'Display Backlight'
[19:00:48][C][light:094]: Default Transition Length: 1.0s
[19:00:48][C][light:095]: Gamma Correct: 2.80
[19:00:48][C][psram:020]: PSRAM:
[19:00:48][C][psram:021]: Available: YES
[19:00:48][C][psram:024]: Size: 6528 KB
[19:00:48][C][gt911.touchscreen:127]: GT911 Touchscreen:
[19:00:48][C][gt911.touchscreen:128]: Address: 0x5D
[19:00:48][C][:183]: ST7701S RGB LCD
[19:00:48][C][display.st7701s:184]: Height: 480
[19:00:48][C][display.st7701s:185]: Width: 480
[19:00:48][C][display.st7701s:186]: CS Pin: GPIO39
[19:00:48][C][display.st7701s:188]: DE Pin: GPIO18
[19:00:48][C][display.st7701s:192]: Data pin 0: GPIO46
[19:00:48][C][display.st7701s:192]: Data pin 1: GPIO9
[19:00:48][C][display.st7701s:192]: Data pin 2: GPIO10
[19:00:48][C][display.st7701s:192]: Data pin 3: GPIO11
[19:00:48][C][display.st7701s:192]: Data pin 4: GPIO12
[19:00:48][C][display.st7701s:192]: Data pin 9: GPIO5
[19:00:48][C][display.st7701s:192]: Data pin 10: GPIO6
[19:00:48][C][display.st7701s:192]: Data pin 14: GPIO20
[19:00:48][C][display.st7701s:192]: Data pin 15: GPIO3
[19:00:48][C][display.st7701s:193]: SPI Data rate: 2MHz
[19:00:48][C][status:034]: Status Binary Sensor 'Status'
[19:00:48][C][status:034]: Device Class: 'connectivity'
[19:00:48][C][version.text_sensor:021]: Version Text Sensor 'ESPHome Version'
[19:00:48][C][version.text_sensor:021]: Icon: 'mdi:new-box'
[19:00:48][C][wifi_info:014]: WifiInfo Mac Address 'Mac Address'
[19:00:48][C][restart:068]: Restart Switch 'Restart device'
[19:00:48][C][restart:070]: Icon: 'mdi:restart'
[19:00:48][C][restart:090]: Restore Mode: always OFF
[19:00:48][C][copy.sensor:015]: Copy Sensor 'WiFi Strength'
[19:00:48][C][copy.sensor:015]: Device Class: 'signal_strength'
[19:00:48][C][copy.sensor:015]: State Class: 'measurement'
[19:00:48][C][copy.sensor:015]: Unit of Measurement: '%'
[19:00:48][C][copy.sensor:015]: Accuracy Decimals: 0
[19:00:48][C][wifi_info:014]: WifiInfo Mac Address 'MAC Address'
[19:00:48][C][lvgl:086]: LVGL:
[19:00:48][C][lvgl:087]: Display width/height: 480 x 480
[19:00:48][C][lvgl:088]: Rotation: 0
[19:00:48][C][lvgl:089]: Draw rounding: 2
[19:00:48][C][web_server:153]: Web Server:
[19:00:48][C][web_server:154]: Address: guition-esp32-4848s040.local:80
[19:00:48][C][sntp:042]: SNTP Time:
[19:00:48][C][sntp:045]: Server 0: '0.pool.ntp.org'
[19:00:48][C][sntp:045]: Server 1: '1.pool.ntp.org'
[19:00:48][C][sntp:045]: Server 2: '2.pool.ntp.org'
[19:00:48][C][sntp:042]: SNTP Time:
[19:00:48][C][sntp:045]: Server 0: '0.pool.ntp.org'
[19:00:48][C][sntp:045]: Server 1: '1.pool.ntp.org'
[19:00:48][C][sntp:045]: Server 2: '2.pool.ntp.org'
[19:00:48][C][mdns:116]: mDNS:
[19:00:48][C][mdns:117]: Hostname: guition-esp32-4848s040
[19:00:48][C][esphome.ota:073]: Over-The-Air updates:
[19:00:48][C][esphome.ota:074]: Address: guition-esp32-4848s040.local:3232
[19:00:48][C][esphome.ota:075]: Version: 2
[19:00:48][C][esphome.ota:078]: Password configured
[19:00:48][C][safe_mode:018]: Safe Mode:
[19:00:48][C][safe_mode:019]: Boot considered successful after 60 seconds
[19:00:48][C][safe_mode:021]: Invoke after 10 boot attempts
[19:00:48][C][safe_mode:022]: Remain in safe mode for 300 seconds
[19:00:48][C][api:140]: API Server:
[19:00:48][C][api:141]: Address: guition-esp32-4848s040.local:6053
[19:00:48][C][api:145]: Using noise encryption: NO
[19:00:48][C][wifi_signal.sensor:010]: WiFi Signal 'WiFi Signal'
[19:00:48][C][wifi_signal.sensor:010]: Device Class: 'signal_strength'
[19:00:48][C][wifi_signal.sensor:010]: State Class: 'measurement'
[19:00:48][C][wifi_signal.sensor:010]: Unit of Measurement: 'dBm'
[19:00:48][C][wifi_signal.sensor:010]: Accuracy Decimals: 0
[19:00:48][C][wifi_info:012]: WifiInfo SSID 'Connected SSID'
[19:00:48][C][wifi_info:010]: WifiInfo IPAddress 'IP Address'
[19:00:48][C][http_request:013]: HTTP Request:
[19:00:48][C][http_request:014]: Timeout: 2000ms
[19:00:48][C][http_request:015]: User-Agent: ESPHome/2024.12.2 (https://esphome.io)
[19:00:48][C][http_request:016]: Follow redirects: YES
[19:00:48][C][http_request:017]: Redirect limit: 3
[19:00:48][C][http_request:019]: Watchdog Timeout: 14000ms
[19:00:48][C][http_request.idf:022]: Buffer Size RX: 512
[19:00:48][C][http_request.idf:023]: Buffer Size TX: 512
[19:00:48][C][wifi_info:012]: WifiInfo SSID 'Connected SSID'
[19:00:48][C][wifi_info:010]: WifiInfo IPAddress 'IP Address'
[19:00:48][C][homeassistant.text_sensor:023]: Homeassistant Text Sensor 'weather_now_condition'
[19:00:48][C][homeassistant.text_sensor:024]: Entity ID: 'weather.forecast_home'
[19:00:48][C][debug:021]: Debug component:
[19:00:48][C][debug:026]: Free space on heap 'Heap Free'
[19:00:48][C][debug:026]: State Class: ''
[19:00:48][C][debug:026]: Unit of Measurement: 'B'
[19:00:48][C][debug:026]: Accuracy Decimals: 0
[19:00:48][C][debug:026]: Icon: 'mdi:counter'
[19:00:48][C][debug:027]: Largest free heap block 'Heap Max Block'
[19:00:48][C][debug:027]: State Class: ''
[19:00:48][C][debug:027]: Unit of Measurement: 'B'
[19:00:48][C][debug:027]: Accuracy Decimals: 0
[19:00:48][C][debug:027]: Icon: 'mdi:counter'
[19:00:48][D][debug:035]: ESPHome version 2024.12.2
[19:00:48][D][debug:039]: Free Heap Size: 94512 bytes
[19:00:48][D][debug:217]: Chip: Model=ESP32-S3, Features=WIFI_BGN,BLE, Cores=2, Revision=2
[19:00:48][D][debug:226]: ESP-IDF Version: 5.1.5
[19:00:48][D][debug:231]: EFuse MAC: 24:58:7C:D7:9F:24
[19:01:01][I][solaxdotaz:535]: pred kontrolou Request succeeded!
[19:01:01][I][solaxdotaz:538]: Request succeeded!
[19:01:01][D][text_sensor:064]: 'sporeba SUM': Sending state '373'
[19:01:01][D][text_sensor:064]: 'FVE vyroba': Sending state '0'
[19:01:01][D][text_sensor:064]: 'PV1': Sending state '0W'
[19:01:01][D][text_sensor:064]: 'PV2': Sending state '0W'
[19:01:01][D][text_sensor:064]: 'Stav baterie': Sending state '48%'
[19:01:01][D][sensor:093]: 'Feed in': Sending state 0.00000 with 1 decimals of accuracy
[19:01:01][D][sensor:093]: 'solax consumption': Sending state 373.00000 with 1 decimals of accuracy
[19:01:01][D][sensor:093]: 'battery power': Sending state -401.00000 with 1 decimals of accuracy
[19:01:01][D][text_sensor:064]: 'Grid in today': Sending state '67W'
[19:01:01][D][text_sensor:064]: 'dataSOLAX-pocet': Sending state '300'
[19:01:01][I][solaxdotaz:577]: zacatek nastavovani sensoru
[19:01:01][I][solaxdotaz:591]: konec nastavovani sensoru
[19:01:01][W][component:237]: Component interval took a long time for an operation (1525 ms).
[19:01:01][W][component:238]: Components should block for at most 30 ms.
[19:01:01][W][component:237]: Component lvgl took a long time for an operation (122 ms).
[19:01:01][W][component:238]: Components should block for at most 30 ms.
[19:01:13][D][sensor:093]: 'WiFi Signal': Sending state -64.00000 dBm with 0 decimals of accuracy
[19:01:13][D][sensor:093]: 'WiFi Strength': Sending state 72.00000 % with 0 decimals of accuracy
[19:01:17][I][solaxdotaz:535]: pred kontrolou Request succeeded!
[19:01:17][I][solaxdotaz:538]: Request succeeded!
[19:01:17][D][text_sensor:064]: 'sporeba SUM': Sending state '368'
[19:01:17][D][text_sensor:064]: 'FVE vyroba': Sending state '0'
[19:01:17][D][text_sensor:064]: 'PV1': Sending state '0W'
[19:01:17][D][text_sensor:064]: 'PV2': Sending state '0W'
[19:01:17][D][text_sensor:064]: 'Stav baterie': Sending state '48%'
[19:01:17][D][sensor:093]: 'Feed in': Sending state 0.00000 with 1 decimals of accuracy
[19:01:17][D][sensor:093]: 'solax consumption': Sending state 368.00000 with 1 decimals of accuracy
[19:01:17][D][sensor:093]: 'battery power': Sending state -377.00000 with 1 decimals of accuracy
[19:01:17][D][text_sensor:064]: 'Grid in today': Sending state '67W'
[19:01:17][D][text_sensor:064]: 'dataSOLAX-pocet': Sending state '300'
[19:01:17][I][solaxdotaz:577]: zacatek nastavovani sensoru
[19:01:17][I][solaxdotaz:591]: konec nastavovani sensoru
[19:01:17][W][component:237]: Component interval took a long time for an operation (1889 ms).
[19:01:17][W][component:238]: Components should block for at most 30 ms.
[19:01:17][W][component:237]: Component lvgl took a long time for an operation (122 ms).
[19:01:17][W][component:238]: Components should block for at most 30 ms.
[19:01:23][D][sensor:093]: 'Uptime Sensor': Sending state 51.43000 s with 0 decimals of accuracy
[19:01:25][D][sensor:093]: 'Heap Free': Sending state 113524.00000 B with 0 decimals of accuracy
[19:01:25][D][sensor:093]: 'Loop Time': Sending state 6573.00000 ms with 0 decimals of accuracy
[19:01:25][D][sensor:093]: 'Heap Max Block': Sending state 77824.00000 B with 0 decimals of accuracy
[19:01:25][D][sensor:093]: 'Free PSRAM': Sending state 5747128.00000 B with 0 decimals of accuracy
[19:01:31][I][solaxdotaz:535]: pred kontrolou Request succeeded!
[19:01:31][I][solaxdotaz:538]: Request succeeded!
[19:01:31][D][text_sensor:064]: 'sporeba SUM': Sending state '375'
[19:01:31][D][text_sensor:064]: 'FVE vyroba': Sending state '0'
[19:01:31][D][text_sensor:064]: 'PV1': Sending state '0W'
[19:01:31][D][text_sensor:064]: 'PV2': Sending state '0W'
[19:01:31][D][text_sensor:064]: 'Stav baterie': Sending state '48%'
[19:01:31][D][sensor:093]: 'Feed in': Sending state 0.00000 with 1 decimals of accuracy
[19:01:31][D][sensor:093]: 'solax consumption': Sending state 375.00000 with 1 decimals of accuracy
[19:01:31][D][sensor:093]: 'battery power': Sending state -377.00000 with 1 decimals of accuracy
[19:01:31][D][text_sensor:064]: 'Grid in today': Sending state '67W'
[19:01:31][D][text_sensor:064]: 'dataSOLAX-pocet': Sending state '300'
[19:01:31][I][solaxdotaz:577]: zacatek nastavovani sensoru
[19:01:31][I][solaxdotaz:591]: konec nastavovani sensoru
[19:01:31][W][component:237]: Component interval took a long time for an operation (1653 ms).
[19:01:31][W][component:238]: Components should block for at most 30 ms.
[19:01:32][W][component:237]: Component lvgl took a long time for an operation (122 ms).
[19:01:32][W][component:238]: Components should block for at most 30 ms.
[19:01:32][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[19:01:32][D][esp32.preferences:114]: Saving 1 preferences to flash...
[19:01:32][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[19:01:49][D][esp-idf:000]: W (77447) HTTP_CLIENT: Connection timed out before data was ready!
[19:01:49][E][http_request.idf:172]: HTTP Request failed; URL: http://10.27.27.200/; Code: -1
[19:01:49][E][component:164]: Component http_request set Error flag: unspecified
Additional information
No response
Device partially stops responding after "HTTP Request failed"
Hi,
I am using a ESP device for monitoring. I retrieve the data via the API interface using the http_request component. Sometimes it happens that the device partially stops responding - the display gets stuck, the sensors stops updating and the logs stop being loaded into the HA ESPhome interface - see. below.
Ping to device works.
The web page of the sensors responds, but loads the header with information about the running time only (the time continues on).
The device cannot be updated via OTA.
The only thing that helps is a reboot.
The problem appears randomly, propably depending on the unspecified responses of monitored device, which is difficult to simulate.
But the identical problem occurs and appears almost immediately when I set the timeout of request to a low value. The following logs describe such a situation.
AND NOW IS OVER
After some time the following messages are added:
Finally, I managed to catch the error message with a long enough timeout (8s):
It looks like a problem in http_request when the request fails.
Thx for help.
Which version of ESPHome has the issue?
2024.12.2
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2025.1.0
What platform are you using?
ESP32-IDF
Board
Guition ESP32-S3-4848S040
Component causing the issue
http_request
YAML Config
Anything in the logs that might be useful for us?
Additional information
No response