Fallback hotspot not starting recently

After some version changes I began to realise my fallback config is not kicking in with my ESPDevices anymore. I’ve been rebuilding my configs with the https://web.esphome.io/ wizard, but it seems something broke and now I can’t get my devices to start the local AP in fallback mode. Can someone please check my config and let me know if something is obviously wrong.

substitutions:
  name: esphome-web-0c955c
  friendly_name: "Sump 3"

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  min_version: 2024.6.0
  name_add_mac_suffix: false
  project:
    name: esphome.web
    version: dev

rp2040:
  board: rpipicow
  framework:
    # Required until https://github.com/platformio/platform-raspberrypi/pull/36 is merged
    platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git

wifi:
  ssid: "Arkeo"
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "PicoW-1 Fallback Hotspot"
    password: !secret wifi_password

# Enable logging
logger:

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:
- platform: esphome

# Allow provisioning Wi-Fi via serial
improv_serial:

Has something changed in you wifi setup?
If not, the issue is probably not with the fallback ap…

Thanks, by “wifi setup” you mean the actual wifi routers? Not really, but regardless, if I start up my ESP device out of range of the router it’s been configured for, it’s internal AP never shows. And it’s the same with all 11 of my devices. Used to work in the past before many upgrades / updates. Maybe I need to make a manual change to get it working again, just not sure what that is.

Yeah, my point. Maybe the esp is bootlooping for whatever reason.
Try to attach it via USB to see the logs

I had a look at it but could not learn anything, here it is, as soon as it tries to connect (even though not found) it disconnects the port:

[16:39:24][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.062 m
[16:39:24][D][wifi:482]: Starting scan...
[16:39:25][D][wifi:497]: Found networks:
[16:39:25][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:25][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:25][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:25][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:25][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:25][W][wifi:551]: No matching network found!
[16:39:25][W][component:170]: Component dallas_temp.sensor cleared Warning flag
[16:39:26][W][dallas.temp.sensor:074]: 'Sump 3 Water Temp' - reading scratch pad failed bus reset
[16:39:26][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed
[16:39:26][D][sensor:093]: 'Sump 3 Water Temp': Sending state inf °C with 1 decimals of accuracy
[16:39:26][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.061 m
[16:39:28][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.062 m
[16:39:30][D][wifi:482]: Starting scan...
[16:39:30][W][component:170]: Component dallas_temp.sensor cleared Warning flag
[16:39:30][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.062 m
[16:39:31][D][wifi:497]: Found networks:
[16:39:31][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:31][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:31][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:31][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:31][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:31][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:31][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:31][W][wifi:551]: No matching network found!
[16:39:31][W][dallas.temp.sensor:074]: 'Sump 3 Water Temp' - reading scratch pad failed bus reset
[16:39:31][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed
[16:39:31][D][sensor:093]: 'Sump 3 Water Temp': Sending state inf °C with 1 decimals of accuracy
[16:39:32][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.061 m
[16:39:34][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.061 m
[16:39:35][W][component:170]: Component dallas_temp.sensor cleared Warning flag
[16:39:36][D][wifi:482]: Starting scan...
[16:39:36][W][dallas.temp.sensor:074]: 'Sump 3 Water Temp' - reading scratch pad failed bus reset
[16:39:36][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed
[16:39:36][D][sensor:093]: 'Sump 3 Water Temp': Sending state inf °C with 1 decimals of accuracy
[16:39:36][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.062 m
[16:39:36][D][wifi:497]: Found networks:
[16:39:36][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:36][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:36][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:36][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:36][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:36][D][wifi:545]: - [redacted] [redacted]▂▄▆█
[16:39:36][W][wifi:551]: No matching network found!
[16:39:36][D][wifi:697]: Retrying with hidden networks...
[16:39:38][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.061 m
[16:39:40][W][component:170]: Component dallas_temp.sensor cleared Warning flag
[16:39:40][D][ultrasonic.sensor:040]: 'Sump 3 Water Level' - Got distance: 0.062 m
[16:39:40][D][sensor:093]: 'Sump 3 Water Level': Sending state 0.06157 m with 2 decimals of accuracy
[16:39:41][W][dallas.temp.sensor:074]: 'Sump 3 Water Temp' - reading scratch pad failed bus reset
[16:39:41][W][component:157]: Component dallas_temp.sensor set Warning flag: bus reset failed
[16:39:41][D][sensor:093]: 'Sump 3 Water Temp': Sending state inf °C with 1 decimals of accuracy
[16:39:41][I][wifi:313]: WiFi Connecting to 'Arkeo'...
Terminal disconnected: NetworkError: The device has been lost.

If you want it to set your time to AP much longer to give much longer time to search for wifi. Setting timeout to 0 means it never goes to ap

  ap:
    ssid: 
    password: 
    ap_timeout: 60min

Thanks but at times I want to bring the device to my workbench and test it, which is out of range of the “production” wifi ssid. So it will never find it. But it fallback ap should kick on so I can change it and test it. Then take it back to the site where it’s supposed to run and repeat the process.

According to the doc, the AP is only enabled after trying your main wifi during 1 min (by default). Did you take that into account?

Yes that is what I remember, but now my devices just stops abruptly if its network is not found as in the log above.

However - I’ve set up a new ESP32 device and it works as expected! I went back to 2 of my Raspberry devices and they still had the problem with the same code. Seems to be Raspberry specific. I’ll see if I can get a serial connection going and it might be a power issue according to some sources.

Thanks for your answers really helps getting closer to the source.