Brilliant Smart WiFi plug

These smart plugs are a readily available, low-cost, and non-invasive home automation solution. Some models also have power monitoring.

This module can be purchased from the likes of PB Tech but its stock firmware does not have an open API that allows for access to the energy data.

To access the full potential of the unit the firmware needs to be upgraded. A good open-source firmware for IoT devices is Tasmota, which has an HTTP and MQTT interface for externals apps and automation setups. See below for more details on programming and setup.


Teardown & reprogramming


These units use mains power which can have deadly consequences! Only continue if you have past electronics experience and at least medium ability.

Never plug the unit into mains power with the case open or plugged into a low power interface!










MCU interfacing schematic

This smart plug is very similar to this one, and the programming is the same as they use the same microcontrollers. They use an ESP8285 (basically the same as ESP8266) with 1mb flash on-chip memory in a TYW2S module. 

Open the plastic case by carefully hitting and working around the sides of the shell around the opening side with a plastic-ended hammer. This should break the glue, not the shell if done correctly.

Once the shell is opened, remove the circuit board and solder on jumper wires onto the TX, RX, GND & +3.3V solder pads on the underside of the circuit board (see diagram “TYWE2S Module solder-pads pinout“). A jumper wire will also need to be soldered to “IO0” on the back of the TYW2S module.

This tutorial below can be followed to program the smart plugs with Tasmota firmware—LA-WF3-Wifi-Plug/


TYWE25 module

TYWE25 module

TYWE25 Module solder-pads pinout

TYWE25 Module solder-pads pinout



Tasmota interface

The Tasmota interface can be accessed via any web browser using the device’s IP address.

Calibration settings:

The calibration settings can be preset in the console by inputting the following.

PowerCal 9368

VoltageCal 58436

CurrentCal 85


This template string can be input via. the UI template interface and will set up the device pins correctly for the hardware.


Node-Red interface

It is possible to extract device information from the MQTT / HTTP interface. Below is an example of a real-time power monitor with Node-Red and MQTT:

Flow Chart Dashboard

Node-Red example code

This code has two methods of sorting the input data.

The first uses a function to extract the variables from a single JSON object.
The second used a switch statement to send outputs depending on their MQTT topic. This could also be done in a function if needed.

Download the example flow here (right-click and save as). Use the import function in Node-Red to add it to your server.


Typical Hardware Schematic

New hardware

New devices seem to be using a lower-cost MCU from Beken and usually for the Tuya platforms such as Smart life.

These devices can still be re-programmed to run with MQTT etc thanks to this repo. Download its programmer and follow their instruction to program these new devices. They have also created a list of teardowns and instructions for a large range of devices here, which makes things a lot easier if you can find the same device. Use your browser’s search function to reduce your scrolling.

Research links


7 thoughts on “Brilliant Smart WiFi plug

  1. Hi, thanks for this write up.

    I’ve recently bought one of these and am having a weird issue, wanted to see if perhaps you might be able to help.

    I’ve flashed my unit using tuya-convert and am currently on tasmota firmware version 11.1.0.
    I’ve setup the device using the same template you you’ve linked in the post.

    My issue is, whenever I plug any device in (large load or small) it powers up for about 2 seconds and then powers off. The state of the plug is still ‘on’ from Tasmota’s perspective except current isn’t being provided to the load. I.e. Tasmota UI says on, device LED indicator is still lit, indicating on but the load isn’t powered.

    Any assistance would be greatly appreciated!


  2. Hi there, have you got any tips in pulling these apart?

    I had loads of trouble taking the casing off and only managed to after applying heat – not sure if that just made the plastic softer or if there is some small dried glue? Can’t see any clips or retention points.

    I’m now trying to get the final plastic casing off (with the writing) so I can get to the pins of the control board to swap it out for a Tasmota-compatible one since the ones I’ve got aren’t. Same thing with this I guess? Looks to be mighty stuck around the round area by the GPO pins.


    • Hay, usually for these glued plastic cases a couple of love taps with a plastic hammer all the way around the joint works to break the glue. Then you just need to carefully go in with a plastic spudger or pry tool.

    • Looks like the GPO pins are directly soldered to the PCB and moulded into the white plastic. I can’t see a way to get to the reverse of the PCB other than unsoldering the GPO pin connections to break the link to the moulded bit. Looks to be a different model than shown in the tear down pictures where the GPO pins were clipped into the housing.

  3. Hi,
    Appreciate the in-depth write up.
    Is there any possibility of providing the JSON of the example Node Red flow?


    • Hi,
      Sorry, we don’t have that device anymore and don’t have a copy of the flow.
      But the general syntax for the function can be found here. Below is also an example of a function:

      var p_Total = { payload: msg.ENERGY.Total };
      return p_Total;

Leave a Reply

Your email address will not be published. Required fields are marked *