Closed h2zero closed 1 year ago
I don't see where the ota_update.lua
file is deleted after the update. Does this happen internally?
I was confused by this also but it does seem to delete it internally. I had code in there to delete it at first but it would crash saying the file was nil
.
Hmm maybe because the file is written to LFS but subsequently replaced?
Where is LFS.ota_update
defined? I couldn't find the documentation for that.
I guess my worry is what if the OTA update fails? Would it continuously reboot? Perhaps just add a line to delete ota_update.lua
(checking for presence first) if it still exists after calling LFS.ota_update
Agreed, I'll see what I can do.
Where is LFS.ota_update defined? I couldn't find the documentation for that.
I think you meant LFS.http_ota
which just runs the http_ota.lua
file.
Well that was strange, file removal worked now, not sure what the issue was before...
I also added a small change to get rid of the deprecation warning.
This resolves an out of memory issue when updating via Over-The-Air while connected to a secure MQTT broker/AWS. The process creates a file and writes the update info into it. The device is then rebooted and the file, if detected after connection to WiFi, is read from and the update performed using the data in the file.
Resolves #170