AirGradient Pro with ESPhome, display keeps turning back on

I got lucky and the serial connection captured several stack traces. Ironically, I had configured esphome logs to log to a file, and the file just contains default stack traces, but it looks like doing so meant the only console output (probably stderr) is a decoded set of stack traces, each attached below. Interestingly, they’re not all the same issue, as far as I can tell.

Stack Trace 1
WARNING Found stack trace! Trying to decode it                                                                                                                                                                                      
WARNING Decoded 0x40245443: lwip_cyclic_timer at /home/earle/src/esp-quick-toolchain/arduino/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c:261                                                                              
WARNING Decoded 0x40273a64: etharp_output                                                                                                                                                                                           
WARNING Decoded 0x4024539d: memp_free at /home/earle/src/esp-quick-toolchain/arduino/tools/sdk/lwip2/builder/lwip2-src/src/core/memp.c:447                                                                                          
WARNING Decoded 0x40266810: pm_keep_active_enable                                                                                                                                                                                   
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x4026c7f1: ets_timer_handler_isr                                                                                                                                                                                   
WARNING Decoded 0x4026c836: ets_timer_handler_isr                                                                                                                                                                                   
WARNING Decoded 0x40234a62: loop_task(ETSEventTag*) at core_esp8266_main.cpp                                                                                                                                                        
WARNING Decoded 0x40106015: call_user_start_local                                                                                                                                                                                   
WARNING Decoded 0x4010601b: call_user_start_local                                                                                                                                                                                   
WARNING Decoded 0x4010000d: call_user_start                                                                                                                                                                                         
WARNING Decoded 0x401000ab: app_entry_redefinable                                                                                                                                                                                   
WARNING Decoded 0x4025ca60: cont_ret at cont.S.o                                                                                                                                                                                    
WARNING Decoded 0x4025ca11: cont_continue at cont.S.o                                                                                                                                                                               
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x401067ad: ets_timer_disarm                                                                                                                                                                                        
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x401067ad: ets_timer_disarm                                                                                                                                                                                        
WARNING Decoded 0x401067ad: ets_timer_disarm                                                                                                                                                                                        
WARNING Decoded 0x40100cf1: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100260: esphome::ISRInternalGPIOPin::digital_read()
WARNING Decoded 0x40231524: HardwareSerial::write(unsigned char const*, unsigned int)                                                                                                                                     [215/1034]
WARNING Decoded 0x40103807: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x40102c7c: pp_post                                                                                                                                                                                                 
WARNING Decoded 0x401039e4: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40102c7c: pp_post                                                                                                                                                                                                 
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x401039e4: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100c20: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40240930: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:727                                                                                                                                           
WARNING Decoded 0x402403ec: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:484                                                                                                                                           
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779                                                                                                                                            
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779                                                                                                                                            
WARNING Decoded 0x401067ad: ets_timer_disarm                                                                                                                                                                                        
WARNING Decoded 0x40216a13: esphome::ota::OTAComponent::handle_()                                                                                                                                                                   
WARNING Decoded 0x40240b9d: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:854                                                                                                                                           
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x4023cfa5: __cvt at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_float.c:102                                                                                                                               
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779                                                                                                                                            
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x40240b9d: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:854                                                                                                                                           
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x4023dae5: _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:196 (discriminator 1)                                                                                                             
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x40242054: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:179                                                                                                                                
WARNING Decoded 0x4023dc14: _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:246                                                                                                                               
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x40242315: _svfprintf_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:528                                                                                                                              
WARNING Decoded 0x40242315: _svfprintf_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:528                                                                                                                              
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)                                                                                                                 
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)                                                                                                                 
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)                                                                                                                 
WARNING Decoded 0x4020e927: esphome::api::APINoiseFrameHelper::try_read_frame_(esphome::api::APINoiseFrameHelper::ParsedFrame*)                                                                                                     
WARNING Decoded 0x4020f010: esphome::api::APINoiseFrameHelper::state_action_()                                                                                                                                                      
WARNING Decoded 0x4026e65c: system_param_load                                                                                                                                                                                       
WARNING Decoded 0x40234b87: yield                                                                                                                                                                                                   
WARNING Decoded 0x4020e927: esphome::api::APINoiseFrameHelper::try_read_frame_(esphome::api::APINoiseFrameHelper::ParsedFrame*)                                                                                                     
WARNING Decoded 0x4020f010: esphome::api::APINoiseFrameHelper::state_action_()                                                                                                                                                      
WARNING Decoded 0x40226be8: ESP8266WiFiSTAClass::SSID() const                                                                                                                                                                       
WARNING Decoded 0x4020f25e: esphome::api::APINoiseFrameHelper::read_packet(esphome::api::ReadPacketBuffer*)                                                                                                                         
WARNING Decoded 0x4026f297: wifi_station_get_connect_status                                                                                                                                                                         
WARNING Decoded 0x4020d3d7: esphome::api::APIConnection::loop()                                                                                                                                                                     
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::Scheduler
Item, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)                                                                                                                                                              
WARNING Decoded 0x40220518: esphome::wifi::WiFiComponent::wifi_ssid[abi:cxx11]()                                                                                                                                                    
WARNING Decoded 0x40212238: esphome::api::APIServer::loop()                                                                                                                                                                         
WARNING Decoded 0x401068f1: ets_timer_arm_new                                                                                                                                                                                       
WARNING Decoded 0x40234ae1: esp_yield                                                                                                                                                                                               
WARNING Decoded 0x402358fd: delay
WARNING Decoded 0x402213c3: esphome::Application::loop()
Stack Trace 2
WARNING Found stack trace! Trying to decode it                                                                                                                                                                                      
WARNING Decoded 0x40245443: lwip_cyclic_timer at /home/earle/src/esp-quick-toolchain/arduino/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c:261                                                                              
WARNING Decoded 0x40273a5c: etharp_output                                                                                                                                                                                           
WARNING Decoded 0x4024539d: memp_free at /home/earle/src/esp-quick-toolchain/arduino/tools/sdk/lwip2/builder/lwip2-src/src/core/memp.c:447                                                                                          
WARNING Decoded 0x40266810: pm_keep_active_enable                                                                                                                                                                                   
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x4026c7f1: ets_timer_handler_isr                                                                                                                                                                                   
WARNING Decoded 0x4026c836: ets_timer_handler_isr                                                                                                                                                                                   
WARNING Decoded 0x40234a62: loop_task(ETSEventTag*) at core_esp8266_main.cpp                                                                                                                                                        
WARNING Decoded 0x40106015: call_user_start_local                                                                                                                                                                                   
WARNING Decoded 0x4010601b: call_user_start_local                                                                                                                                                                                   
WARNING Decoded 0x4010000d: call_user_start                                                                                                                                                                                         
WARNING Decoded 0x401000ab: app_entry_redefinable                                                                                                                                                                                   
WARNING Decoded 0x4025ca60: cont_ret at cont.S.o                                                                                                                                                                                    
WARNING Decoded 0x4025ca11: cont_continue at cont.S.o                                                                                                                                                                               
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40102c7c: pp_post                                                                                                                                                                                                 
WARNING Decoded 0x40105f13: lmacRxDone                                                                                                                                                                                              
WARNING Decoded 0x40103807: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x401039e4: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x40103e9e: wDev_ProcessFiq                                                                                                                                                                                         
WARNING Decoded 0x40103bc0: wDev_ProcessFiq                                                                                                                                                                                         
WARNING Decoded 0x402090e4: fe25519_mul at ed25519_ref10.c                                                                                                                                                                          
WARNING Decoded 0x402090cc: fe25519_mul at ed25519_ref10.c                                                                                                                                                                          
WARNING Decoded 0x40105f13: lmacRxDone                                                                                                                                                                                              
WARNING Decoded 0x40103807: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x401039e4: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x40103e9e: wDev_ProcessFiq                                                                                                                                                                                         
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40105f13: lmacRxDone                                                                                                                                                                                              
WARNING Decoded 0x40102c7c: pp_post                                                                                                                                                                                                 
WARNING Decoded 0x40105f13: lmacRxDone
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                      [115/1034]
WARNING Decoded 0x40216a13: esphome::ota::OTAComponent::handle_()                                                                                                                                                                   
WARNING Decoded 0x401067ad: ets_timer_disarm                                                                                                                                                                                        
WARNING Decoded 0x40100c20: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40240091: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:352                                                                                                                                           
WARNING Decoded 0x4024008e: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:352                                                                                                                                           
WARNING Decoded 0x40103e9e: wDev_ProcessFiq                                                                                                                                                                                         
WARNING Decoded 0x40103bc0: wDev_ProcessFiq                                                                                                                                                                                         
WARNING Decoded 0x40102c7c: pp_post                                                                                                                                                                                                 
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779                                                                                                                                            
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779                                                                                                                                            
WARNING Decoded 0x40216a13: esphome::ota::OTAComponent::handle_()                                                                                                                                                                   
WARNING Decoded 0x40240b9d: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:854                                                                                                                                           
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x4023cfa5: __cvt at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_float.c:102                                                                                                                               
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779                                                                                                                                            
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x40240b9d: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:854                                                                                                                                           
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x4023dae5: _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:196 (discriminator 1)                                                                                                             
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x40242054: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:179                                                                                                                                
WARNING Decoded 0x4023dc14: _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:246                                                                                                                               
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232                                                                                                                                
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x401067ad: ets_timer_disarm                                                                                                                                                                                        
WARNING Decoded 0x4023657a: uart_do_write_char at uart.cpp                                                                                                                                                                          
WARNING Decoded 0x40236580: uart_do_write_char at uart.cpp                                                                                                                                                                          
WARNING Decoded 0x402365f8: uart_write                                                                                                                                                                                              
WARNING Decoded 0x40231524: HardwareSerial::write(unsigned char const*, unsigned int)                                                                                                                                               
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)                                                                                                                 
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)                                                                                                                 
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)                                                                                                                 
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)                                                                                                                 
WARNING Decoded 0x4026e65c: system_param_load                                                                                                                                                                                       
WARNING Decoded 0x40234b87: yield                                                                                                                                                                                                   
WARNING Decoded 0x4026e68e: wifi_station_get_config                                                                                                                                                                                 
WARNING Decoded 0x402338f5: String::copy(char const*, unsigned int)                                                                                                                                                                 
WARNING Decoded 0x40226be8: ESP8266WiFiSTAClass::SSID() const                                                                                                                                                                       
WARNING Decoded 0x402236fb: void std::__push_heap<__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::Sc
heduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, std::unique
_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Schedule
r::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)> >(__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem, s
td::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Scheduler
::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, int, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_comp
_val<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::Schedul
erItem> > const&)>&)                                                                                                                                                                                                                
WARNING Decoded 0x4021fe38: esphome::wifi::WiFiComponent::wifi_sta_ip()                                                                                                                                                             
WARNING Decoded 0x40223acc: void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::
Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, std::uniq
ue_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Sched
uler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)> >(__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem
, std::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Schedu
ler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, int, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_c
omp_iter<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::Sch
edulerItem> > const&)>)                                                                                                                                                                                                             
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::Scheduler
Item, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)                                                                                                                                                              
WARNING Decoded 0x4020d5ae: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&)                                          
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::Scheduler
Item, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)                                                                                                                                                              
WARNING Decoded 0x40220518: esphome::wifi::WiFiComponent::wifi_ssid[abi:cxx11](
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::Scheduler
Item, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)                                                                                                                                                              
WARNING Decoded 0x4020d5ae: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&)                                          
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::Scheduler
Item, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)                                                                                                                                                              
WARNING Decoded 0x40220518: esphome::wifi::WiFiComponent::wifi_ssid[abi:cxx11]()                                                                                                                                                    
WARNING Decoded 0x40212238: esphome::api::APIServer::loop()                                                                                                                                                                         
WARNING Decoded 0x401068f1: ets_timer_arm_new                                                                                                                                                                                       
WARNING Decoded 0x40234ae1: esp_yield                                                                                                                                                                                               
WARNING Decoded 0x402358fd: delay                                                                                                                                                                                                   
WARNING Decoded 0x402213c3: esphome::Application::loop()
Stack Trace 3
WARNING Found stack trace! Trying to decode it                                                                                                                                                                                      
WARNING Decoded 0x40254a42: sta_input                                                                                                                                                                                               
WARNING Decoded 0x40266810: pm_keep_active_enable                                                                                                                                                                                   
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x4026c7f1: ets_timer_handler_isr                                                                                                                                                                                   
WARNING Decoded 0x4026c836: ets_timer_handler_isr                                                                                                                                                                                   
WARNING Decoded 0x40234a62: loop_task(ETSEventTag*) at core_esp8266_main.cpp                                                                                                                                                        
WARNING Decoded 0x40106015: call_user_start_local                                                                                                                                                                                   
WARNING Decoded 0x4010601b: call_user_start_local                                                                                                                                                                                   
WARNING Decoded 0x4010000d: call_user_start                                                                                                                                                                                         
WARNING Decoded 0x401000ab: app_entry_redefinable                                                                                                                                                                                   
WARNING Decoded 0x4025ca60: cont_ret at cont.S.o                                                                                                                                                                                    
WARNING Decoded 0x4025ca11: cont_continue at cont.S.o                                                                                                                                                                               
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100c20: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x401023a8: unsign_to_sign                                                                                                                                                                                          
WARNING Decoded 0x40102410: phy_get_bb_freqoffset                                                                                                                                                                                   
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x401067ad: ets_timer_disarm                                                                                                                                                                                        
WARNING Decoded 0x40100cf1: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x40100260: esphome::ISRInternalGPIOPin::digital_read()                                                                                                                                                             
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40105a46: lmacMSDUAged                                                                                                                                                                                            
WARNING Decoded 0x40102c7c: pp_post                                                                                                                                                                                                 
WARNING Decoded 0x40105f13: lmacRxDone                                                                                                                                                                                              
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40103807: rcReachRetryLimit                                                                                                                                                                                       
WARNING Decoded 0x40100778: ets_post                                                                                                                                                                                                
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x40100ce4: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x40100c20: interrupt_handler                                                                                                                                                                                       
WARNING Decoded 0x4021a8f4: esphome::socket::LWIPRawImpl::accept(sockaddr*, unsigned int*)                                                                                                                                          
WARNING Decoded 0x40216a13: esphome::ota::OTAComponent::handle_()                                                                                                                                                                   
WARNING Decoded 0x4021a8cc: esphome::socket::LWIPRawImpl::accept(sockaddr*, unsigned int*)                                                                                                                                          
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::Scheduler
Item, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)                                                                                                                                                              
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)                                                                                                                     
WARNING Decoded 0x4010037e: esphome::uart::ESP8266SoftwareSerial::gpio_intr(esphome::uart::ESP8266SoftwareSerial*)                                                                                                                  
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&) 
WARNING Decoded 0x40100300: esphome::uart::ESP8266SoftwareSerial::read_bit_(unsigned int*, unsigned int const&)
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779
WARNING Decoded 0x40100ce4: interrupt_handler
WARNING Decoded 0x40216a13: esphome::ota::OTAComponent::handle_()
WARNING Decoded 0x40240b9d: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:854
WARNING Decoded 0x40241e42: __d2b at /workdir/repo/newlib/newlib/libc/stdlib/mprec.c:779
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
WARNING Decoded 0x40240b9d: _dtoa_r at /workdir/repo/newlib/newlib/libc/stdlib/dtoa.c:854
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
WARNING Decoded 0x4023dae5: _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:196 (discriminator 1)
WARNING Decoded 0x40242118: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
WARNING Decoded 0x40242054: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:179
WARNING Decoded 0x4023dc14: _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:246
WARNING Decoded 0x40242054: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:179
WARNING Decoded 0x40100778: ets_post
WARNING Decoded 0x401067ad: ets_timer_disarm
WARNING Decoded 0x40242054: __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:179
WARNING Decoded 0x402364e3: uart_tx_fifo_available
WARNING Decoded 0x40236580: uart_do_write_char at uart.cpp
WARNING Decoded 0x40232af0: run_scheduled_recurrent_functions()
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)
WARNING Decoded 0x40234b87: yield
WARNING Decoded 0x4023665c: uart_write
WARNING Decoded 0x4023f819: _vsnprintf_r at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:71 (discriminator 4)
WARNING Decoded 0x40231524: HardwareSerial::write(unsigned char const*, unsigned int)
WARNING Decoded 0x4026e65c: system_param_load
WARNING Decoded 0x4026e68e: wifi_station_get_config
WARNING Decoded 0x402338f5: String::copy(char const*, unsigned int)
WARNING Decoded 0x40226be8: ESP8266WiFiSTAClass::SSID() const
WARNING Decoded 0x402236fb: void std::__push_heap<__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)> >(__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, int, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)>&)
WARNING Decoded 0x4021fe38: esphome::wifi::WiFiComponent::wifi_sta_ip()
WARNING Decoded 0x40223acc: void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)> >(__gnu_cxx::__normal_iterator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >*, std::vector<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, std::allocator<std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > > > >, int, int, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)>)
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)
WARNING Decoded 0x4020d5ae: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&)
WARNING Decoded 0x402234f0: esphome::Scheduler::SchedulerItem::cmp(std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&, std::unique_ptr<esphome::Scheduler::SchedulerItem, std::default_delete<esphome::Scheduler::SchedulerItem> > const&)
WARNING Decoded 0x40220518: esphome::wifi::WiFiComponent::wifi_ssid[abi:cxx11]()
WARNING Decoded 0x40212238: esphome::api::APIServer::loop()
WARNING Decoded 0x401068f1: ets_timer_arm_new
WARNING Decoded 0x40234ae1: esp_yield
WARNING Decoded 0x402358fd: delay
WARNING Decoded 0x402213c3: esphome::Application::loop()

Trace 1 looks like GPIO issues…
Trace 2 looks related to OTA…
Trace 3 looks like SoftwareSerial issues (this board is running Core 3.0.2)

Potentially related, I am seeing a lot of these in Verbose logs

[01:29:00][V][component:200]: Component ssd1306_base took a long time for an operation (0.32 s).
[01:29:00][V][component:201]: Components should block for at most 20-30ms.

I’m not yet sure what to make of these, other than potentially the entire board has too much to do.

Edit: The other interesting coincidence is that just before each stack trace I see this log - not actually sure what it is but my guess is the particulate sensor?

[01:29:02]pm 1990

It doesn’t have a log level - which feels rather unusual.

I should add I changed my ESPhome config for update intervals based off the prior links to

sht3xd 5s
senseair 30s
pmsx003 120s (also just for spin-down & laser lifetime as I understand)

Hey, sorry to hijack this thread. I’ve been having issues on the AirGradient Pro random restarts too and found this thread on google.

Downgrading SoftwareSerial library to v6.17.1 like you suggested solved my issues completely it seems. This fix didn’t seem to work at first, but I noticed that during compilation after downgrading Software Serial my compilation logs still reported that it was still compiling with a cached compile of v7.0.0.

So just throwing this out there to anyone else who finds this thread on google: if you have an exception 0 and you downgraded SoftwareSerial, make sure v7.0.0 isn’t still cached. If it is, you can deleted the cached compile at C:\Users{user}\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries (path may be different in your case)

And big thank you to @ken830, there’s no way I would have figured that out on my own

1 Like

@Themis3000 You’re welcome! I spent several hours a day for over a week working on the problem and documented my findings in this other thread: https://forum.airgradient.com/t/airgradient-rebooting-itself/603

I’m just glad to hear that the results of my work has been able to help others. Makes it worth my time.

1 Like

@ken830 Wow, that’s a lot of work. I really appreciate your work and you spreading your findings. I’m totally new to Arduino (and c++ for that matter) so I would have probably given up trying to customize the device’s software to my needs and settled for what the 1 click install provided on their website if it weren’t for you. Luckily though, thanks to your answer I was able to program my AirGradient pro to fit my exact needs! This forum comes up near the top of google when searching for this issue, so I’m sure it’ll go on to help others too.

Hope you have a good rest of your night!

1 Like

Much appreciated for the ideas so far in this and the linked thread. Sadly I’m still getting occasional reboots, even with little in the way of logging enabled. I also tried a simple display page and dropping the update interval for the display down; no joy. Between this and the abysmally unreliable OTA code in ESPhome, I’m tempted to pursue a different method of connecting this box to Home Assistant entirely.

I got a second box and can confirm the same behaviour on both, so it’s not dodgy hardware.

When I next have debugging time & energy, I’ll either try a totally different firmware or cut out a bunch of components to try and narrow down what’s going on.

I think to eliminate other factors, you should run default AirGradient code built with SoftwareSerial 6.17.1. And make sure you’re not inadvertently caching SoftwareSerial v7.x.x.

Did you try setting the entire logger to INFO with the code I listed above? I’ve been much more stable since then, where trying to turn down logging for individual components didn’t stabilize it fully.

I’m testing some code from another user where they had multiple fonts defined and some graphs. With 5+ fonts defined, I was stuck in a boot loop and had to connect direct to flash it with only 2 fonts defined and it was back operational. I’ve had 1 reboot in the last 48 hours which could still be related to the extra graphs.

I just got some new sensors in, so planning on putting them in soon, but trying to verify I’m mostly stable at this point

That’s a really good find. I’ll be removing the unused fonts! :slight_smile: And I almost missed your message about it, oh boy.

I will be curious to hear if you get it to run stably in the end. I did not succeed yet (with logging disabled, baud_rate: 0), I have the same problem as OP. What processing unit do you use, the D1 v4 that was delivered with the kit?

I have an AliExpress clone of a D1 Mini, maybe v3 with a micro-USB port. I was stable for days, so I opened an Issue on the Github for ESPHome and they asked for some logs with the device connected to my ESPHome server so I could get decrypted logs and after I moved one device there, I’ve had all 3 in the house be mostly stable. No reboots for 2 days and then overnight I had several and now I’m back to stable, so I have no idea what is going on.

Do you guys know exactly what version of SoftwareSerial you’re running? You should be on the latest pre-v7 version, which is SoftwareSerial v6.17.1. version v7.x.x will cause exception 0 crashes and earlier versions like pre-v6.15.1 has a bug that will miss the last packet if it happens to be 0xFF, so this could cause a software timeout or watchdog timeout, depending on how the code is set up.

Hi @ken830, thanks a lot for your work on the SoftwareSerial bug. I read it with great interest.

When I compile with verbose I see framework-arduinoespressif8266 @ 3.30002.0 (3.0.2). I think v3.0.2 contains the SoftwareSerial version before the bug, correct?

So for the particular issue I was commenting on it’s probably something else, just this once. But I think there are multiple problems around that look similar in symptoms (random reboots). This time mine must be caused by an out of memory exception from the graphs+fonts+mqtt+logger, I believe. I’ve been trying to slim down my esphome yaml for a while, glad @MallocArray found one more thing to remove!

I’m not sure how you can be sure of the version, but if it really is using Arduino Core 3.0.2, it is including SoftwareSerial 6.12.7, which predates the fix for this bug. If you install the latest Ardiuno Core 3.1.1, then it will use SoftwareSerial 7.x.x, which will have the fix for the bug, but will introduce the breaking change that causes exception 0 crashes. That means, as of now, you cannot have a working version of SoftwareSerial without manually replacing it with a version that sits in between those two – ideally, you should use the latest pre-v7 version, which is SoftwareSerial v6.17.1.

Upcoming release of the Arduino core will revert SoftwareSerial to <7.x.x, and I believe it’s going to be v6.17.1. But until then, there’s no other way except to manually put in v6.17.1.

EDIT: I just want everyone to understand that no matter what version of Arduino Core you use as of today, you will have one of the two problems with SoftwareSerial. For the default AirGradient Code, the bug just causes a “-3” reading, but no crashing. For ESPHome, I don’t know how the code behaves. Before you waste a lot of time chasing down “unknowns,” you should fix all the “knowns”. If you notice improvements with changing update rates and other similar changes, then know it could easily be related to this bug because it happens when reading from the sensor, so the more often you do it, the more likely you’ll get a reading that ends in 0xFF – that’s just statistics. And also depends on the environment you’re in, since the last byte from the S8 is part of a checksum, there are certain specific CO2 levels that will always result in the last byte being 0xFF – this means you can have a perfectly working system for many, many weeks and then suddenly see it fail frequently because the physical environment is different and the CO2 levels happen to be around one of the values that causes the last byte of the checksum to be 0xFF.

@ken830 Thanks! I understand now. That is a great find and very important. Thanks for pointing it out in such explicit terms to me (us)! It’s much appreciated.

1 Like

@ken830 Thank you for this clear writeup about the situation. I had been confused about where we stand, but this helped clear it up and hopefully a permanent resolution is available soon.

For what it is worth, with ESPHome 2023.2.2 and only setting it up for the D1 mini

esphome:
  name: airgradient-basement
  platform: ESP8266
  board: d1_mini

It looks like mine is using version 3.2.0 which is different from what argafal had mentioned.

INFO Reading configuration /config/airgradient-basement.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing airgradient-basement (board: d1_mini; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)

Okay… I see the confusion… ESPHome is compiled with PlatformIO, right? For PlatformIO, you’re not selecting the Arduino core directly – it is included as a dependency. And in turn, the version of SofwareSerial is also included in the Arduino core. As I highlighted in my post a month back, these are the last four versions of PlatformIO espressif8266 library that I have tested and the corresponding version of Arduino 8266 core that it includes:

PlatformIO platform-espressif8266:

  • v4.1.0 (2023-01-16), Arduino Core v3.1.0, SoftwareSerial v7.0.0 <== Exception 0 Crashes
  • v4.0.1 (2022-01-01), Arduino Core v3.0.2, SoftwareSerial V6.12.7 <== Last-byte 0xFF Bug
  • v4.0.0 (2022-05-31), Arduino Core v3.0.2, SoftwareSerial V6.12.7 <== Last-byte 0xFF Bug
  • v3.2.0 (2021-08-13), Arduino Core v3.0.2, SoftwareSerial V6.12.7 <== Last-byte 0xFF Bug

Hope this helps. If you are using the latest version of PlatformIO ESP8266 library, then you will see crashes. And all previous versions will have a much-too-old SoftwareSerial and you will be hit with the last-byte 0xFF bug. No way around it without directly replacing SoftwareSerial. For now.

EDIT: Fixed typos.

Oh… It’s not difficult to replace the SoftwareSerial version. On Windows, you should find it here:

C:\Users\Ken\.platformio\packages\framework-arduinoespressif8266\libraries\SoftwareSerial

The text in bold needs to be changed to your specific user’s directory.

You can download the ESP SoftwareSerial v6.17.1 (or any version) here:
https://github.com/plerup/espsoftwareserial/releases

Just open the zip file and you will see that you can simply replace your existing directory with the contents of the zip file. Probably need to restart VS Code or whatever to have a good chance of clearing any cached version of the libraries.