Report comment

Hi Mark, no problem it is easily done. I have done that type of thing enough times during it's development.
If the script doesn't receive an ip address from your router within 10 seconds it will presume a network issue and fall back to the hotspot.
if you run the script manually in hotspot mode you can see what it is doing.
sudo /usr/bin/autohotspot
If it says Hotspot already active then the Pi doesn't detect your SSID in range, if it connects to your router and then says checking wifi connection ok, the goes back to hotspot then it finds the router but fails to receive an ip within 10 seconds which is a way of confirming the connection has been made. My one gets it within 4 - 6 seconds,
In the autohotspot script in the section ChkWifiUp() change sleep 10 to sleep 20 and see if that helps.

You can also do sudo systemctl status autohotspot to see the same messages it issued at bood up.

hope this helps