FAQ
TL;DR: After adding a 1 kHz (≈4095 ms max) hardware watchdog, random freezes dropped by “five sockets still available” to 0 crashes in 7 days [Elektroda, flobuljeedom, post #21032468] “Works like a charm now” [Elektroda, flobuljeedom, post #20923206]
Why it matters: Reliable power-monitoring smart plugs hinge on stable BL602/BL0937 firmware.
Quick Facts
• Rated load: 16 A/3680 W (marketing says 20 A) – measured relay is Songle SRD-05 VDC-SL-C 16 A [Elektroda, flobuljeedom, post #20856171]
• Chipset combo: Bouffalo BL602 Wi-Fi MCU + BL0937 energy metering IC [Elektroda, flobuljeedom, post #20856171]
• Factory firmware: Tuya v1.3.x; OTA image ≈ 800 kB occupying 544 kB FW slot [Elektroda, miegapele, post #20921739]
• Watchdog window: 1 – 4095 ms (32 kHz /4 prescaler) per BL602 HAL [OpenBL602 SDK]
• Typical flashing time via UART @ 921 600 bps: < 30 s using Bouffalo Lab DevCube.
Is the BL0937 energy-meter driver fully working on BL602 now?
Yes. Pull-request #1044 merged; CF/CF1/SEL interrupts count correctly after including hal_gpio_register_handler and watchdog feed [Elektroda, p.kaczmarek2, post #20920330]
Why did my socket show zeros after first flash?
Early builds lacked the BL0937 interrupt counter; update to firmware ≥ 1.17.457 or newer OTA "OpenBL602_xxx.bin" and apply correct GPIO template (CF1-3, CF-14, SEL-21) [Elektroda, miegapele, post #20919936]
Which GPIOs are used in the common SM-028 V1.3 board?
2 → Relay, 3 → CF1, 14 → CF, 17 or 22 → Button (variant-dependent), 20 → LED (active-low), 21 → SEL [Elektroda, flobuljeedom, #20856171; Elektoda, andrewbeyou, #21274357].
OTA update fails at 253 bytes – how to fix?
The flash-erase routine blocked the TCP task. Firmware ≥ 1.17.528 erases in 4 kB chunks, eliminating the 253-byte stall [Elektroda, miegapele, post #20944841]
Device still freezes; what next?
Enable hardware watchdog (default from 1.17.528). It reboots on BL_RST_SOFTWARE_WATCHDOG, preserving uptime. Add PingWatchDogEnable 1
to reboot if Wi-Fi drops [Elektroda, zdzihu123, post #21030199]
How can I keep the relay ON after power loss or reboot?
Go to WebApp → Config → Startup and set Channel 1 Start State to –1 (retain last). Or issue POWER ON
as Startup Command [Elektroda, p.kaczmarek2, post #20923585]
Physical button stopped working after template load – why?
Your hardware variant routes the button to GPIO 22, not 17. Edit template pins accordingly: "22":"Btn;1"
[Elektroda, andrewbeyou, post #21274357]
What causes freeze when using `SetupEnergyStats`?
A bug in stats timer locks the main loop exactly one second before the configured interval. Avoid the command until patch lands; watchdog now recovers automatically [Elektroda, flobuljeedom, post #20944817]
Edge-case: socket reboots, PC loses power for 0.5 s – unavoidable?
Relay is NO; reboot de-energises coil briefly. Hardware fix: replace with NC relay or add RC delay to driver transistor base [Elektroda, omniron, post #21066374]
How do I open the housing without breaking it?
- Clamp the body vertically in a pipe-wrench.
- Rotate plug prongs with adjustable pliers; the glue weld snaps.
- Pry halves with a guitar pick.
(Video demo) [Elektroda, miegapele, post #21139347]
UART flashing pinout for SM-028 V1.3?
RX⇆TX, TX⇆RX, 3V3, GND, and pull-up BT pad with 10 kΩ to 3V3, then flash via Bouffalo Lab DevCube at 921 600 bps [Elektroda, flobuljeedom, post #20856171]
Statistic: how many MQTT publishes come from BL0937 driver?
Typical idle socket sends ≈ 17 000 MQTT state messages per 20 minutes if change-filter disabled [Elektroda, zdzihu123, post #21027185] Enable ChangePubCancel 1
to cut traffic by > 90 %."
Can I flash over air if socket uses ESP8266 instead of BL602?
Only if Tuya-convert exploit is unpatched (pre-2020). For firmware ≥ 1.3.18 you must solder UART wires; OTA profiles won’t match [Elektroda, bezzubov, post #21423243]