Hey Guys,
I ran into some problems with OTA Updates on a “product” (~90 Electrons).
The Electron boots up every hour, takes a measurement and every 12th hour it connects to the cloud and transmits all data in one string. Because of that I am running it in Semi-Automatic mode, so it doesn’t connect to the cloud everytime it boots up.
Everything has been working fine so far, the only problem is - what about OTA updates?
I have included particle.process() in my code with a delay-time in order to make sure all the data is sent to the cloud. I always thought that particle.process() also includes checking for new updates (and installing them).
This doesn’t seem to be the case - so how can I check for updates and install them? And at which point in my code would it make sense? Probably in the end right?
I would be grateful if someone could point me into the right direction, thats all I need =)
Does "enable Updates" mean 'generally' enabling automatic updates or enabling the update process in this specific run?
Or does the Electron just start updating?
I just found this:
Does this mean, I'll just check whether there are updates pending and if thats the case, I'll just give it delay of 1-2 minutes to make sure the update installs properly.
The only thing I am wondering is, WHEN the update process starts and how to make sure my code is executed first.
EDIT:
I just found this and it (kind of) answered my question.
I will just insert the code I mentioned above (longer delay when update is available) and that should be it, right?