Photon (1st gen) doesnot reconnect after temporarily WiFi failure

When my WiFi is failing my Photon loses connection and -if I understand it correctly- it should reconnect when WiFi is available again. This does not happen, so I made provisions in my software that when the connection is lost for some time, it automatically generates a System.reset().

However: that doesn’t work either. The only way too get things working again is to physically reset the device by pushing the resetswitch on the device (hard reset). And then it connects immediately (and stays connected until a possible next WiFi failure, which may be after several hours).

Does anyone know a proven softwaremechanism that I can include in my software that really acts like a “hard reset”?

System.reset and hitting the reset button should behave similarly. With the Photon 1 I've seen what you've describe occur, but it should be rare. One technique that may help is instead of doing a System.reset when you detect that something is wrong, do a hibernate sleep for 10 seconds or so. This will power down more of the hardware for longer so it's more likely to succeed on wake.

Do you have any delay()s or anything else that slows the operation in your main loop()? It is best to allow loop() to run as fast as possible (about every msec for a Photon 1?).

Have you tried setting your Photon to a fixed IP address on your router? It might help.

Have you updated the firmware in your Photon 1? I am still using a Photon 1 and I can't recall the last time I had an issue with WiFi.