Wifi Stratagey Template

Does this thread help at all?

I posted some code that lets the Photon disconnect from cloud when there is no wifi, run certain code when it is offline, and try to reconnect to wifi every minute, and run different code when online, without any blocking or delays.