FAQ
TL;DR: PJ-MGW1103/1103A CT-clamp meters stream 2403 raw volts = 240.3 V at 9600 baud and can push updates every 1-10 s once dpIDs are mapped correctly [Elektroda, tony059560, post #20882269] “Everything seems to be ok” — p.kaczmarek2 [Elektroda, 20849273]
Why it matters: Correct dpID mapping unlocks bidirectional kWh, sign-aware power and MQTT/HA export without extra hardware.
Quick Facts
• Measurement range: 0.2 A – 80 A per clamp [Elektroda, randomalias324, post #21429711]
• Default UART: 9600 bps, 8 N 1 [Elektroda, thalesmaia, post #20848010]
• MCU report frame: 55 AA 03 …, State cmd 0x07 every ≈10 s (adjustable) [Elektroda, erdeidominik1999, post #21114187]
• Key dpIDs: 18 = I, 19 = P, 20 = V; sign bits 102/104 [Elektroda, snkbrzmir4, post #21117274]
• Calibration dpIDs: 116-125 (V, I, P, Wh, F) [Elektroda, erdeidominik1999, post #21114187]
How do I get live voltage, current and power?
Flash OpenBeken, add tuyaMcu_setBaudRate 9600, then map dpIDs 20→Voltage_div10, 18→Current_div1000, 19→Power_div10 in autoexec.bat. A sample ready-to-paste set is shown in post #21114187 [Elektroda, erdeidominik1999].
My current shows zero on low loads—faulty?
The clamp needs at least 0.2 A; values below give 0 because of internal threshold in BL0942 [Elektroda, tony059560, post #20882488] Use a ≥60 W resistive load for testing.
Can I invert power when the energy flow reverses?
Yes. Use the sign bit dpIDs (102 for clamp A, 104 for clamp B) and an event handler:
- alias pos setChannel X $CHp
- alias neg setChannel X $CHp*-1
- addEventHandler OnChannelChange p/ sign myset
Full script in example file commit 1.17.619 [Elektroda, p.kaczmarek2, post #21125287]
Where are total kWh values stored?
The STM32 (MCU) accumulates Wh and exposes them as dpIDs 1/2 (device total) and 106-109 (per clamp). They survive Wi-Fi reflash but are lost if the MCU is power-cycled for several minutes [Elektroda, randomalias324, post #21429711]
Can I change the reporting interval?
Write dpID 129 with 1–10 (seconds). In OpenBeken: addRepeatingEvent 10 1 SetChannel 30 3 to push every 10 s, or SetChannel 30 1 for 1 s [Elektroda, erdeidominik1999, post #21114187]
How do I calibrate voltage or current?
Set dpIDs 116 (V), 117 (I₁), 118 (P₁), 122 (F), 123 (I₂) etc. via TextField channels, then write the desired integer. No BL0942 driver calibration is required because values are stored in MCU flash [Elektroda, erdeidominik1999, post #21114187]
Edge case: Wi-Fi keeps resetting every 20 s—fix?
The MCU toggles CEN. Cut or de-solder the reset/CEN track on CB2S and remove tuyaMcu_defWiFiState if you need AP mode [Elektroda, randomalias324, post #21429711]
How to restore original Tuya firmware?
BK7231 GUI flasher auto-saves a 2 MB backup on first read; flash it back with the same tool to regain Tuya SmartLife pairing [Elektroda, p.kaczmarek2, post #20883210]
Can I use ESPHome instead of OpenBeken?
Yes. Map the same dpIDs over UART1 at 9600 bps. A full ESPHome YAML template is in post #21443304 [Elektroda, dragonmen].
What’s the smallest update granularity?
The MCU still throttles replies to ≈1 s even if you query faster; practical minimum stable interval tested is 1 s [Elektroda, p.kaczmarek2, post #21115933]
Does clamp orientation matter?
Yes. Reverse wiring flips the sign bit, leading to negative totals. Align the arrow with conventional current flow or adjust sign logic in script [Elektroda, randomalias324, post #21429711]
Quick 3-step flashing guide?
- Use Tuya-cloudcutter profile “PJ-MGW1103”.
- On first boot, connect to AP and enter Wi-Fi.
- Upload autoexec, reboot, confirm dpID frames in log [Elektroda, thalesmaia, post #20851047]