rttools / hodmin

CLI-Tool for Homie-devices
12 stars 5 forks source link

Allow upgrade of devices that come online only periodically #4

Open haimgel opened 7 years ago

haimgel commented 7 years ago

Added an "offline" upgrade mode. My battery-powered devices come online only for a few seconds every 10 minutes. When in "offline" upgrade mode, hodmin will publish the firmware checksum with the retain flag on, and then will wait for the device to come online.

When the device comes online, it will receive the retained message and start OTA update immediately. The retained firmware checksum is cleared as soon as the device starts the upgrade process, to prevent OTA loops etc.