Upgrade an ESP8266 Gateway with an ESP32

Ever since the release of EMS-ESP V2 the firmware supports the ESP32 chip. New Gateways based on the ESP32 are available now in the webshop. It’s possible to update your ESP8266 Gateway to make use of the advantages of the more powerful ESP32.

There is one drop-in replacement available for the Wemos D1 Mini: the MH-ET Live ESP32 D1 Mini.

EMS Gateways with ESP8266 and ESP32

Compatible Gateways: All ESP8266 Gateway models: First edition, Regular, Standard, Premium, Premium II.

This upgrade also comes with it’s downsides:

  • It’s no longer possible to power the Gateway from the bus itself. You need to use the jack or an external USB adapter.

  • The ESP32 replacement is bigger than the Wemos D1 Mini, so the side piece won’t fit anymore (or you have to cut it in two).

  • You have to modify the enclosure otherwise the top cover won’t fit anymore.

  • The LED is on a different position so it does not align anymore with the hole in the lid (but you can still see it though).

Steps to upgrade to the drop-in replacement

Get the right board

Get an MH-ET Live ESP32 D1 Mini or one of the clones. You can buy one yourself online like for instance on AliExpress 1 or get a soldered and programmed one from my webshop.

Solder on the headers

Solder on the 8-pin male headers on only the inner position like below.

MH-ET board headers 1 MH-ET board headers 2

Load the EMS-ESP firmware

Now you need to upload the correct EMS-ESP firmware to the chip. Use an ESP32 firmware version. You can use the NodeMCU method or build the firmware via Platform IO. See HERE.

When you load the ESP32 firmware it’s preconfigured for the MH-ET version.


You need to take a note of your EMS-ESP settings. Although you can create a backup of your configuration settings, you should not load this file onto another type of Gateway, as it will screw up several settings and possibly make the Gateway unresponsive.

Modify the enclosure

The ESP32 board is to wide for the lid of the enclosure of the Gateway. You need to cut off a part or the whole of the screw bushings on the side of the JST/USB connector. Also trim off the edge of the enclosure. See below.

The lid only fits in one orientation on the bottom so make sure you are cutting the right side! You need to cut the side where the LED hole is.

Enclosure lid trim

You also have to leave out the plastic side because the board will stick out. You can trim the side piece as well and then it will fit too.

If you did it properly the lid will fit again and it looks like below;

MH-ET board in Gateway

Putting it all together

  • If you can use the service jack you can continue to reconnecting to the bus. You do not need to use a USB adapter.

  • Otherwise remove the jumper from the Gateway board. By removing the jumper you are disabling the green voltage converter. If you have a board without a jumper, you need to remove the green voltage converter.

  • Connect a USB cable and adapter to the ESP board.

  • Reconnect the bus.

  • Log in to the web interface of the Gateway and reconfigure it to your situation.

Pinout MH-ET Live D1 board

Although EMS-ESP for the is preconfigured for the MH-ET board, these are the correct GPIO settings in case you might need it:


Wemos D1 Mini






GPIO13 (D7)



GPIO15 (D8)


Dallas (DS18B20)

GPIO14 (D5)





Other replacements

In general you can use all ESP32 development boards. But none will fit inside the Gateway enclosure. But almost all will work with the Gateway circuit board! Remove the Wemos and use Dupont wires to connect your ESP32 board of choice to the pins on the header of the Wemos on the Gateway board.

You cannot use bus power anymore. Use either the jack if it’s available or use an USB adapter to power your ESP32 board. If you can use jack power then you can still use the green voltage regulator to power your ESP32 board. Do not draw more than 200mA of current!

If you cannot use the jack remove the jumper from the Gateway board. If you have a board without a jumper, you need to remove the green voltage converter.

Position your Gateway like below:

gateway Premium II internals

The pins are numbered from left to right.

Pin number

Top Wemos header

Bottom Wemos header


Not in use

Reset (via the on-board switch)


Not in use

A0 (Not in use)


Not in use

D0 (Not in use)


Not in use

D5 -> Dallas sensor input


Not in use

D6 (Not in use)


Not in use






5V INPUT to ESP32 from Gateway board

3,3V OUTPUT from ESP32 to Gateway board