So it's a different model? Or how do you configure it? Do you set Toggle and map dpID in the autoexec.bat?
Helpful post? Buy me a coffee.
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamlubopetrov wrote:Here is my device id: bfe887d3d3b94ffed6snhu
lubopetrov wrote:the toggle is not functional.
{
"id": 16,
"mode": "rw",
"name": "断路器开关 (Breaker Switch)",
"desc": "",
"desc_en": "",
"property": { "type": "bool" }
},
// Start TuyaMCU driver
startDriver TuyaMCU
// set TuyaMCU baud rate
//tuyaMcu_setBaudRate 115200
// set TuyaMCU default wifi state 0x04, which means "paired",
// because some TuyaMCU MCUs will not report all data
// unless they think they are connected to cloud
tuyaMcu_defWiFiState 4
setChannelType 1 ReadOnly
setChannelType 2 toggle
// linkTuyaMCUOutputToChannel dpId verType tgChannel
linkTuyaMCUOutputToChannel 16 bool 2
// set voltage, current ,power channel types
setChannelType 3 Voltage_div10
setChannelType 4 Current_div1000
setChannelType 5 Power
// map dpID 6, which is VCP format, to first voltage, then current, then power (3, 4, 5)
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3
// map dpID 1, which is energy, to channel 1
linkTuyaMCUOutputToChannel 1 val 1
lubopetrov wrote:Even when I press the physical button on the device the UI button "Toggle" switches colors red/green.
[
{
"id": 109,
"type": 3,
"data": "AAAA"
},
{
"id": 106,
"type": 3,
"data": "EwAAAAAAAAAAAA=="
},
{
"id": 105,
"type": 2,
"data": 0
},
{
"id": 12,
"type": 1,
"data": 0
},
{
"id": 13,
"type": 2,
"data": 0
},
{
"id": 11,
"type": 1,
"data": 0
},
{
"id": 9,
"type": 5,
"data": "00"
},
{
"id": 111,
"type": 4,
"data": 1
},
{
"id": 104,
"type": 1,
"data": 1
},
{
"id": 102,
"type": 2,
"data": 5
},
{
"id": 107,
"type": 2,
"data": 10
},
{
"id": 18,
"type": 0,
"data": "01010276"
},
{
"id": 1,
"type": 2,
"data": 25
},
{
"id": 6,
"type": 206,
"data": "092C00018A00005E"
},
{
"id": 16,
"type": 1,
"data": 1
}
]
addRepeatingEvent 10 -1 tuyaMcu_sendQueryState
p.kaczmarek2 wrote:
2. You can specify offset while mapping dpIDs.
https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
![]()
Use 0 for dpCache, 1 for mult, 0 for bInverse, then specify deltas.
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3
setChannelType 3 Voltage_div10
setChannelType 4 Current_div1000
setChannelType 5 Power
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0 50 100 150
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0 50
// Start TuyaMCU driver
startDriver TuyaMCU
// set TuyaMCU baud rate
//tuyaMcu_setBaudRate 115200
// set TuyaMCU default wifi state 0x04, which means "paired",
// because some TuyaMCU MCUs will not report all data
// unless they think they are connected to cloud
tuyaMcu_defWiFiState 4
setChannelType 1 EnergyTotal_kWh_div100
setChannelType 2 toggle
// linkTuyaMCUOutputToChannel dpId verType tgChannel
linkTuyaMCUOutputToChannel 16 bool 2
// set voltage, current ,power channel types
setChannelType 3 Voltage_div10
setChannelType 4 Current_div1000
setChannelType 5 Power
// map dpID 6, which is VCP format, to first voltage, then current, then power (3, 4, 5)
linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0 50
// map dpID 1, which is energy, to channel 1
linkTuyaMCUOutputToChannel 1 val 1
TL;DR: With 8-byte dpID 6 metering data and dpID 16 switch control, this breaker works once you configure TuyaMCU mapping after flashing. As one expert put it, "It will not work without this step." This FAQ is for Home Assistant and MQTT users who flashed OpenBK7231 but still lack ON/OFF control or power readings. [#21561187]
Why it matters: Flashing alone is not enough on this Dewin breaker; the usable result comes from correct TuyaMCU setup, dpID mapping, and current firmware.
| Method | Result on this breaker | Best use |
|---|---|---|
| Template import | Failed with “no meaningful pins data found” | Not suitable here |
TuyaMCU mapping in autoexec.bat |
Working toggle, voltage, current, power, energy | Correct approach |
| BL0942 driver | Wrong method here and may cause problems | Avoid for this model |
Key insight: This Dewin RMDT-1PNL 63 is a TuyaMCU breaker, not a simple direct-GPIO device. Map dpID 16 for the relay and dpID 6 for the 8-byte V/C/P packet, and the MQTT entities appear correctly. [#21574681]
EnergyTotal_kWh_div100 matched the thread’s final setup. [#21589864]autoexec.bat. 2. Map dpID 16 as the toggle. 3. Map dpID 6 as RAW_V2C3P3 to channels 3, 4, and 5, then expose MQTT or HASS discovery. The working thread config used channel 2 as toggle, channel 3 as Voltage_div10, channel 4 as Current_div1000, and channel 5 as Power. Flashing alone only showed general info, not relay or metering entities. [#21574681]55 AA 03 07 ..., which confirmed serial communication with the MCU. [#21566792]autoexec.bat, then confirm heartbeats and state replies in the log. Use this 3-step check: 1. Add startDriver TuyaMCU and tuyaMcu_defWiFiState 4. 2. If needed, set the baud rate; this thread tested 9600. 3. Run tuyaMcu_sendQueryState and look for heartbeat packets and parsed states. The thread later showed valid replies, including heartbeat cmd 0 and multiple parsed dpIDs, which proved communication was working. [#21572159]cm?cmnd=DP. First enable flag 46, or optionally flag 47 for more data, then run tuyaMcu_sendQueryState, and open a URL like http://DEVICE_IP/cm?cmnd=DP. Flag 46 stores the last seen dpID values so OpenBeken can present them as JSON. That JSON is what you use to confirm whether ids like 1, 6, 16, 102, and 107 are arriving. [#21572288]setChannelType 2 toggle, linkTuyaMCUOutputToChannel 16 bool 2, setChannelType 3 Voltage_div10, setChannelType 4 Current_div1000, setChannelType 5 Power, and linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3. That made the UI toggle work and exposed volts, amps, and watts. One expert summary from the thread was simple: “set voltage, current, power channel types,” then map dpID 6 to 3, 4, and 5. [#21574681]RAW_V2C3P3 means the 8-byte payload is split into 2 bytes voltage, 3 bytes current, and 3 bytes power. In this breaker, the format was decoded as big-endian with voltage in 0.1 V, current in 0.001 A, and active power in 0.0001 kW. For example, the packet 09 26 00 00 33 00 00 0E was interpreted as about 234.2 V, 0.051 A, and about 14 W, which matched a small LED bulb. [#21580392]autoexec.bat; you also had to open the Web App and change that channel type back to default from the dropdown. That removes the leftover button from the UI. [#21574681]setChannelType 1 EnergyTotal_kWh_div100 and linkTuyaMCUOutputToChannel 1 val 1. The device schema described dpID 1 as total forward energy in kWh with scale 2, and later tests showed the value rising from 9 after about 1 hour to 21 after about 2 hours on a 100 W bulb, which confirmed it was the cumulative energy register. [#21575291]linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 to a fuller form such as linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0 50, where later arguments add raw-value offsets. Older firmware ignored that because VCP calibration was added only after June 17. A later fix also stopped idle loads from showing the delta when real power was 0 W. [#21589905]mqtt_broadcastInterval, for example 30 seconds. The thread recommended leaving defaults unless you specifically need repeat broadcasts, because unchanged values do not need extra traffic. [#21590110]