FAQ
TL;DR: 2MB backup recommended; this triac no‑neutral CB3S switch is best as a "simple on/off light controller," not a dimmer. Flash OpenBK, map GPIOs, and invert LEDs only when on separate pins. [Elektroda, p.kaczmarek2, post #20567157]
Why it matters: It helps you avoid dead‑ends (like trying to dim) and shows the fastest, proven flashing path for this exact model.
Quick facts:
- Module: Tuya CB3S (BK7231N family). Channels: 3 (ch_num=3). JSON config available. [Elektroda, dead2112, post #20633600]
- Triac outputs enable no‑neutral operation; firmware dimming is not supported. [Elektroda, p.kaczmarek2, post #20567157]
- GPIO map: P7/P8/P9 = Relays 1–3; P14/P26/P24 = Buttons 1–3; P6 = Wi‑Fi LED. [Elektroda, dead2112, post #20633600]
- LED inversion works only if LED is on its own GPIO (use LED_n/WifiLED_n). Same‑pin LED/relay needs hardware change. [Elektroda, p.kaczmarek2, post #20632487]
- Windows: BK7231GUIFlashTool reads 2MB backups and auto‑flashes OpenBK. [Elektroda, p.kaczmarek2, post #20568022]
Quick Facts
- Module: Tuya CB3S (BK7231N family). Channels: 3 (ch_num=3). JSON config available. [Elektroda, dead2112, post #20633600]
- Triac outputs enable no‑neutral operation; firmware dimming is not supported. [Elektroda, p.kaczmarek2, post #20567157]
- GPIO map: P7/P8/P9 = Relays 1–3; P14/P26/P24 = Buttons 1–3; P6 = Wi‑Fi LED. [Elektroda, dead2112, post #20633600]
- LED inversion works only if LED is on its own GPIO (use LED_n/WifiLED_n). Same‑pin LED/relay needs hardware change. [Elektroda, p.kaczmarek2, post #20632487]
- Windows: BK7231GUIFlashTool reads 2MB backups and auto‑flashes OpenBK. [Elektroda, p.kaczmarek2, post #20568022]
Can this CB3S triac-based switch work as a dimmer?
No. The triacs are used to power a no‑neutral device, not for dimming control. Use it as a reliable on/off controller instead. As the expert put it, “simple on/off light controller.” Dimming would require hardware that this board lacks. [Elektroda, p.kaczmarek2, post #20567157]
What’s the exact GPIO pinout for buttons, relays, and the Wi‑Fi LED?
From the Tuya config: Relays on P7 (CH1), P8 (CH2), P9 (CH3). Buttons on P14 (CH1), P26 (CH2), P24 (CH3). Wi‑Fi LED on P6. The module is CB3S and ch_num is 3. This mapping works with OpenBK roles Rel;1–3, Btn;1–3, and WifiLED. [Elektroda, dead2112, post #20633600]
How do I flash OpenBK on Linux for this CB3S/BK7231N?
Use hid_download_py’s UART method. 1) Install hid_download_py. 2) Run: sudo python uartprogram OpenBK7231N_QIO_1.17.151.bin -w -s 0x0 -u 3) Wait for completion and reboot. This procedure was confirmed working when the GUI approach under Mono failed. [Elektroda, dead2112, post #20633600]
How do I back up the stock 2MB firmware on Windows?
Use BK7231GUIFlashTool. It is a simple GUI flasher for BK7231T/N that can read a full 2MB backup and auto‑flash OpenBK. Connect UART, select the COM port, and use the backup function before flashing. [Elektroda, p.kaczmarek2, post #20568022]
My UART backup fails with “BytesToRead 4095.” What should I do?
Reboot the device during “Getting bus…” and try again. You can power‑cycle or briefly short CEN to GND for about 0.25 s. The tool uses 115200 baud in the log. If UART reads still fail or CRC mismatches, switch to hid_download_py; users succeeded flashing that way. [Elektroda, dead2112, post #20627718]
Can I invert the touch backlight colors (red/blue) in software?
Only if the LED is on a separate GPIO. Set LED to LED_n or WifiLED to WifiLED_n. If the LED shares a GPIO with the relay, software inversion is impossible. A hardware rewire is required in that case. [Elektroda, p.kaczmarek2, post #20632487]
How do I configure two independent LEDs (Wi‑Fi and channel)?
If your board has two LEDs, set one role to WiFiLED_n and the other to LED or LED_n, depending on desired polarity. “I used to set one LED role to WiFiLED_n and the second to just LED,” notes the maintainer. [Elektroda, p.kaczmarek2, post #20633944]
What baud rate and reset method should I use during flashing?
115200 baud appears in the tool log. When prompted, reboot the device by power cycling or briefly shorting CEN to GND for around 0.25 seconds. This helps the flasher capture the bus and proceed. [Elektroda, dead2112, post #20627718]
Can someone extract the GPIO mapping for me?
Yes. “We can extract GPIO from Tuya binary if you do a 2MB backup.” Share that backup, and maintainers can decode the pin roles for your exact variant. [Elektroda, p.kaczmarek2, post #20626159]
How many channels does this model support?
Three. The extracted Tuya JSON shows ch_num set to 3, matching a 3‑gang touch switch. Channel pins map to P7/P8/P9 for relays and P14/P26/P24 for buttons. [Elektroda, dead2112, post #20633600]
Does the Windows GUI flasher work on Linux via Mono?
A user reported the GUI failed under Linux with Mono. They succeeded by flashing with hid_download_py using the provided uartprogram command instead. Consider using the CLI path on Linux. [Elektroda, dead2112, post #20633600]
Can I use this triac switch without a neutral wire?
Yes. The triacs are there because the device is designed for no‑neutral installations. They also explain why firmware dimming is off the table on this board. [Elektroda, p.kaczmarek2, post #20567157]
How do I get the GPIO config from the Tuya firmware?
Dump the firmware using the OpenBK web app, then load the dump into BK7231GUIFlashTool. It outputs the JSON mapping with pins and roles, which you can apply in OpenBK. [Elektroda, dead2112, post #20633600]
What’s the default LED behavior after flashing OpenBK on this unit?
On this model, the switch stays blue when the light is OFF and turns red when the light is ON. This behavior reflects the shared LED/relay design on the PCB. [Elektroda, dead2112, post #20632402]