I have a couple of Shelly 1’s with ESPhome that I’d like to flash back to stock Shelly firmware.
I know I can flash over a serial connection, but that would mean a trip to the roof and a sad face.
Is there a way I can flash back to Shelly OTA similar to the way you can flash from Tasmota to ESPHome ?
My instance of ESPHome is running as an add-on to HAOS on a HA Blue. Also running portainer so have access to the docker container.
LangeJan
(Jan)
October 12, 2021, 9:47pm
2
If you enable the web interface in esphome you should be able to upload the Shelly bin there
1 Like
nickrout
(Nick Rout)
October 13, 2021, 5:35am
3
If you have access to the firmware. Do Shelly make these available?
They do !
You’ll need to log in
LangeJan:
web interface
Can you tell me where ? I’ve not seen anything related to firmware upload on the devices webpage
Well, I had a look with my STRONG eye and blow me down if there wasn’t some buttons to upload and flash some firmware !
Thanks for the heads up @LangeJan
So, just some feedback in case someone else is wanting to roll back…
It looks like I have to climb into the roof.
Trying an OTA update with original firmware fails with
Update Failed: ERROR[4]: Not Enough Space
Updating OTA requires a large chunk of free memory to store basically BOTH firmwares during the update process.
That’ll learn me to stuff with things that 'aint broke !
What I don’t understand is why the ESPhome binaries are ~300k and the shelly binaries are 2MB
francisp
(Francis)
October 18, 2021, 3:43pm
7
ESPhome only supports the HA api, the Shelly firmware supports the shelly cloud, mqtt and coap. It is normal it is bigger
nickrout
(Nick Rout)
October 18, 2021, 6:34pm
8
OTOH Shelly can upgrade its own firmware OTA.
Are you sure you have the right flash size set in esphome?
I have
board: esp01_1m
Doesn’t help that I can only do this through the webserver which uses lots or ram
nickrout
(Nick Rout)
October 19, 2021, 7:09am
10
And how much flash does the device have? esptool will tell you.
Interesing !
The link below suggests 2MB !!
So…
Might it be as simple as changing the board type to _2m
?
nickrout
(Nick Rout)
October 19, 2021, 7:38am
12
Choose one with 2Mb from the list pointed to in the docs.
Thanks for the tips.
I’ll post back with what I find
Could you flash an absolutely minimal sketch with only ota and wifi enabled? Would that give you headroom to load the shelly binary?
I tried that last night with no luck.
Still need webserver:
to be able to select a bin file.
I think @nickrout might be on to something.
I’ll know more in a few hours
1 Like
gaz99
(Gaz)
October 19, 2021, 10:53am
16
Is there a reason you can’t use the header on the Shelly1 to flash via serial ??
Gaz
Laziness
Seriously though, that will be my last resort.
If I don’t have to retrieve it from the roof cavity, I won’t.
Sooo close !
After changing
board: esp01_1m
to
board: esp_wroom_02
( ESP8266 with 2MB flash )
still fails with not enough space but uploading gets to 76% where previously it was failing at 25%
Interestingly, I’ve connected a spare Shelly 1 to esptool which reports
Auto-detected Flash size: 16m
From what I’ve read, this mismatch cannot be corrected OTA.
Potentially, had I started using ESPhome with the correct board type selected ( d1_mini_pro ? ) I wouldn’t be asking all these silly questions.
I think I’ve just killed a Shelly 1
As a test I tried uploading a ESPhome image over serial with board: d1_mini_pro
selected
After the upload I couldnt get a response from the Shelly.
I uploaded a Shelly restore image over serial and its still dead.
Vale Shelly 1