Photon gets frozen after some time running

It may well be that one of the used libraties (or your own code) has some memory leak. They are usually difficult to find when you don't know what to look for :wink:
As a (poor) workaround you can use Time.local() and check that against your desired restart time and once you hit that time call System.reset().

BTW, can you post your entire new code to see what you changed?
You could also add SerialLogHandler logger(LOG_LEVEL_ALL); and record the output to see what's happening with the system during the lead-up to such a freeze.

Since you also don't do anything with the MQTT callback you could remove that too.
As I already suggested here

1 Like