My project is running some simple python code that outputs sensor values to a Node Red dashboard all running on the same Pi 4 in a vehicle. The Pi starts Node Red on localhost, starts the Python script and opens the dashboard URL (http://localhost:1880/ui) via Chromium in Kiosk mode on boot.
My problem is that when the Pi is able to connect to WiFi (e.g. my home network) it all works fine. When the Pi doesn't have an internet connection (i.e. most of the time) the Chromium won't load the dashboard. I can't work this out as localhost should be available all the time and I have a delay before Chromium loads.
When this happens, if I open a hotspot on my phone that the Pi can connect to, Chromium is then able to connect to the dashboard and things work.
May not be a Node-Red problem - I can't see anything in dmesg or syslog that gives me any clues.. Any help would be great.