Sometimes there’s an annoying bug in the updated Shelly firmware, so you want to go back – but you don’t have the file and the manufacturer doesn’t want to give it to you? This was the case for me, and I didn’t want it to happen ever again, hence this small project.
What does it do exactly?
- scan the configured IP address ranges for Shelly devices and extract the models
- for each model, go to the official Shelly update site and download the available firmware files (both stable and beta)
This enables you for the future to just go back a firmware version if something bad happens after an update – you can install an older version by uploading the file in the web interface of your Shelly devices.
Get started
You can clone the repository or simply download main.py and config-example.ini from it. To run the script you’ll need Python 3 installed.
Configuration
All configuration is read from the file config.ini which is expected next to the script. You can copy the file named config-example.ini to config.ini to get started.
Change the values to your linking. Any IP addresses not belonging to a Shelly device are ignored silently (after the timeout).
Running
This script can be run via Cron, e.g. once a day at 4 AM like this:
0 4 * * * /path/to/shelly-firmware-downloader/main.py >>/path/to/shelly-firmware-downloader.log
If you run it like this, normal log output will be redirected to the log file, but warnings and errors will trigger a message from the cron daemon to you directly.
Communication
If you find a bug or want a new feature or just have a question, you are welcome to file an issue or even fix things yourself and create a pull request. You can also write me an email and I’ll see what I can do.
License
This project is licensed under GPL v3. If you submit or contribute changes, these are automatically licensed under GPL v3 as well. If you don’t want that, please don’t submit the contribution (e.g. pull request)!