[Crashes] ESP8266 with Midea integration
Author: DooMMasteRCreated Jun 19, 2026Updated Sep 28, 2026
Labelsstale
The problem
My ESP8266 crash on a regular basis, they always come back with no issue, but I was never able to get down to the issue.
Now that we have stack traces on ESP8266 I can at least retrieve that:
[08:48:09.985][E][esp8266:171]: *** CRASH DETECTED ON PREVIOUS BOOT ***
[08:48:09.985][E][esp8266:186]: Reason: Soft WDT - Level1Int (exccause=4)
[08:48:09.986][E][esp8266:191]: PC: 0x40257116
WARNING Decoded 0x40257116: pm_send_nullfunc
[08:48:10.040][E][esp8266:196]: BT0: 0x40245166
WARNING Decoded 0x40245166: sta_input
[08:48:10.064][E][esp8266:196]: BT1: 0x40256F30
WARNING Decoded 0x40256f30: pm_keep_active_enable
[08:48:10.082][E][esp8266:196]: BT2: 0x40100790
WARNING Decoded 0x40100790: ets_post
[08:48:10.099][E][esp8266:196]: BT3: 0x4025D219
WARNING Decoded 0x4025d219: ets_timer_handler_isr
[08:48:10.117][E][esp8266:196]: BT4: 0x4025D25E
WARNING Decoded 0x4025d25e: ets_timer_handler_isr
[08:48:10.136][E][esp8266:196]: BT5: 0x40228792
WARNING Decoded 0x40228792: loop_task(ETSEventTag*) at core_esp8266_main.cpp
[08:48:10.154][E][esp8266:196]: BT6: 0x4010592D
WARNING Decoded 0x4010592d: call_user_start_local
[08:48:10.172][E][esp8266:196]: BT7: 0x40105933
WARNING Decoded 0x40105933: call_user_start_local
[08:48:10.190][E][esp8266:196]: BT8: 0x4010000D
WARNING Decoded 0x4010000d: call_user_start
[08:48:10.209][E][esp8266:196]: BT9: 0x401000AB
WARNING Decoded 0x401000ab: app_entry_redefinable
[08:48:10.230][E][esp8266:196]: BT10: 0x4024D184
WARNING Decoded 0x4024d184: cont_ret at cont.S.o
[08:48:10.249][E][esp8266:196]: BT11: 0x4024D135
WARNING Decoded 0x4024d135: cont_continue at cont.S.o
[08:48:10.267][E][esp8266:196]: BT12: 0x4010584B
WARNING Decoded 0x4010584b: lmacRxDone
[08:48:10.286][E][esp8266:196]: BT13: 0x40100790
WARNING Decoded 0x40100790: ets_post
[08:48:10.303][E][esp8266:196]: BT14: 0x401025B4
WARNING Decoded 0x401025b4: pp_post
[08:48:10.323][E][esp8266:196]: BT15: 0x4010584B
WARNING Decoded 0x4010584b: lmacRxDoneWhich version of ESPHome has the issue?
2026.6.1
What type of installation are you using?
Home Assistant Add-on
What platform are you using?
ESP8266
Component causing the issue
No response
YAML Config
globals:
- id: target_temp
type: float
initial_value: "20.0"
uart:
tx_pin: 12
rx_pin: 14
baud_rate: 9600
button:
# "Display toggle" button
- platform: template
name: ${friendly_name} Display Toggle
id: midea_display_toggle
icon: mdi:theme-light-dark
on_press:
midea_ac.display_toggle:
# "Swing step" button
- platform: template
name: ${friendly_name} Swing Step
id: midea_swing_step
icon: mdi:tailwind
on_press:
midea_ac.swing_step:
climate:
- platform: midea
name: ${friendly_name} # The value of "friendly_name" will be used here
id: midea_climate
period: 2s # Optional
timeout: 4s # Optional
num_attempts: 3 # Optional
autoconf: True # Autoconfigure most options.
beeper: False # Beep on commands.
visual: # Optional. Example of visual settings override.
min_temperature: "${visual_min_temperature}" # min: 17
max_temperature: "${visual_max_temperature}" # max: 30
temperature_step: "${visual_temperature_step}" # min: 0.5
supported_modes: # All capabilities in this section detected by autoconf.
- FAN_ONLY # This capability is always used.
- HEAT_COOL
- COOL
- HEAT
- DRY
custom_fan_modes:
- SILENT
- TURBO
supported_presets: # All capabilities in this section detected by autoconf.
- ECO
- BOOST
- SLEEP # This capability is always used.
custom_presets: # All capabilities in this section detected by autoconf.
- FREEZE_PROTECTION
supported_swing_modes:
- VERTICAL # This capability is always used.
- HORIZONTAL
- BOTH
outdoor_temperature: # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
name: ${friendly_name} Outdoor Temperature
power_usage: # Optional. Power usage sensor (only for devices that support this feature).
name: ${friendly_name} Power Usage
humidity_setpoint: # Optional. Indoor humidity sensor (only for devices that support this feature).
name: ${friendly_name} Indoor Humidity
number:
- platform: template
name: "$friendly_name Target Temperature"
id: extended_target
optimistic: true
min_value: ${extended_min_temp}
max_value: 30
restore_value: True
step: 0.5
icon: mdi:thermometer
unit_of_measurement: "°C"
on_value:
- globals.set:
id: target_temp
value: !lambda "return x;"
- script.execute: update_midea
switch:
- platform: template
name: ${friendly_name} Beeper
id: midea_beeper
icon: mdi:volume-source
restore_mode: RESTORE_DEFAULT_OFF
optimistic: true
turn_on_action:
midea_ac.beeper_on:
turn_off_action:
midea_ac.beeper_off:
# Sensor from HASS for setting up FollowMe temperature
remote_transmitter:
pin: GPIO13 # For slwf-01pro-v2 dongle
carrier_duty_percent: 100% # 50% for IR LED, 100% for direct connect to TSOP IR receiver output.
sensor:
- platform: homeassistant
entity_id: ${follow_me_sensor}
id: follow_me_sensor
on_value:
then:
- script.execute: update_midea
# filters:
# - throttle: 10s
# - heartbeat: 2min
# - debounce: 1s
# on_value:
# midea_ac.follow_me:
# temperature: !lambda "return x;"
# beeper: false
- platform: wifi_signal
name: ${friendly_name} Wi-Fi Signal
update_interval: 60s
- platform: uptime
name: "Uptime"
id: uptime_sec
internal: true
- platform: template
name: ${friendly_name} Uptime Days
lambda: |-
return (id(uptime_sec).state/60)/60/24;
icon: mdi:clock-start
unit_of_measurement: days
update_interval: 60s
- platform: debug
free:
name: "Heap Free"
loop_time:
name: "Loop Time"
interval:
- interval: 2min
startup_delay:
seconds: 20
then:
- script.execute: update_midea
# "Power toggle" script
script:
- id: update_midea
then:
- lambda: |-
float target = id(target_temp);
float room = id(follow_me_sensor).state;
if (isnan(room)) return;
// If target is below hardware limit (17), use offset
if (target < 17.0) {
float base = 17.0;
float offset = base - target;
float fake_temp = roundf(room + offset);
// Apply logic only if actively cooling
if (id(midea_climate).mode == CLIMATE_MODE_COOL || id(midea_climate).mode == CLIMATE_MODE_HEAT_COOL || id(midea_climate).mode == CLIMATE_MODE_HEAT) {
// Ensure AC is set to 'base'
if (id(midea_climate).target_temperature != base) {
auto call = id(midea_climate).make_call();
call.set_target_temperature(base);
call.perform();
}
// Send fake temp
id(midea_climate).do_follow_me(fake_temp, false, false);
}
} else {
// Normal operation, just pass through sensor
// id(midea_climate).do_follow_me(room, false, false);
id(midea_climate).set_beeper_feedback(false);
// Ensure AC matches target
if (id(midea_climate).target_temperature != target) {
auto call = id(midea_climate).make_call();
call.set_target_temperature(target);
call.perform();
}
}
debug:
update_interval: 30s
text_sensor:
- platform: debug
reset_reason:
name: "Reset Reason"Anything in the logs that might be useful for us?
Additional information
No response
Source: esphome/esphome