How to flash a custom firmware on a NEO Coolcam WiFi plug without soldering


In this post I will show how I flashed a custom firmware on a NEO Coolcam smart WiFi plug. No soldering is required, and the plug will not be damaged since a complete disassembly is not required.

Danger badge

⚠️⚡ DANGER! ⚡⚠️ The WiFi plug MUST be disconnected from the AC mains the whole time (230V AC or 110V AC).
The plug should never be connected to the mains at any time until the procedure is finished and the plug has been reassembled back as it came out of the box!

The plug

I tried a couple of WiFi smart plugs before I discovered the NEO Coolcam plugs. I chose this particular plug for several reasons:

  • It’s small: wherever you can fit a standard EU plug, you can most likely also fit a NEO Coolcam
  • It’s powerful: up to 16A of current or 3.68 kW of power
  • Has power monitoring: it’s not very advanced, but it works well enough for my use
  • It’s cheap: at the time of writing, you can get one for less than 10$, which is less than many other models that come without power monitoring

The problem

I want my smart devices to work with Home Assistant without relying on a proprietary cloud service or any service located outside my local network. One strategy to achieve that is to replace the firmware of the smart device with a custom one like ESPHome, if supported.

In many cases, physical access to the internal microcontroller (an ESP8266 in this case) is required to flash the new firmware. A USB to serial adapter, aka USB-TTL UART adapter, can be used to transfer the firmware from a PC to the microcontroller on the smart plug. The serial adapter connects to the smart plug via four wires:

  • GND, 3V3 (or 3.3V): to power the microcontroller
  • RXD, TXD: to transfer the data

The NEO Coolcam plug comes with test points that can be used to solder or connect the four wires to the plug. However, these test points are not very accessible. The plug needs to be taken apart entirely, and while doing so, there is a high risk of damaging the tactile push-button, the Wi-Fi antenna, or other parts.

But no worries! Below I will describe an alternative procedure that will not require soldering or disassemble the plug’s critical components.

Disassembling and cable setup

Starting from a brand-new plug, the only part that needs to be disassembled is the top plastic cap. This is done by unscrewing a single screw under the sticker. The sticker will peel off without damage if it is warmed with a lamp or hot air. It can then be re-applied at the end of the procedure.

Plug with its sticker lifted
Fig. 1 - The sticker can be removed without damage if it is warmed with hot air or a lamp.

When the screw is off, the cap can be gently detached by hand or with a small screwdriver (Fig. 2).

Plug with its cap lifted
Fig. 2 - The top cap must come off; it's the only part that will be disassembled.

The PCB is now visible, and the ESP8266 microcontroller is the square chip on the top, near the antenna cable (Fig. 4).

Info badge

📸 Tip! To take magnified pictures of the PCB and check progress, a smartphone camera's macro function can come in handy.
Alternatively, it is usually possible to set the camera's focal length to minimum and move the camera closer to the PCB until the picture is sharp and in focus.

In Fig. 3, the pins needed to transfer the new firmware are highlighted. In addition, the GND and 3V3 connections are also required.

ESP8266 microcontroller with highlighted RXD and TXD pins
Fig. 3 - The ESP8266 microcontroller and its pins TXD and RXD.

Poking all the pins directly on the ESP8266 simultaneously is almost impossible, so the trick is to check where else on the PCB those pins are accessible. Testing for continuity with a multimeter will reveal multiple options. I picked the connection points listed below to keep the flashing procedure as easy as possible. Each section refers to one of the four pins as labeled on the USB-serial adapter.

  • Ground PIN (GND) – The wire can be connected to the right side main contact of the plug. While pinned there, it won’t move too much (Fig. 4).

  • 3.3V PIN (3V3) – There are a few points on the PCB to access the 3V3 rail. I picked the left side of the two capacitors lying below the chip on the right side of the screw hole. I used one of the multimeter’s probes instead of a wire; balancing the probe in place was enough to maintain contact (Fig. 4).

Plug PCB with connections to GND and 3V3
Fig. 4 - Connections to GND and 3V3.
  • TXD – The TXD pin of the USB-serial adapter must be connected to the RXD pin of the ESP8266 (Fig. 2). I used the pin directly attached to the ESP8266 (Fig. 5). Extending the wire with a paperclip, or something similar, will make it easier to keep the electrical connection in place while holding the wire.
Paperclip connections to RXD pin
Fig. 5 - Connection to the RXD pin of the microcontroller using a paperclip.
  • RXD – The RXD pin of the USB-serial adapter must be connected to the TXD pin of the ESP8266 (Fig. 3). It is quite difficult to pinch the TXD pin directly on the ESP8266 while doing the same for the RXD pin. Instead, I followed the PCB track starting from the TXD pin, and I discovered that it is routed through a VIA, not far from the corner of the microcontroller (Fig. 6).
TXD track and via highlighted on PCB
Fig. 6 - The TXD pin track and the via.

Since the VIA is round, more accessible and bigger than the track (or the pin), it makes for a better connection point. To access the via the solder mask that protects the PCB must be scraped away. I used a very small screwdriver with a sharp point; the surface layer of solder mask must be gently peeled away to reveal the copper below (Fig. 7).

TXD VIA with exposed copper
Fig. 7 - Appearance of the TXD VIA after the solder mask has been removed: the copper is exposed.

I took my time doing this and frequently checked if I was scratching in the right spot and if any copper was visible. Once done, it is possible to connect using a paperclip attached to the wire, as done for the RXD pin (Fig. 8).

Paperclip connections to TXD VIA
Fig. 8 - Connection to the TXD VIA using a paperclip.

Flashing with ESPHome

The ESP8266 can only be flashed with a new firmware when it’s in Download mode. This mode can be activated by pressing the smart plug button before applying tension to the microcontroller via the 3V3 and GND connections. Essentially the microcontroller should boot while the button is being pushed. If the button starts blinking red, it means that the plug is not in download mode, 3V3 or GND must be disconnected to retry.

I used esphome-flasher to flash the new firmware, but it is probably possible to achieve the same result using the ESPHome web-based flash utility with Google Chrome or Microsoft Edge.

Success checkmark

🤔 Ok, ok.. I agree it's a pretty wonky and unstable setup; cables can move, your hands might slip, and you can lose electrical connection while flashing. But no worries! If that happens, you can try again as many times as you need until you'll succeed. The whole flashing procedure only lasts a minute or less.

Once finished transferring the new firmware, I left the 3V3 and GND cables connected, and double-checked that I had access to the smart plug by visiting its IP address using a browser (if using the internal web server) or via Home Assistant (if using the APIs). If the plug is reachable, it’s then safe to disconnect all the cables and reassemble the plug cap.

Any subsequent update to the firmware can be performed over the air, so this flashing procedure should only be performed once.