Skip to content

Commit

Permalink
Add OTA updates in data
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainPer authored Dec 7, 2024
1 parent d83965c commit 7525ba2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Classes/OTA.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,17 @@ def notify_ota_firmware_available(self, srcnwkid, manufcode, imagetype, filevers
logging(self, "Status", " firmware type: %s" % _ota_available["imageType"])
logging(self, "Status", " URL to download: %s" % _ota_available["url"])

if srcnwkid in self.ListOfDevices:
if "OTAUpdate" not in self.ListOfDevices[srcnwkid]:
self.ListOfDevices[srcnwkid]["OTAUpdate"] = {}
if imagetype in self.ListOfDevices[srcnwkid]["OTAUpdate"]:
self.ListOfDevices[srcnwkid]["OTAUpdate"][imagetype].clear()
self.ListOfDevices[srcnwkid]["OTAUpdate"][imagetype] = {
"currentversion": str(fileversion),
"newestversion" : str(_ota_available["fileVersion"]),
"url": _ota_available["url"],
}

if folder:
logging(self, "Status", " Folder to store: %s" % folder)
else:
Expand Down

0 comments on commit 7525ba2

Please sign in to comment.