logo elektroda
logo elektroda
X
logo elektroda

[Solved] Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup

lubopetrov 2760 66
Best answers

How do I configure a flashed Dewin smart circuit breaker in OpenBK7231 so Home Assistant shows the on/off switch and power measurements instead of only generic device info?

You flashed the breaker correctly, but it still needs TuyaMCU setup in OpenBK; until you map the Tuya dpIDs, Home Assistant will only see generic info and no switch/power entities [#21566792][#21561187] Use an `autoexec.bat` that starts `TuyaMCU`, sets `tuyaMcu_defWiFiState 4`, maps dpID 16 to a toggle channel for the breaker switch, and maps dpID 6 as `RAW_V2C3P3` to channels 3/4/5 for voltage/current/power [#21574373][#21574681] For the total-energy reading, map dpID 1 to its own channel and use an energy-total channel type/scaling that matches the firmware; the thread notes dpID 1 is `total_forward_energy` in kWh and may need divider tuning [#21574926][#21589431] If the breaker is only powered from the USB programmer, you won’t get real measurements or proper switching, so disconnect the programmer and test it on mains [#21572371] If voltage/current/power need calibration, add offsets in the `RAW_V2C3P3` mapping and make sure you’re on a recent OBK build that supports VCP calibration [#21589836][#21589859] MQTT publishes on value changes by default; if you want periodic refreshes, enable flag 2 and set `mqtt_broadcastInterval`, though the default change-based updates are usually enough [#21590110]
Generated by the language model.
ADVERTISEMENT
  • #31 21578698
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    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.
  • ADVERTISEMENT
  • #32 21578970
    lubopetrov
    Level 2  
    Posts: 39
    It is exactly the same model. I flashed and copied the latest version of autoexec.bat. I also checked flags 46 and 47. Maybe I missed something else, but I think I followed and checked your instructions.
  • #33 21578982
    divadiow
    Level 38  
    Posts: 4859
    Help: 424
    Rate: 861
    lubopetrov wrote:
    Here is my device id: bfe887d3d3b94ffed6snhu

    This is a unique device ID linked to your account so cannot be used by others to check Tuya dev. If there's any detail you still don't have feel free to post or DM me factory firmware backup and I can check
  • #34 21579210
    lubopetrov
    Level 2  
    Posts: 39
    Here is the backup file. Can you help to solve my problem?
    Attachments:
    • readResult_BK7231N_QIO_6_11_2025_2025-11-6-17-28-48.bin (2 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #35 21579294
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    lubopetrov wrote:
    the toggle is not functional.

    Do you still have button on the main device page? Or did it diseappear totally?
    Helpful post? Buy me a coffee.
  • #36 21579333
    lubopetrov
    Level 2  
    Posts: 39
    No, the button is there, but it doesn't do anything.
  • ADVERTISEMENT
  • #37 21580035
    lubopetrov
    Level 2  
    Posts: 39
    How is this possible? I flashed the device, loaded the same autoexec that is working on the other device, but this time the toggle button is not working. Did I miss something?
  • #38 21580134
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    Are you 100% sure it's the same device model?

    Maybe it has different dpIDs - do dpID extraction, maybe?

    Or flash back Tuya and check with TuyaMCU analyzer (as long as you can do it in safe manner)?

    What is your current autoexec.bat of the problematic device?

    Everything else works correctly?
    Helpful post? Buy me a coffee.
  • #39 21580392
    divadiow
    Level 38  
    Posts: 4859
    Help: 424
    Rate: 861
    Code: JSON
    Log in, to see the code
  • #40 21580427
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    According to @divadiow post the switch has dpID 16:
    
    
        {
          "id": 16,
          "mode": "rw",
          "name": "断路器开关 (Breaker Switch)",
          "desc": "",
          "desc_en": "",
          "property": { "type": "bool" }
        },
    

    What do you have in autoexec.bat?
    Helpful post? Buy me a coffee.
  • #41 21580602
    lubopetrov
    Level 2  
    Posts: 39
    Yes, everything else is working as on the other device. The device is exactly the same as the other. In fact I bought them together from amazon.de. I copied the autoexec.bat from the other breaker. Even when I press the physical button on the device the UI button "Toggle" switches colors red/green. Maybe I'm missing flags ore something else?
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    
    // 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
    

    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
  • #42 21580813
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    lubopetrov wrote:
    Even when I press the physical button on the device the UI button "Toggle" switches colors red/green.

    Wait, what? This is very important information. Which physical button? Can you make a photo?
    Helpful post? Buy me a coffee.
  • #43 21580815
    lubopetrov
    Level 2  
    Posts: 39
    Button on the device
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
  • #44 21580818
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    This is crucial information and this means that communication with TuyaMCU works. So there are three options now:
    - maybe wrong physical connection?
    - maybe relay inside is broken?
    - maybe device has some kind of extra setting within Tuya app or TuyaMCU that disables dpID 16 switch?
    Helpful post? Buy me a coffee.
  • #45 21580826
    lubopetrov
    Level 2  
    Posts: 39
    1. Wrong physical connection - very unlikely. The light is turning on/off
    2. Broken relay - again unlikely because of the reason above.
    3. Maybe ??? How to check? Can I reflash it back to the original and how?
  • #46 21580833
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    Hm ok, so reflash Tuya 2MB backup and check if it works in Tuya. Maybe some other dpID must be changed for it to work?

    So it's permantently shorted? I mean, is relay always open now or always closed?
    Helpful post? Buy me a coffee.
  • #47 21580835
    lubopetrov
    Level 2  
    Posts: 39
    The relay works as long as I use the physical button. It turns the light on/off. Btw, I haven't created a project or anything like this on Tuya dev site with this relay. How do I flash the backup fw?

    Added after 1 [hours] 43 [minutes]:

    I found out why this board was acting. When I soldered the wires accidently I damaged one line on the board.
  • #48 21581048
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    I see, so now, once you fix the physical connection, is everything ok?
    Helpful post? Buy me a coffee.
  • #49 21581142
    lubopetrov
    Level 2  
    Posts: 39
    Yes, thank you. This has been resolved. I still need help with following:
    1. Channel 1= 22 / I believe this is total consumption in kWh. How to change the name from "Channel 1" to "Total Power Consumption" and divide by not sure 100 or 1000
    2. Fine tune the value of power. I have but rated at 100w but is showing like 95W
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    3. What is the current refresh rate for reporting values and can this be altered to report more often?
    4. How to present all the values above as MQTT data to Home Assistant?
    Can you please help me?
    Here is the current json output:
    
    [
      {
        "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
      }
    ]
    
  • #50 21589240
    lubopetrov
    Level 2  
    Posts: 39
    Why when I try to fine tune the voltage I'm getting error Last status: ERROR: Unknown command (undefined)

    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
  • #51 21589431
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    1. Try EnergyTotal_kWh_div1000 channel type, maybe?
    2. You can specify offset while mapping dpIDs.
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    Use 0 for dpCache, 1 for mult, 0 for bInverse, then specify deltas.
    3. If possible, then repeatedly request update from MCU:
    
    addRepeatingEvent 10 -1 tuyaMcu_sendQueryState
    

    Every 10 seconds.
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    4. Use HASS discovery:




    Regarding last question: Voltageset is not TuyaMCU, just for BL0942/BL0937
    Helpful post? Buy me a coffee.
  • #52 21589447
    lubopetrov
    Level 2  
    Posts: 39
    The power consumption is not correct. I have a bulb that is 100 watts, but it is showing like 95. How do I fix this?
  • #53 21589452
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    You can specify offset for the mapped value in autoexec.bat:
    p.kaczmarek2 wrote:

    2. You can specify offset while mapping dpIDs.
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    Use 0 for dpCache, 1 for mult, 0 for bInverse, then specify deltas.

    Find the line where you are mapping the VCP packet (Voltage/Current/Power), fill the missing fields with default values, and use delta values to adjust Voltage/Current/Power.
    Helpful post? Buy me a coffee.
  • #54 21589826
    lubopetrov
    Level 2  
    Posts: 39
    The device measures 228v but I measure with multimeter 222v. My control bulb is rated at 100 watts but it is showing as 96w. How can I adjust delta for voltage if in my autoexec I have the following:
    
    linkTuyaMCUOutputToChannel 6 RAW_V2C3P3  3
    
  • #55 21589836
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    This is incorrect. You have:
    
    setChannelType 3 Voltage_div10
    setChannelType 4 Current_div1000
    setChannelType 5 Power
    

    And:
    
    linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3
    

    And arguments are:
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    So you stub dpCache, mult and inversion:
    
    linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0
    

    and then add deltas for Voltage, Current, Power
    
    linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0 50 100 150
    

    In sample above, voltage raw value delta is 50 (5V), current delta is 100, and so on.
    Deltas are not scaled (in TuyaMCU values). You need to save and restart to see result I guess.
    Helpful post? Buy me a coffee.
  • #56 21589857
    lubopetrov
    Level 2  
    Posts: 39
    Per instructions I changed to:
    linkTuyaMCUOutputToChannel 6 RAW_V2C3P3 3 0 1 0 50

    but it didn't affect the value for the voltage.
  • ADVERTISEMENT
  • #57 21589859
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    Save config and reboot. Also make sure that you have latest OBK release, and not some old version. You may have OBK from before we added calibration.
    Helpful post? Buy me a coffee.
  • #58 21589864
    lubopetrov
    Level 2  
    Posts: 39
    I believe my OBK is fairly recent.

    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup

    And yes. I did reboot the device.

    Added after 2 [minutes]:

    For your review I'm posting my current autoexec
    
    // 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
    
  • #59 21589871
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12374
    Calibration for VCP was added on Jun 17, so you don't have it yet.
    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup
    Make autoexec.bat backup first.


    Helpful post? Buy me a coffee.
  • #60 21589887
    lubopetrov
    Level 2  
    Posts: 39
    Thanks. It worked!
    But now there is another issue. When the bulb is off the device reports consumption of the delta value.

    Dewin RMDT-1PNL 63 Smart Circuit Breaker OpenBK7231 MQTT Setup

Topic summary

✨ The discussion focuses on integrating the Dewin RMDT-1PNL 63 Smart Circuit Breaker with Home Assistant using the OpenBK7231IN firmware without relying on the Tuya cloud. After flashing the device with OpenBK7231IN_QIO_1.18.102.bin, the user could add the breaker to Home Assistant but initially lacked power consumption data and ON/OFF control. It was identified as a TuyaMCU-based device requiring specific configuration, including enabling flags 46 or 47 and running the TuyaMCU driver with proper dpID mappings in autoexec.bat. Key dpIDs include 1 (total forward energy in kWh with scaling), 6 (Phase A voltage, current, and power in a raw 8-byte format), and 16 (breaker switch toggle). The user was guided to disconnect the programmer and power the device from the grid to obtain valid measurements. Configuration steps involved setting channel types for toggle, voltage, current, and power, and linking TuyaMCU outputs to channels with appropriate scaling and offsets to fine-tune readings. The toggle control was functional on one unit but not on the other due to a damaged board trace, which was resolved after repair. The user also inquired about renaming channels, adjusting measurement precision, refresh rates (suggested via addRepeatingEvent for periodic state queries), and MQTT integration with Home Assistant using HASS discovery. The discussion included troubleshooting logs, dpID data extraction, and firmware backup restoration. The final setup allowed accurate voltage, current, power, and total energy monitoring with toggle control via Home Assistant, fully independent of the Tuya cloud.
Generated by the language model.

FAQ

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]

Quick Facts

  • dpID 6 carries an 8-byte payload in big-endian format: 2 bytes voltage at 0.1 V, 3 bytes current at 0.001 A, and 3 bytes power at 0.0001 kW. [#21580392]
  • The working switch mapping used dpID 16 as a boolean toggle, while voltage, current, and power were exposed on channels 3, 4, and 5. [#21574681]
  • Total energy came from dpID 1 and was later treated as kWh with scale 2, so EnergyTotal_kWh_div100 matched the thread’s final setup. [#21589864]
  • The breaker reported no meaningful load data over USB-only power; measurements appeared only after connecting it to mains with a real load. [#21572371]
  • Calibration support for VCP offsets was added after June 17, which explains why older OpenBK7231 builds ignored voltage and power deltas. [#21589871]

How do I configure a Dewin RMDT-1PNL 63 smart circuit breaker in OpenBK7231 after flashing so the ON/OFF switch and power readings appear in Home Assistant over MQTT?

You must configure TuyaMCU mappings after flashing. Use this 3-step setup: 1. Start TuyaMCU and force paired Wi-Fi state in 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]

Why does OpenBK7231 say "Sorry, no meaningful pins data found" when I try to import a template on this Dewin smart breaker?

It says that because this breaker is not controlled as a normal pin-template device. The board photos led to the conclusion that it is a TuyaMCU design, so importing a GPIO-style template did not produce usable pins data. In this model, the relay and measurements come through Tuya data points instead of direct pin assignments. That is why template import failed and the fix was to follow the TuyaMCU guide instead. [#21566792]

What is a TuyaMCU device, and how can I tell if my Dewin RMDT-1PNL breaker uses TuyaMCU instead of direct GPIO control?

"TuyaMCU" is a serial control subsystem that manages relay and sensor functions through data points, instead of exposing those functions as direct GPIO pins. You can identify it here by two facts: template import failed, and the board photos were recognized as a TuyaMCU design. Later logs also showed TuyaMCU heartbeats and state packets such as 55 AA 03 07 ..., which confirmed serial communication with the MCU. [#21566792]

What is a Tuya dpID, and how do dpIDs map to relay control, voltage, current, power, and total energy in OpenBeken?

"Tuya dpID" is a numbered data point that represents one device feature, such as a switch, energy counter, or raw measurement packet, and OpenBeken maps each dpID to a channel or parser. In this breaker, dpID 16 was the breaker switch, dpID 6 was the 8-byte Phase A packet, and dpID 1 was total forward energy. The successful mapping used dpID 16 for the toggle, dpID 6 for voltage, current, and power, and dpID 1 for total energy. [#21580392]

How can I start the TuyaMCU driver in OpenBK7231 and verify communication using heartbeats, baud rate, and tuyaMcu_sendQueryState?

Start TuyaMCU in 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]

Where do I find the DP command output in OpenBeken, and how do flags 46 and 47 help with TuyaMCU debugging?

You get DP output by calling the device URL with 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]

How do I map Dewin breaker dpID 16 to a working toggle and dpID 6 to voltage, current, and power channels in autoexec.bat?

Use channel 2 for the switch and channels 3 to 5 for metering. The working mapping was: 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]

Why does the breaker show measurements only after being connected to mains power and not when powered only from the USB programmer?

It shows measurements only on mains because the metering side needs full line power and a real load. While the breaker was powered only from the USB programmer, the thread showed almost no useful load data, and the advisor explicitly said measurements would not appear until it was fully powered from the grid. After connecting mains and a bulb, voltage and later current and power values appeared. [#21572371]

What does the RAW_V2C3P3 format mean for TuyaMCU dpID 6, and how are the 8 raw bytes decoded into voltage, current, and power?

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]

How can I remove an extra Toggle button from the OpenBK7231 web UI after testing different channel mappings?

Remove the test mapping and reset that channel’s type in the Web App. In the thread, an extra Toggle 1 appeared because channel 1 had been temporarily set as a toggle during testing. The fix was not just editing 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]

Which is the right metering method for this Dewin smart breaker: TuyaMCU mapping or the BL0942 driver, and why?

TuyaMCU mapping is the right metering method for this breaker. The thread explicitly warned not to start the BL0942 driver because it could cause problems, and the working measurements were obtained entirely from TuyaMCU dpID 6. This breaker reports metering through the MCU’s raw data packet, not through a directly attached BL0942 energy chip interface exposed to OpenBeken. [#21574447]

How do I add total energy from dpID 1 in OpenBeken and convert it to the correct kWh scale for Home Assistant?

Map dpID 1 to a read-only energy channel and use a kWh-scaled channel type. The final thread config used 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]

Why would two apparently identical Dewin RMDT-1PNL breakers behave differently after flashing, even with the same autoexec.bat?

They can behave differently because the fault may be physical, not logical. In this thread, the second breaker showed readings but the toggle did nothing, even though dpID 16 updates appeared and the UI button changed color. The root cause was later found to be damaged board trace(s) from soldering, not a different model or wrong config. Once the physical damage was identified and fixed, the issue was resolved. [#21580835]

How can I calibrate voltage and power in OpenBK7231 for a TuyaMCU breaker using linkTuyaMCUOutputToChannel deltas, and why did older firmware ignore the offset?

Calibrate by expanding the mapping line with delta parameters and using a recent firmware. The thread changed 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]

What is the best way to publish Dewin breaker measurements to Home Assistant through MQTT, and how do HASS discovery, flag 2, and mqtt_broadcastInterval affect refresh behavior?

Use normal MQTT state publishing first, then add HASS discovery if you want automatic entities. By default, this breaker republishes dpID-based values when they change, which is usually enough for Home Assistant. If you want periodic rebroadcasts even without change, enable flag 2 and set 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]
Generated by the language model.
ADVERTISEMENT