It has become clear that we need a way to initialize our hardware before the WiFi connects to the cloud. Having relays or other devices connected which need their pins and or internal registers initialized as soon as possible is a good thing. Having to wait to do this when the device powers up to connect to the cloud is not IMHO a good way to go. For instance if I have user leds to indicate things and the device looses power and regains power those leds will be in a incorrect state all the while we are waiting to connect to the cloud. If the wifi is down when this happens we have a real problem on our hands then.
I would like to see one of 2 things changed Either add a new function like CriticalInit(); and place this outside of while(1) /* Main loop / in main,.cpp. Or move the function setup(); outside of while(1) / Main loop */ in main,.cpp.
This would then allow us to initialize our devices first, then the unit can connect to the cloud.
Sure, we can add this ourselves. However, I would rather not change the stock code as that can get into all kinds of issues later down the road with updates as they come.