Shelly EM firmware not updated

  • Hi,

    I have received my Shelly EN and 3EM devices recently.

    I have a problem with firmware update for Shelly EM, current firmware 20210429-104036/v1.10.4-2-g9a159c1fb-release-1.10.

    1. When I connect to the device and try to update firmware from the Settings menu, it says

    "Current version: 20210429-104036/v1.10.4-2-g9a159c1fb-release-1.10

    You have latest version on your device!"

    2. When I try to use the firmware archive site, it gives me the update link "http://192.168.33.2/ota?url=http:/…/SHEM_build.zip".

    When I run the link in the browser , it returns JSON

    {"status":"updating","has_update":false,"new_version":"","old_version":"20210429-104036/v1.10.4-2-g9a159c1fb-release-1.10"}

    and nothing is changed.

    Am I missing something?

    How can I update the firmware without using the Shelll Cloud?

    thank you

    Zdenek

  • Is your device connected to the network and has internet access? Class C network 192.168.33.0 looks like the local WLAN accesspoint from your shelly device. You do not need Shelly cloud to update your Shelly devices, but they must be able to access the update server. You can even setup a webserver in your LAN and provide the update file locally. When using "http://192.168.33.2/ota?url=http:/…/SHEM_build.zip" to update your device is looking for archive.smarthome-forum.eu as the update location.

  • Hi hbrui,

    thank you for your response.

    Unfortunately, it does not help.

    I have tried several local paths (on my notebook, now with IP 192.168.33.2; Shelly EM after factory reset, in AP mode, has now IP 192.168.33.1) for the download, and none of them was functional.

    Using direct file access:

    http://192.168.33.1/ota?url=file://c:/aaa/SHEM_build.zip

    Using localhost:

    http://192.168.33.1/ota?url=http://localhost/v1.11.7/SHEM_build.zip

    Using localhost IP address:

    http://192.168.33.1/ota?url=http://192.168.33.2/v1.11.7/SHEM_build.zip

    Setting hosts content:

    http://192.168.33.1/ota?url=http://archive.smarthome-forum.eu/v1.11.7/SHEM_build.zip

    Note: all paths after 'url=' offer the ZIP file for download when supplied to a browser.

    I also tried to access the ZIP file from my tablet, connected to the Shelly EM, using http://192.168.33.2/v1.11.7/SHEM_build.zip (so, no firewall is blocking the access to my notebook).

    Zdenek

  • on my notebook, now with IP 192.168.33.2; Shelly EM after factory reset, in AP mode, has now IP 192.168.33.1

    That's what I was talking about. You do not have internet connection.

    When using localhost as the ota source, this can never work. "http://192.168.33.1/ota?url=http:/…/SHEM_build.zip" tells your Shelly EM to look on his own webserver for the update file. But the file is on your notebook.

    "http://192.168.33.1/ota?url=http:/…/SHEM_build.zip" may work, if you run a webserver on your notebook whitch provides the firmware file at the specified path.

    "http://192.168.33.1/ota?url=http:/…/SHEM_build.zip" only works, if you have internet connection.

    My suggestion: from your setting access the internal webserver at 192.168.33.1 and configure the Shelly EM to connect to your wifi. Internet & Security -> Wifi mode - client -> Connect the Shelly device to an existing WiFi Network. If you have a DHCP-server in your network (in home environments mostly active on your router), the shelly will get IP-settings assigned automatically. Otherwise you can specify a static IP and GW+DNS. Now check your DHCP server, what IP was assigned to the Shelly or use the manually assigned IP. From there you can update by using "http://<shelly IP>/ota?url=http://archive.smarthome-forum.eu/v1.11.7/SHEM_build.zip". No need to use the app or connect to shelly cloud.

  • Thank you for your explanation. Finally I was successful. I will sum my experience for other people.

    Currently, I have several Shelly EM devices and one Shelly 3EM one. And I need them in the place where no internet is available.

    I tried update fw on each single device.

    Zitat

    "http://192.168.33.1/ota?url=http:/…/SHEM_build.zip" only works, if you have internet connection.


    1. Ok, so I tried to establish an internet connection. Due to security reasons it was not feasible using my current connection (device HTTP, IP and MAC filters, subnets ...).

    I decided to use my very old WiFi router that I had in a drawer, set each device and my notebook as a its Client.

    Initially I failed because I did not know about "Enable AP Isolation" feature of the router. When I switched it OFF, the device could access Internet and could see my notebook. And the fw update succeeded.

    That method means that all the devices must be physically present where internet is available.

    Zitat

    2. I tried to update fw locally via the WiFi router (disconnected from internet).

    With "Enable AP Isolation = false" it worked (nb and devices as clients - same as in 1.).

    I only needed to enable a web server on my notebook and download the SHEM_build.zip file from Shelly to my nb.

    That method means that the WiFi router must be located where all the devices are.

    3. Because the devices can function as Access Point, I tried to replace the WiFi router with one of them.

    3a) One Shelly EM as AP, the rest as Clients. No way - devices cannot see each other.

    3b) Shelly 3EM as AP, Shelly EM devices and notebook as its Clients. Bingo - it works.

    Notebook connected to the Shelly 3EM, can see all the client devices, the devices can see the nb.

    That method means that the only notebook is needed at the place where all the devices are.

    Some problems I have met during my experiments:

    • WiFi cache must be sometimes cleared
    • Browser cache must be often cleared
    • Before changing device network configuration, I strongly recommend doing Factory reset. It solved many problems (probably something from a previous configuration is used even if the previous setting is disabled).
    • When the device mode is changed from AP to Client, it take longer time to get the change realized (slow communication between the device and AP). Until then, the device appears as AP in the WiFi neighborhood.
    • When updating firmware using 2. or 3. method, the JSON response was {"status":"updating","has_update":false,"new_version":"","old_version":"2021...-1.10"} even though the new firmware is accessible and the device is being updated. I have realized that I must connect to the device GUI, refresh it (clear a browser cache), then I can see the new fw version is installed.
    • When using 3b), the drawback is that after each power supply restart the clients have different IP addresses (no IP address lease table in 3 EM).