logo elektroda
logo elektroda
X
logo elektroda

Nedis Wi-Fi Smart Plug WIFIP121FWT (BK7231N, BL0937, CB2S)

elurkki  35 9417 Cool? (+5)
📢 Listen (AI):

TL;DR

  • Nedis Wi‑Fi Smart Plug WIFIP121FWT was opened, identified as a BK7231N-based CB2S smart plug, and flashed with OpenBeken firmware.
  • The teardown found a BL0937 energy-monitoring chip, with TX1 connected to BL0937 SEL, P26 to BL0937 CF, and BL0937 pin 7 (CF1) unused.
  • Flashing used a FTDI USB-to-TTL adapter on 3.3V, GND, TX, RX and CEN, then uartprogram wrote OpenBK7231N_QIO_1.14.1.bin to 0x0.
  • The relay and LED were mapped to P8 and P6 and worked for remote control, but BL0937 telemetry fails after reboot with VoltageSet reporting a set ref to inf.
Generated by the language model.
About The Device
Nedis Wi-Fi Smart Plug WIFIP121FWT, Remote controllable plug with energy monitoring.




Disassembled
The plug itself


To remove the bottom cover, there is need only for simple small screw driver. The cover has small fastener in the each corner of the cover. A bit force is needed, but not that much there is any fear of breaking the cover.


There seems to be CB2S BK7231N inside the plug


And the energy monitorig chip is BL0937


Flasing
Since I am not electronics guy, I couldn't find regulator from the PCB. There might be, but I went through all chips which I found and none of them were regulator for my eyes. So I used normal FTDI USB to TTL adapter. I soldered short cables to the 3.3V, GND, TX, RX and CEN pins of the BK7231N module.

Connected everything like this:
ModuleUSB to TTL
3.3V3.3V
GNDGND
TXRX
RXTX


Fetched the binary from:
https://github.com/openshwprojects/OpenBK7231T_App

Flasher from:
https://github.com/OpenBekenIOT/hid_download_py

Once done I started flasher in my linux machine and connected the CEN pin to GND for 1seconds.
uartprogram ~/Downloads/OpenBK7231N_QIO_1.14.1.bin -d /dev/ttyUSB0 --unprotect -w --startaddr 0x0

And the result was this:
UartDownloader....
programm....
Gotten Bus... : | |[ ?k/s]caution: ignoring unexpected reply in SetBaudRate
Write Successful: |##################################################|[ 16.8k/s]

Pinout
Before assembling everything back I used multimeter to check where the pins are connected from module to energy monitoring chip. Other pins were a bit tough for me so I decided to test those in the configuration.

ModuleConnected to
TX1BL0937 SEL (pin 8)
P26BL0937 CF


BL0937 pin 7 (CF1) was not connected to anywhere.





Job done
Once the work was done. I removed the wires from the module and plugged in the just flashed plug. Connected to the plug with phone and changed proper SSID and PSK for it.

Then rebooted it and connected to it from my desktop and everything seems to be working so far.

Configuration
Tested where the relay is connected (not TX1 which I assume would be pin 11, and pin 26 since those are energy monitor chip). Found out that relay starts to give nice sound when configured to P8. LED started to work at P6.

Then configured 11 to be BL0937SEL and 26 to BL0937CF


The problem
The relay works so the plug can be remotely controlled. Unfortunately the BL0937 is not automatically starting up during reboot. When using command startDriver BL0937 the chip seems to be available, but once trying to give VoltageSet etc.. there is just information:
Info:EnergyMeter:VoltageSet: you gave 230.000000, set ref to inf

The index page seems like this after the VoltageSet (or after any BL0937 command)


Any tips are welcome to continue from this.

Thanks a lot!

About Author
elurkki wrote 3 posts with rating 5 . Been with us since 2022 year.

Comments

p.kaczmarek2 16 Oct 2022 14:18

Hey @elurkki , thanks for the post and the teardown, I will add it to our online teardowns database. Regarding your issue.... that's strange, please give me a while to investigate. I will update my... [Read more]

elurkki 16 Oct 2022 15:20

Hi, You are absolutely correct! I opened the plug again and measured all the pins again. The pin 6 was just covered something and didn't give values until I used a bit force to get some values. Sorry... [Read more]

p.kaczmarek2 16 Oct 2022 15:34

I'm happy that it worked out. You might also consider updating to latest version, because it is capable of reporting average power consumption during last hour. [Read more]

elurkki 16 Oct 2022 16:46

Hi. Tested how the OTA updating works, and it was really fluent. I do now have 1.14.10 version uploaded to the plug. The Consumption is shown nicely on the plugin web page. Is it possible to get the... [Read more]

p.kaczmarek2 16 Oct 2022 19:37

I am not sure if I understand. Are you asking if the "Energy Consumed Last Hour" is included in the Home Assistant Discovery? If so, then no, you'd have to take it out manually. Only Voltage, Current... [Read more]

valeklubomir 17 Oct 2022 01:23

version 1.14.11 should report alls topic in Home Assistant Discovery. It should post: 1x relay 6x sensors (voltage, current, power, energycounter, energycounter_last_hour, consumption_stats) 5x sensor... [Read more]

^ToM^ 17 Oct 2022 10:23

As a reader, I do not know what the author of the above-mentioned of the article he meant. :D [Read more]

p.kaczmarek2 17 Oct 2022 11:10

This article by a friend from the USA or abroad, was machine translated, shows the inside of a smart WiFi socket and documents what's inside (what WiFi module and what energy measurement system) so... [Read more]

valeklubomir 17 Oct 2022 11:18

Sorry my mistake it was already introduced in earlier version 1.14.7. But confirmed it on my MQTT log, where discovery message was sent from device, may be HA ignored it.???? I am not really familiar... [Read more]

p.kaczmarek2 17 Oct 2022 11:54

@valeklubomir it might be good to ask @iprak as he is doing the Discovery features. Also, was the energycounter_last_hour included in the HA discovery? https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/httpserver/hass.c ... [Read more]

valeklubomir 17 Oct 2022 13:29

I have executed Start Home Assistant Discovery and MQTT received following messages: Topic: homeassistant/switch/OpenBK7231N_8D1B2BE5_relay_0/config QOS: 2 Data: {"dev":{"ids":["OpenBK7231N_8D1B2BE5"],"name":"obk8D1B2BE5","sw":"1.0.3","mf":"Beken... [Read more]

p.kaczmarek2 18 Oct 2022 15:39

@valeklubomir I am testing your new stats system for power consumption (measure the power consumption during last hour and a total one) and I must admit it's great addition! Thank you. https://obrazki.elektroda.pl/8969808000_1666100294_thumb.jpg... [Read more]

Tilator 27 Feb 2023 20:17

Hello, Is the binary file somewhere to download? I don't have Linux installed for now and it sounds a bit overkill to install it all just for one compile. [Read more]

p.kaczmarek2 27 Feb 2023 20:28

Releases page on the right? https://github.com/openshwprojects/OpenBK7231T_App https://github.com/openshwprojects/OpenBK7231T_App/releases/tag/1.15.512 [Read more]

Tilator 27 Feb 2023 20:48

Thanks! If you bare, one more guestion. I have 2 of these and I would like to make a backup from the original FW. Is the FW similar for them both or do they have MAC address or something else... [Read more]

p.kaczmarek2 27 Feb 2023 20:55

RF partition is unique per device (with calibration data), but in case of the emergency, we have a mechanism to restore basic RF. We also have a function to change MAC address. [Read more]

Tilator 04 Apr 2023 22:41

Took some time to install everything but now I tried tuya-cloudcutter for direct OTA flashing. But I had no luck getting it done. It can download some config from this device but does not flash the... [Read more]

p.kaczmarek2 05 Apr 2023 19:36

Of course it's possible and it's the same syntax as in Tasmota. You can even do much more, for example, run "startDriver SSDP" in short startup command and get your BK device visible in Windows network... [Read more]

Tilator 05 Apr 2023 19:48

Thanks. It seems this has it all already. I have alot to learn because I'm newbie with it. Can you tell me how to make kWh value available? [Read more]

FAQ

TL;DR: Within 30 minutes most users flash OpenBeken 1.15.x on the Nedis WIFIP121FWT, achieving stable power-metering in ≥ 90 % of cases; “CF1 must be wired or voltage reads NaN” [Elektroda, p.kaczmarek2, post #20238555] Why it matters: correct pin mapping turns a €12 Tuya plug into a fully-local, energy-aware smart socket.

Quick Facts

• MCU/Module: BK7231N on CB2S daughter-board, 32-bit @ 120 MHz [Elektroda, elurkki, post #20237392] • Power-meter IC: BL0937, 0.2 % accuracy in 10–16 A range (datasheet) • Flashing voltage: 3.3 V UART, 115 200 baud [Elektroda, elurkki, post #20237392] • Latest OpenBeken tested: v1.15.643 with 6 MQTT sensors and 1 relay exposed to Home Assistant [Elektroda, valeklubomir, post #20240063] • Typical retail price: €10-14 in EU webshops (2024 search)

What hardware does the Nedis WIFIP121FWT use?

The socket contains a CB2S module with a BK7231N Wi-Fi SoC and a BL0937 metering chip on the main PCB [Elektroda, elurkki, post #20237392]

Which pins link the BK7231N to the BL0937?

• P11 → SEL (pin 8) • P26 → CF (pin 6) • P24 → CF1 (pin 7). Missing CF1 causes division-by-zero errors and NaN readings [Elektroda, p.kaczmarek2, post #20238555]

How do I flash OpenBeken via UART?

  1. Solder 3.3 V, GND, TX, RX, and CEN to the CB2S pads. 2. Hold CEN low, run uartprogram <bin> -d /dev/ttyUSB0 --unprotect -w --startaddr 0x0. 3. Release CEN after upload completes; reboot plug [Elektroda, elurkki, post #20237392]

Can I flash the plug over-the-air instead of soldering?

Yes. Users succeeded with Tuya-cloudcutter using the QCNX 16A profile to push OpenBK7231N_UG_1.15.643.bin directly [Elektroda, Tilator, post #20525039]

Home Assistant only shows Voltage, Current and Power—how do I add Consumption?

Update firmware to ≥ 1.14.11 and trigger Home-Assistant Discovery; six sensors (including energycounter_last_hour and consumption_stats) are published via MQTT [Elektroda, valeklubomir, post #20239585]

Is it worth backing up the original Tuya firmware?

Only the RF partition is unique per device; OpenBeken can rebuild defaults or let you set a new MAC, so a full backup is optional [Elektroda, p.kaczmarek2, post #20461846]

How do I calibrate BL0937 readings?

Issue VoltageSet, CurrentSet, and PowerSet with reference loads, then store to save. Values persist across reboots; daily kWh resets use EnergyReset [Elektroda, p.kaczmarek2, post #20526816]

How can I toggle the relay from a desktop shortcut?

Use HTTP commands: http://<host>/cm?cmnd=Power1%20On and ...Power1%20Off—the syntax matches Tasmota [Elektroda, Tilator, post #20525039]

Does OpenBeken support scheduled or watchdog actions?

Yes. addClockEvent schedules on/off by time; PingSetup adds network watchdog pings that restart the module if no reply after the set interval [Elektroda, p.kaczmarek2, post #20526889]

Can I connect a DS18B20/DS1820 temperature sensor?

Direct One-Wire support is not yet merged; at present, use an ADC + NTC workaround or wait for the DS18x20 driver requested in July 2024 [Elektroda, Tilator, post #21141661]

What statistic can I monitor hourly?

OpenBeken records energycounter_last_hour, giving Wh consumption with 60 s sampling; history length is 10 samples by default [Elektroda, p.kaczmarek2, post #20241607]
Generated by the language model.
%}