- Being able to create arbitrary A records in your local dns server
- Run your own webserver that is accessible to the shellies.
- Run a cron job on the webserver host
- Curl, JQ and sed.
- Don't use the shelly cloud
I exploit the fact that Shelly's OTA mechanism uses http instead of https to fetch updates. I have my webserver fetch the firmware itself and store it in the folder structure as on api.shelly.cloud. I then have my dns tell the Shellies that my webserver is api.shelly.cloud.
On your webserver fetch the file https://api.shelly.cloud/files/firmware and store it in /files/firmware. This should make sure the file is served on /files/firmware.
On your directory create a subdir named firmware. In that directory run the following one liner.
curl 'https://api.shelly.cloud/files/firmware' | jq '.data[].url' | sed 's/http/https/g' | xargs -n 1 wget
This should download the all the firmwares for the different devices.
On your local DNS server make sure that api.shelly.cloud points to your local web server. Make sure that your webserver itself doesn't use that record too.
Add a cron job that runs step 1 and 2 periodically.