-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to update Shelly Dimmer 2 to stock 1.10.x firmware #7
Comments
I have the same problem. @CReimer Can you provide me the binary backup of your Shelly Dimmer 2? Or is it not possible to flash an other binary backup to an other device? |
I used one of these. https://github.com/Mollayo/Shelly-Dimmer-2-Reverse-Engineering/tree/master/shelly%20stock%20firmware I knew that my hw_revision was 20200629, but @Mollayo also provides one for hw_revision 20200904. I don't think it actually matters much, but after having trouble updating to 1.10 I think it's best to use one which fits your hardware the best |
Thanks! |
Hello, I have been stuck in the same issue. I have downloaded one of the firmwares, but now I don't know how to upload it to the Shelly. How is it done? |
You need to connect your Shelly via Serial connection to your PC and use a tool like Tasmotizer. You can select a custom bin file and flash the original Shelly firmware that way |
I also came to this point, bummer - will extract from wall and reflash! |
anybody a solution for this, I have the same, latest version I can use is 1.9.4, when I go to 1.10.1 I always get the index page and not the dimmer start page. |
Nope, had the same problem. In the end solved it by connecting a serial cable and flashing with esptool. This, however, doesn't really solve the issue, especially for shellies that are already in the wall. So it would be great if this issue can be solved! |
Hi, mgos512k-0x7000.bin I can flash en wifi hotspot comes online I follow the instructions and it is not working. Any suggestions? |
I have the same issue. Would be good to be able to flash it back in an OTA way. |
Found a way! Made a backup of different dimmer (that i already installed in the ceiling). Download and extract: Install esptool First: Second: Connect to the dimmer wifi, do a factory reset (not sure if nessesary) and your all good to go for a new setup! |
I would rather not remove the device from its current location, I would really appreciate if there would be a way to do this without plugging it to my computer :) |
If that happens let me know 😊 |
Just to elaborate on this a little bit - and see if anyone might have a solution. I have a new Shelly Dimmer 2. I tried to flash it OTA to Tasmota, which worked, but I couldn't get the Tasmota firmware to behave (the light would turn on and then off again after a few seconds). I pulled it out of the wall and used another Dimmer 2, with the stock firmware, and that works fine. So I decided to forgo Tasmota and stick with standard Shelly firmware. I was going to USB-flash it, but in the process of putting the flasher pins into the device, the black plastic around the pin sockets disintegrated (I must've done something wrong) so it's now nearly impossible to get a connection to the USB flasher. I re-connected the Shelly to power, and managed to get it to At this point, a wifi network That looks like a web server directory listing to me. So I imagine that Mongoose 6.18 is running as expected, but whatever files were put there with the Re-flashing from serial isn't an option for me, so if there is any way to rescue it, that would be amazing. I can ping the device for example, so it's responsive. I'd need some way of getting the right firmware to it though! |
There are two MCU in the Shelly dimmer 2: the ESP8266 and the STM32. The web page with the file listing that you see is because the ESP8266 is not able to talk with the STM32. When you flash the dimmer with the Tasmota firmware, the firmwares of both MCU (i.e. ESP8266 and STM32) are modified. Then when you flash the dimmer with the Shelly firmware, only the ESP8266 firmware is modified. The firmware of the STM32 MCU is still the Tasmota version. One solution would be:
|
Thank you @Mollayo - very insightful. In my particular case, a serial flash isn’t an option. I am fairly confident MongooseOS is running on it, and whilst I haven’t tested it yet I think it’s likely that the /update POST end point is still operational. Is there any way to recover it OTA? |
I see. Then you might be able to change the firmware from Shelly to Tasmota with the mgos-to-tasmota tool: https://github.com/yaourdt/mgos-to-tasmota. Once the Tasmota firmware has been installed, you can then flash this firmware https://github.com/Mollayo/Shelly-Dimmer-2/blob/master/shellyDimmer2.ino.generic.bin.gz. You will then be able to change the STM32 firmware as described above. |
Thank you again @Mollayo! Just to check I got this right: Originally, I went from stock firmware to Tasmota using mgos-to-tasmota. I then installed the template and custom STM32-aware firmware as per https://templates.blakadder.com/shelly_Dimmer_2.html. That didn’t work well with my light (but worked fine in terms of Tasmota itself, networking etc) so I used tasmota-to-mgos as per the instructions on this package to flash (using the /update HTTP endpoint) SHDM-2.zip I downloaded from the Shelly website. What you suggest is:
Did I get that right? |
Wait - no, this doesn't work, because at present my Shelly is not yet connected to my wifi network. It exposes its own AP ( The |
You can actually setup a web server on your computer to serve files. See here: https://stackabuse.com/serving-files-with-pythons-simplehttpserver-module/. Actually, I am trying to reproduce the steps. The conversion from the broken Shelly to Tasmota using the mgos-to-tasmota utility does not seem to work. The firmware is uploaded. But after reboot, the device becomes unreachable. It does not create the AP. I am investigating the problem. |
Thank you! I’ll hold fire then as without an AP the device will be bricked
for me (given no viable serial connection).
…On Sun, 16 Jan 2022 at 10:47, Mollayo ***@***.***> wrote:
You can actually setup a web server on your computer to serve files. See
here:
https://stackabuse.com/serving-files-with-pythons-simplehttpserver-module/
.
Actually, I am trying to reproduce the steps. The conversion from the
broken Shelly to Tasmota using the mgos-to-tasmota utility does not seem to
work. The firmware is uploaded. But after reboot, the device becomes
unreachable. It does not create the AP. I am investigating the problem.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABHJCX4B2J4HT7LDBHVAH3UWKO3RANCNFSM4ZV56ZLQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok. It might take one or two days. |
I think I found a way to change the malfunctioning shelly firmware to the tasmota firmware. Actually, the mgos-to-tasmota tool assumes that the device is already connected to the Internet; this is required to get the tamosta binary to complete the conversion from ngos to tasmota. But since the WiFi credentials are not available (the shelly device works as a WiFi AP), the device does not connect to the home router; it does not create an AP neither. The only way to recover is to flash it with serial connection. One solution would be to use a modified version of mgos-to-tasmota firmware in which the SSID and password of your WiFi network have been saved. This can be done by following the instructions here: https://github.com/yaourdt/mgos-to-tasmota#build-the-firmware-yourself
Once the mgos-to-tasmota firmware has been compiled, you need to setup a web server to make this firmware available to the shelly device. See here: https://stackabuse.com/serving-files-with-pythons-simplehttpserver-module/. Then the update is done with the following instruction: curl http://192.168.33.1/ota?url=http://192.168.33.2:8000/fw.zip. 192.168.33.1 is the IP address of your Shelly device and 192.168.33.2 is the IP address of your computer. Your computer is assumed to be connected to the AP of the Shelly device. fw.zip is the file name of the mgos-to-tasmota firmware that has been previously compiled. The steps are very tricky. It would be better to try first on another device that you can flash with serial connection in case things go wrong. I can also provide you the modified version of the mgos-to-tasmota firmware. |
Worth a try.
Figured it out. It’s referenced in |
I think you better wait. I was doing the tests with an esp8266. When I tried on a real shelly dimmer, it did not work as expected. There are still some problems. |
Ok. I'll hold fire. In the meantime, I've installed Update: Installing docker and running |
I found that my Shelly dimmer is dead. It is just sending some garbage data over the serial line. Actually, I saw a flash light when I was uploading the firmware. I should have removed the bulb. Most probably, the above method works but I cannot guaranty this. If you decide to go, please let me know the result. I can help you for the next steps (which hopefully will be easier). |
I mean, it's not going to get any more useless than it already is, so why not try... So I did this:
I've confirmed that
I've also confirmed that this zip file is similar in layout the "official" one from
However, the device never reboots or does anything noticeable, i.e. I'm still connected to its Is there any way to get a log or any error messages out of it? |
The shellydimmer2-XYZ AP is the AP of your dimmer ? If every thing goes well, your dimmer should connect to your home router. You should be able to see it in your home network. |
Red herring. My Mac firewall was refusing the inbound connection. The command completed and the This is what was in my
I've double-checked the the SSID and password are correct (obviously modified in the paste above). One question - why is it If not, I imagine it's now unrecoverable. But nevermind. A huge, huge thank you for doing so much to help figure out a path! |
A new version of the firmware is available here: https://github.com/Mollayo/Shelly-Dimmer-2. Let me know what error code you have now. The error codes: |
Hi @Mollayo |
I have uploaded another version of the firmware to check if the initialisation of the STM32 is successful. Can you try this ? Same location: https://github.com/Mollayo/Shelly-Dimmer-2 |
Hi @Mollayo failed to init the STM32 for uploading the firmware |
It means that the esp8266 cannot even talk to the STM32. How is the Shelly device connected ? Is it connected through a serial connection to your computer ? Or is your Shelly device connected to the power line ? |
I flashed the firmware via serial. After that I tried to upload stm firmware while the dimmer is connected via serial. |
Did you thy to flash the original Shelly firmware via serial connection ? |
Two old versions of the stock firmware are available here: https://github.com/Mollayo/Shelly-Dimmer-2-Reverse-Engineering/tree/master/shelly%20stock%20firmware |
I think I already tried to flash those versions, but I will try again |
Ok now it is working. Thank you for your support :) Yesterday I thought I bricked the stm chip :D |
Good news. I know that if you connect the Shelly device through serial connection, it can happen that the esp8266 cannot communicate with the STM32. This is because the same serial connection is used for communicating with the STM32 and for flashing the Shelly device. |
Strange:
|
Your Shelly device should be connected to the power line; the serial connection should be disconnected. Then, the ESP8266 should be able to communicate to the STM microcontroller. The above page should not appear anymore. |
@Mollayo I am trying to revert back to a shelly firmware from Tasmota. I was able to go to your https://github.com/Mollayo/Shelly-Dimmer-2/blob/master/shellyDimmer2.ino.generic.bin.gz firmware using the OTA interface on Tasmota. I then changed the STM32 firmware with your interface to the stm_3F_02 firmware. I then updated it to the shelly firmware, but I still got the Index of page if I use anything newer than the 1.9.4 firmware. When I installed the STM32 firmware it said it was successful. Do you have any suggestions, I don't have the ability to connect via serial. Thanks in advance! |
Is your device connected to the power line or is it connected to a PC? |
It's connected to the power line. I never took it out of the wall. Here is what I tried:
At this point I did the following:
I can then take it back to tasmota, and put the shelly 1.9.4 firmware back on and I can function at that level. I just can't get beyond it. Thanks. |
If my understanding is correct, you managed to install the shelly firmware version 1.9.4. This firmware was fully functional (you could access to the web interface of the device and switch on/off the light. Then, the problem appeared when you installed the firmware version 1.12.1; the device stopped working (i.e. the web server shows the index page instead of the configuration page). |
Previous shelly firmware can be found here: https://www.shelly-support.eu/shelly-firmware-archive/. |
It seems the highest I can go is 1.9.6, everything above that gives me the index page. :( |
This is really bizarre. Before using Tasmota, which version of the Shelly firmware did you use ? Was it version 1.9.6 or some earlier version ? |
I' had the exact same problem. The only workaround I could find, was dumping the firmware from a working shelly dimmer (on the original firmware) using a serial connection, and flashing that firmware to the one running tasmota, also using a serial connection. In all other cases, I end up with the directory index, as soon as I try to go past 1.9.6. |
I have been doing more research, and it seems the device is ending up in a test mode, which can be seen by the red light on the back flashing. There is a procedure to exit the test mode, but that doesn't seem to work. I can temporarily get it out of the test mode by holding the reset button while powering it on, but the next reboot puts it back in the test mode. I have a case open with Shelly. I am pretty sure the firmware itself is fine, or booting with the reset button would have an issue as well. |
When the index web page is shown, this means that the ESP8266 MCU is not able to communicate with the STM MCU. One cause could be that the two MCU use different protocols because of the mismatch of their firmware version.
I cannot test myself this procedure; I do not have any working shelly device. Please let me know if it works. |
I was thinking it's the firmware mismatch as well, but then why would it boot successfully if I hold the reset button while powering it up? I have already used the https://github.com/Mollayo/Shelly-Dimmer-2 to update the STM firmware. Unfortunately, I can only do this via OTA I can't get a serial connection to the Shelly. Again, though I am pretty sure I have the right STM firmware, since I was able to update it with your firmware and the STM update process completed successfully, and the lights work great when on 1.9.6 or 1.12.1 (assuming I have powered it on with the reset button pressed). |
For me, the restore to the shelly firmware worked according to the instructions of Mollayo. Many thanks for that. I have also observed that the wifi signal is now displayed much worse. Is this perhaps due to the firmware version for the STM MCU? |
The strength of WiFi signal has nothing to do with the STM microcontroller. It solely depends on the esp8266 firmware. Maybe there's a way to change the signal strength in the setup webpage of the Shelly device. |
First of al, thanks for putting al the work in this project to re-flash stock firmware on the shelly devices. I've done some testing and ran into the same issue when updating OTA. It's possible to get it working on V1.9.4, but when updating beyond that version it just shows then filelist. One thing I did notice is that the page from the 'bricked' version mentiones that it runs Mongoose V6.18. When playing around with CURL on the bin FTDI build it mentiones that it runs Mongoose V6.11 Might the issue during update come from the Mongoose version? Is there a way to retrieve the same older Mongoose version V6.11 to try this one? |
I was able to get my Dimmer 2 going again based on the instructions from this post: https://www.shelly-support.eu/forum/thread/6349-how-to-load-stock-firmware-via-serial/?postID=96483#post96483 What I did:
This is working for me so far. It has continued to work through power cycles |
Just wanted to let you know that it is not possible to update stock Shelly firmware beyond 1.9.6 after using tasmota-to-mgos. It's stuck on an "Index of" page.
Tried that with 4 different Shelly Dimmer 2 devices. Flashing a full binary backup from before installing Tasmota the first time, fixes it on all these devices.
Something is different between Stock Shelly Firmware and "Returned-To-Stock" Fimware using tasmota-to-mgos.
BTW: I tried replacing hwinfo_struct.json with the correct one for my Shelly Dimmer 2, but still unable to update to 1.10.
The text was updated successfully, but these errors were encountered: