Remote update software (using JSON / httpRemote

Imagine you have 100+ WLED instances running arround the world… The instances use the “usermod_v2_HttpPullLightControl” which is doing a request every minute…

Now, how do you update these instances? There is no update JSON template/specification.
I searched around and found this reply from @blazoncek : Adding Remote OTA Updates - #3 by blazoncek

I am happy to implement a new usermod or extending the usermod_v2_HttpPullLightControl.

  1. Is there any other needs/request for such a Remote update pull/get functionality? If yes, please post your comments/thoughts/requirements in this thread.
  2. @blazoncek Before extending my usermod_v2_HttpPullLightControl, what do you propose for JSON ? Do you mind when I add something like this to the JSON?
  "pullUpdate": {
    "url": "https://example.com/wled-update.bin",
    "checksum": "abcd1234",
    "erase": false,
    "now": true
  }

In this way, people can let their remote instances do a remote update.

There were attempts that failed.
I would suggest to add a configuration item and let user enter address of the bin.
HTTP or HTTPS.

How would you detect version change (to notify of the update) is up to you as there are no standards currently. You may check official binary name.

Thanks for the feedback!

Do you agree when I try to add this functionality (since it is a PULL functionality) to the usermod_v2_HttpPullLightControl usermod?

I could integrate something like version number into it, than it can compare it to it’s current version and only update when it has a newer version.

Versions could also be maintained at the server (the device which also says which effects or which LEDs needs to go on)

Remember, for the usermod_v2_HttpPullLightControl you always need to think ‘the other way around’. The WLED instanced connect to a server endpoint every minute and that server endpoint says what it want the WLED instance to do.

I think a separate usermod would also be beneficial.

I would recommend to get the files in official build format, i.e. WLED_xxxxxx_yyyyyy.bin or WLED_xxxxxx_yyyyyy.bin.gz for ESP02.
Where xxxxxx is WLED version, like 0.15.0 (may add options for beta versions too) and yyyyyy is release name, like ESP32_Ethernet or ESP32S3_4M_qspi, etc.

Default update server should be official WLED repository, releases page.

@blazoncek

I am not talking about an OTA update when pressing a button in WLED.

I am talking about that WLED is configured with the usermod_v2_HttpPullLightControl usermod and so it doing a XML call every 60 seconds. Normally it get a response about which LEDs need to turn on or which Effect has to turn on.

But sometimes it will get a response like this:

  "pullUpdate": {
    "url": "https://example.com/wled-update.bin",
    "checksum": "abcd1234",
    "erase": false,
    "now": true
  }

In that case, it will update itself by getting the .bin file from the remote server and does a OTA update.

Offcourse this will work fine for standard updates, but as soon as there’s a partition-table update or other things… it can’t be done using OTA. Maybe an extra line to include a script or additional commands.