logo elektroda
logo elektroda
X
logo elektroda

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

elurkki 
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]

%}