Updating the Gateway firmware to EMS-ESP V2

The information below is ONLY for OLD Gateways with an old 1.9.5 or lower firmware.

The Gateway as delivered to you is loaded with a recent stable version of the open-source firmware from Proddy’s Github repository 1. The current stable version since December 2020 is V2.2.

If your Gateway is running on V2.0 or higher, use the web interface to update. If your Gateway is running on V1.9.5 or lower, follow the update procedure below.

Warning

Incorrectly upgrading to V2 via the webinterface of V1.9.5 might brick the Gateway! Follow the steps below very carefully. In some cases the update will still fail. If so, try flashing with the NodeMCU flash tool. If that did not work as well send me an email via the webshop.

Note

To upgrade to V2 you need to make sure the current firmware is V1.9.5. If are running on older firmware, first update to V1.9.5.

To upgrade to V2 first go to the firmware releases page 2.

You can select the latest stable release or one of the newer pre-releases (beta firmware). If unsure, just select the newest stable V2.0 release.

Now click on the ‘assets’ button. A number of files will appear. As the old Gateways are based on the ESP8266, you need to select the ESP8266 bin file.

Firmware selection

Warning

If you upload the ESP32 bin file you will brick the Gateway and you need to use Platform I/O or the ESPTool to install the correct firmware again.

If you click on the 8266 bin file, it will be downloaded to your pc. Now take note where this file is stored.

Updating the firmware via the web interface

Go back to the web interface of the Gateway and browse to the Update firmware page.

Firmware selection in 1.9.5

DO NOT click on ‘Download’ here but click on ‘Browse’ instead and select the V2 firmware bin file you just downloaded from the repository. Upload the file and wait for a minute or two and do not close the page in the mean time.

When the upload was successful, the LED of the Gateway will start blinking meaning it is in access point mode. If there is no LED, something went wrong. If the LED is on but does not blink you are still on 1.9.5. If the update went wrong try flashing the firmware via the NodeMCU flashtool. See below.

Settings from 1.9.5 might not always migrate to V2 so you may have to set it up again as new. See HERE.

After the update Serial mode is gone and also the MQTT topic base has changed to just ems-esp/. So please update Domoticz, HA, NodeRed etc.

Uploading the firmware via NodeMCU flashtool

First remove the Wemos from the Gateway and connect it via USB to a pc.

Then download the NodeMCU flash tool 5. If you do not have Windows 64 bit download a NodeMCU flash tool for other OS 6

Download the correct bin file as described above.

Now open the NodeMCU flash tool.

Firmware flash tool

Set the correct COM port for the Wemos. If you do not know it find it with Device Manager. Sometimes there is no driver installed. For the driver look online for the CH340 driver.

Now go to the ‘Config’ tab.

Select in the first row the bin file you downloaded. Do not change anything else.

Firmware flash tool file selection

Leave everything else at the default settings.

Now press ‘Flash’. The program will now upload the firmware to the Wemos. If its ready, it will say ‘Ready’ at the bottom right.

If the Wemos does not start blinking, press the reset button. It should first start blinking fast and after a few seconds it should start blinking slowly. Connect to the ems-esp network and go to 192.168.4.1 to access the web interface. If this works the Wemos is flashed with V2 succesfully and you can now place it back in the Gateway.

Uploading the firmware via ESPTool or Platform I/O

Aside from the web interface there is another method to upload the bin file to the ESP directly. Use the instructions from uploading the firmware 3 to upload the bin file.

Note

Settings from 1.9.5 might not always migrate to V2 so you may have to set it up again as new. See HERE.

After the update Serial mode is gone and also the MQTT topic base has changed to just ems-esp/. So please update Domoticz, HA, NodeRed etc.

Troubleshooting

If the LED does not blink at all, press the reset button on the Wemos. It should start blinking slowly. If it does not, the update failed.

If the update to V2 via the web interface has failed, try the NodeMCU flash tool, ESPTool 4 or Platform I/O method. If that did not work or it is too difficult, contact me via the contact form on the webshop.

1

https://github.com/proddy/EMS-ESP

2

https://github.com/proddy/EMS-ESP/releases

3

https://github.com/proddy/EMS-ESP#uploading-the-firmware

4

https://github.com/espressif/esptool

5

https://github.com/nodemcu/nodemcu-flasher/blob/master/Win64/Release/ESP8266Flasher.exe

6

https://github.com/nodemcu/nodemcu-flasher