Small teardown of SP400W-IL plug with power metering, it uses WB2S with BL0942 to monitor power, the device is pretty neat with a good plastic, I should also mention that it heats up a little bit during operation, to open it you should unscrew the 3 screws at the bottom, bought it from here
Flashing:
Unfortunately there are no labeled holes, so you need to solder pins directly to WB2S, there is scheme:
You should solder to these pins:
Like this:
Flashing and config:
Use baud rate of 115200, GPIO table:
Extracted tuya`s GPIO dump:
To enable power monitoring add "startDriver BL0942" to startup commands:
My config:
It uses 1 channel, by pressing button you toggle relay and led like in stock tuya flash, to enable 'last power state' you should set '-1' to your main channel in startup config:
Then you can enable MQTT to use it in HA, you can also set my recommended flags:
Flag 2
Flag 7
Flag 10
As a result, the main menu will look something like this:





Flashing:
Unfortunately there are no labeled holes, so you need to solder pins directly to WB2S, there is scheme:

You should solder to these pins:

Like this:

Flashing and config:
Use baud rate of 115200, GPIO table:
Pin | Role |
6 | LED |
7 | Btn |
26 | Rel |
Extracted tuya`s GPIO dump:
Device configuration, as extracted from Tuya:
- Button (channel 1) on P7
- WiFi LED on P6
- Relay (channel 1) on P26
Device seems to be using WB2S module, which is using BK7231T.
And the Tuya section starts at UNCOMMON POSITION 0
To enable power monitoring add "startDriver BL0942" to startup commands:

My config:
Code: JSON
It uses 1 channel, by pressing button you toggle relay and led like in stock tuya flash, to enable 'last power state' you should set '-1' to your main channel in startup config:

Then you can enable MQTT to use it in HA, you can also set my recommended flags:
Flag 2
Flag 7
Flag 10
As a result, the main menu will look something like this:
