I bought this smart plug for very cheap in a big chinese online warehouse.
I disassembled it and figures out it has a BK7231N / CB2S chip. And a BL0937 for energy measurement.
I tried to commuincate with the CB2S still in place. But it turned out that the switch and some stuff interfered with the RX path. I didn't want to cut any path so i desoldered the whole CB2S. Flashed it seperately. And but everything back together.
I flashed the version 1.17.493 with Easy UART Flasher.
I also dumped the orignial firmware.
Here is the extracted config from the original firmware
{
"sel_pin_pin":"24",
"rl1_lv":"1",
"bt1_pin":"10",
"net_trig":"2",
"jv":"1.0.5",
"netled1_lv":"0",
"netled_reuse":"1",
"bt1_type":"0",
"ffc_select":"0",
"vi_pin":"6",
"resistor":"1",
"over_cur":"17000",
"bt1_lv":"0",
"reset_t":"3",
"netled1_pin":"8",
"chip_type":"0",
"lose_vol":"80",
"over_vol":"280",
"module":"CB2S",
"ele_pin":"7",
"ch_cddpid1":"9",
"ch1_stat":"2",
"rl1_type":"0",
"ch_num":"1",
"ele_fun_en":"1",
"rl1_pin":"26",
"vol_def":"0",
"ch_dpid1":"1",
"sel_pin_lv":"1",
"crc":"7",
"bv":"40.00",
"pv":"2.2",
"lpv":"3.4",
"pk":"keyjup78v54myhan",
"firmk":"keyjup78v54myhan",
"cadv":"05",
"cdv":"1.0.0",
"dev_swv":"1.1.17",
"s_id":"null",
"dtp":"0",
"sync":"0",
"attr_num":"1",
"mst_tp_0":"9",
"mst_ver_0":"1.1.17",
"mst_tp_1":"0",
"mst_ver_1":"null",
"mst_md5_1":"null",
"mst_tp_2":"0",
"mst_ver_2":"null",
"mst_md5_2":"null",
"mst_tp_3":"0",
"mst_ver_3":"nul0abi",
"id":"bf847d9d9bcc6ef2ed0l2q",
"swv":"1.1.17",
"mtruer_0":"1.0.5",
"mst_md5_0":"febf39e119105090f91b2184eeda92cb",
"mst_md5_3":"null }de",
"property":"{min",
"max":"86400",
"scale":"0",
"step":"1",
"type":"value}"
}Device configuration, as extracted from Tuya:
- BL0937 SEL on P24
- Button (channel 1) on P10
- BL0937 VI on P6
- WiFi LED on P8
- BL0937 ELE on P7
- Relay (channel 1) on P26
Device seems to be using CB2S module, which is using BK7231N.
And the Tuya section starts, as usual, at 2023424I already setup OpenBeken to connect to my local wifi network and i was able to load the driver for the BL0937. Calibration for Voltage was no problem. I am not sure how to calibrate current and power without electrocuting myself
I ordered 3 more plugs from the chinese web warehouse for a total of 10€ ... I hope they are flashable too.
Webapp JSON
{
"vendor": "Tuya",
"bDetailed": "0",
"name": "Wifi Smart Plug with Energy Measurement",
"model": "RMC021",
"chip": "BK7231N",
"board": "CB2S",
"flags": "1024",
"keywords": [
"power metering",
"smart plug",
"bl0937"
],
"pins": {
"6": "BL0937CF1;0",
"7": "BL0937CF;0",
"8": "WifiLED_n;0",
"10": "Btn;1",
"24": "BL0937SEL;0",
"26": "Rel;1"
},
"command": "",
"image": "https://obrazki.elektroda.pl/4143902500_1709667653.webp",
"wiki": "https://www.elektroda.com/rtvforum/topic4040624.html"
}