FAQ
TL;DR: ZN268131 Wi-Fi relay (â22 PLN/~$5) lets you reuse any bistable switch after flashing OpenBeken; âThe longer delay of ToggleChannelOnToggle was fixed todayâ [Elektroda, p.kaczmarek2, post #20381485] Cut one RX trace, program via UART, restore, done.
Why it matters: You keep your existing wall hardware, ditch the cloud, and gain local Home-Assistant control.
Quick Facts
⢠Supply voltage: 100-240 VAC; relay opens only one conductor [Elektroda, p.kaczmarek2, post #20033093]
⢠Load rating: 16 A resistive (label on Aubess/Shunshun variants) [Elektroda, anthonythomas, post #20496080]
⢠Module: BK7231T or BK7231N (WB2S/CB2S) with 2 MB flash [Elektroda, p.kaczmarek2, post #20033093]
⢠Price: 20â30 PLN including shipping [Elektroda, p.kaczmarek2, post #20033093]
⢠Flashing lines needed: 3.3 V, GND, RX, TXâno GPIOs [Elektroda, p.kaczmarek2, post #20033093]
1. What makes ZN268131 different from typical Sonoff-style relays?
It provides two screw terminals (S1, S2) for an external bistable switch, so every throw flips the relay, regardless of lever position. Classic Sonoff units expose only a momentary button on the case [Elektroda, p.kaczmarek2, post #20033093]
2. How do I wire a bistable rocker or wall toggle?
Bridge the rocker between S1 and S2 (on ZN268131) or between any free GPIO and GND on other OpenBeken-flashed boards. In firmware set that pin role to âToggleChannelOnToggleâ so each change toggles the relay [Elektroda, p.kaczmarek2, post #20033093]
3. What are the safe three steps to flash OpenBeken?
- Power the board from a separate 5 V supply before the AMS1117 regulatorânever from mains.
- Connect 3.3 V, GND, RX, TX to a 3.3 V USB-UART adapter.
- Start bkWriter, then briefly cycle 5 V to enter bootloader; program binary, reconnect the cut trace [Elektroda, p.kaczmarek2, post #20033093]
4. Why must I cut the RX trace on some units?
The RX pin is also tied to an onboard push-button with a strong pull-up; it holds the line high and blocks the bootloader. Isolating the trace lets the UART drive RX during flashing, then you bridge it back afterwards [Elektroda, p.kaczmarek2, post #20033093]
5. Which OpenBeken pin roles work out of the box?
Factory template: Rel â P8, LED_n â P7, Btn â P10, ToggleChannelOnToggle â P26 on many Aubess/Shunshun units [Elektroda, anthonythomas, post #20496080] Verify with a meter because other batches use P11 or P14 instead [Elektroda, kicius, post #21363483]
6. I see 3.8 V on the 5 V rail and the module wonât bootâwhat failed?
A dried-out filter capacitor causes the capacitive dropper to sag; Tuyaâs low-power mode masked it, but OpenBeken pulls more current, exposing the fault [Elektroda, kptzbik1, #20112145; p.kaczmarek2, #20112270]. Replace the 470 ÂľF/10 V cap with a low-ESR part rated for SMPS duty.
7. The toggle switch reacts about 1 s lateâfix?
Upgrade to OpenBeken build ⼠2023-01-12; the debounce logic was rewritten and the delay removed [Elektroda, zifban19, post #20381485] âThe longer delay ⌠was fixed today,â the maintainer confirmed [Elektroda, p.kaczmarek2, post #20381485]
8. Can I retrofit other smart relays to accept bistable buttons?
Yes. Any Tuya-based relay with spare GPIOs can run OpenBeken; assign one free pin as ToggleChannelOnToggle and wire it to a switch. The guide shows a Sonoff-style board with WB2S where only two jumper wires were needed [Elektroda, p.kaczmarek2, post #20033093]
9. How do I add an automatic 15-minute shut-off?
Create a LittleFS script:
AddEventHandler OnClick 0 setChannel 1 1
addTimer 90000 setChannel 1 0
This turns channel 1 on at the click and off after 900 s (15 min) [OpenBeken Docs].
10. Must L and N be connected in the marked order?
The relay functions if you swap them, but doing so can leave the lamp socket live when âoff,â increasing shock risk. Always follow the LâL1, NâN1 labels and isolate power before servicing [Elektroda, p.kaczmarek2, post #20557122]
11. What hardware failures appear in cheap mini switches?
Low-grade 470 ÂľF electrolytics often bulge within a year, dropping the 5 V rail and killing Wi-Fi and relay drive [Elektroda, Szyszkownik Kilkujadek, post #21364784] Replace with quality low-ESR parts and enable PowerSave 1 to cut stress [Elektroda, p.kaczmarek2, post #20354661]
12. How is 433 MHz RF added without extra code?
Many three-way RF versions piggy-back the touch button line: the RF chip briefly drives the same GPIO when a matched code arrives, so OpenBeken sees it as a normal button eventâno firmware change needed [Elektroda, p.kaczmarek2, post #20195490]