Updating the Gateway firmware to EMS-ESP V2

Latest update of this page: 16 September 2020 14:00.

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 1 September 2020 is V2.0.

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 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 4. If you do not have Windows 64 bit download a NodeMCU flash tool for other OS 5

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.

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 ESPTool or Platform I/O method. If that did not work or it is too difficult, contact me via the contact form on the webshop.