logo elektroda
logo elektroda
X
logo elektroda

TEEPAAO Wi-Fi Curtain Switch Configuration for Non-Curtain Use - Setup Guide

keegiraido  5 2730 Cool? (+1)
📢 Listen (AI voice):
I bought this TEEPAO WI-FI Curtain Switch as second hand. It is designed for controlling electric curtains as its name says. One button for opening, one stop button, and one for closing curtains. It has controllable backlight. As I do not have such curtains I configured it to be as switch with 2 buttons and one extra button. This is the box:
White box of TEEPAO curtain switch with Smart Touch Switch label. White box with certification markings and QR code. Photo of the label on the packaging of the TEEPAO WI-FI smart curtain switch.
Front: TEEPAO WI-FI curtain switch with three buttons in a box.
Back: TEEPAO WI-FI curtain switch with specification label.

To open the switch, one has to use some sharp tool:
Image showing the opening of a TEEPAO WI-FI curtain switch using a knife.
The button plate is softly glued to the case with foam pieces. It can be easily removed like that:
Image of the interior of a TEEPAO WI-FI curtain switch with visible circuit boards and a CB3S module.
A closer look:
Disassembled TEEPAO WI-FI curtain switch showing buttons and a wifi module CB3S.

It has CB3S wifi module:
Close-up of the CB3S wifi module with model number, P/N, S/N, and QR code.

After removing the button plate one can see the back of button plate and solder side of power plate:
TEEPAO WI-FI curtain switch circuit board with visible electronic components.

Here is the pinout of wifi module:
CB3S Wi-Fi module on a circuit board.

To get out the power part one has to remove wire screws:
Open casing with power board and screws on a white background.

Closer look of both sides of the power plate:
Close-up of the power board of the TEEPAO WI-FI curtain switch with electronic components. Close-up of the PCB board of the TEEPAO WIFI curtain switch with visible components.

I tried to flash the device with tuya-cloudcutter without success. So I had to use wiring.

Wiring to flash the device.
The pins connecting the button plate with power plate has GND and 3.3V pins, so those do not have to be soldered. RX and TX have to be soldered. RX pin is connected to button control chip and this does not allow to flash new firmware. One has to desolder the button control chip pin 16 or cut through the wire between RX and this chip. There is always possibility also to remove the whole wifi plate or button control chip of course.
I chose to desolder the pin 16 only:
Close-up of a circuit board with electronic components and a chip.

For flashing I used HW-597 USB to TTL module with CH340G chip. The power of this module was too weak to power the button plate, so I used a 5V to 3.3V power converter. I have had no such problem with PL2302 module.

The pinout of HW-597 module from left to right is:
5V (power)
VDD (for choosing 5V or 3.3V TTL output)
3V3 (power)
TXD
RXD
GND

As I told, the GND and 3.3V can be reached on pins of button plate <-> power plate connector. Pin 2 is ground and Pin 1 is 3.3V. Pin 2 is connected to HW-597 ground pin, Pin 1 is connected to AMS1117 5V to 3.3V converter chip which is soldered to the back of the power interruption switch (for initializing flashing). AMS1117 needs also the ground, so it is connected to ch-597 ground with a wire. RXD and TXD of wifi board are soldered to TXD and RXD of HW-597.
USB module connected to the TEEPAO WI-FI curtain switch PCB with visible wire connections.

I used BK7231 Easy UART Flasher. This software runs under Microsoft Windows. Fortunately my kid has one. At first windows did not recognize the usb to ttl converter and I started to search for it, but after a while the driver got installed without any special download. The flasher worked without any problems. Sorry for blurry picture. Forgot to focus.
Screenshot showing the use of BK7231 Easy UART Flasher software for flashing firmware on a Windows 10 computer.

After restart OpenBK booted up and I configured buttons, backlight and green led to be sure all are available. I will not go through this process, as I will provide json template where everything is already configured.
OpenBK7231N user interface with control toggle buttons.

This configuration allows to use the device as 2 way switch, while in ON state buttons glow. Middle button switches only its light and can be configured to do something else. Maybe switching both relays at the same time on or off. Backlight and green led can be only controlled from web with this config.

Configuration json is attached: obkFF06494...43.json.gz (354 bytes)You must be logged in to download this attachment.

About Author
keegiraido wrote 4 posts with rating 2 . Been with us since 2024 year.

Comments

p.kaczmarek2 11 Jan 2024 09:06

Hello, can you elaborate on what exactly is which GPIO? I slightly completed your template but it still seems quite mysterious: { "vendor": "TEEPAO", "bDetailed": "0", "name": "Teekar Smart... [Read more]

keegiraido 12 Jan 2024 13:05

Hi, Thank you for asking! Sorry for the messy template. I am not familiar with templates and took it as it was. You are correct about channel 20 and 30. Here are the GPIO's: P7 btn 2 (channel 2) p8... [Read more]

formeTA 23 Sep 2024 18:39

Thank you for showing the details. Based on your Input I flashed a Teekar Smart touch curtain switch the same way (cutting Pin 16 and after flashing with openbk resolder the pin). I found various possible... [Read more]

ElektrodaBot 25 Sep 2024 08:26

Thank you for providing detailed information about your Teekar Smart Curtain Switch setup. Based on your description, it seems that the button actions and LED behavior are not functioning as expected.... [Read more]

formeTA 27 Sep 2024 17:32

Thank you! LED configuration is perfect now. Relay had to be changed to 9 instead of 26. Also good now. [Read more]

FAQ

TL;DR: With 3 usable buttons and 3.3V flashing access, this guide shows how to repurpose a TEEPAO curtain switch as a two-button smart switch. As one contributor put it, "There is no relay for button 2", so the center key is best used for lighting or automation scripts. It solves GPIO mapping, RX isolation, and OpenBK flashing for CB3S/BK7231N owners. [#20905212]

Why it matters: This thread turns a confusing Tuya curtain controller into a documented OpenBK platform with known pins, safe flashing steps, and fixes for reversed buttons and mixed LEDs.

Option Result Key requirement
tuya-cloudcutter Failed on this unit No working exploit found
Wired UART flashing Worked Isolate RX and use 3.3V power
HW-597 + CH340G Flashing worked, power was weak External 5V-to-3.3V regulator needed
PL2302 adapter Worked better for power No extra power issue reported

Key insight: The critical hardware step is isolating the CB3S RX path before flashing. On this board, desoldering button-control chip pin 16 or cutting that trace lets OpenBK flash successfully and boot with stable GPIO control. [#20902811]

Quick Facts

  • The board exposes 3.3V on connector pin 1 and GND on connector pin 2, so only TX and RX needed extra soldering for UART flashing. [#20902811]
  • Confirmed GPIO map: P7=Btn2, P8=Btn3, P9=backlight inverted, P10=Btn1, P14=relay 1 + LED1, P23=green LED inverted, P24=relay 3 + LED3, P26=LED for button 2. [#20905212]
  • The switch was repurposed as a 2-way switch: two outer buttons drive outputs, while the middle button controls only its light or can run custom automation. [#20902811]
  • HW-597 with CH340G could program the board, but its onboard power was too weak for the button plate; an AMS1117 5V-to-3.3V regulator solved that issue. [#20902811]
  • A later working curtain setup used 25 s as the run-duration channel and a 2 s stop pulse, then corrected the relay mapping from P26 to P9. [#21241604]

1. How do I reconfigure a TEEPAO Wi-Fi Curtain Switch for non-curtain use as a two-button switch with an extra programmable middle button?

Flash OpenBK, map the two outer buttons to the real relay outputs, and leave the middle key as a logic-only control. In this thread, the device became a 2-way switch where the outer buttons switched loads and glowed when ON. The middle button had no physical relay, so it was used only for its light and could be reassigned to another action, such as toggling both relays through an OpenBK script. [#20902811]

2. What is the GPIO pinout of the CB3S module in the TEEPAO or Teekar Smart Curtain Switch with BK7231N?

The confirmed mapping is P7=button 2, P8=button 3, P9=backlight inverted, P10=button 1, P14=relay 1 plus button-1 LED, P23=green LED inverted, P24=relay 3 plus button-3 LED, and P26=button-2 LED. "CB3S" is a Wi‑Fi module that hosts the BK7231N chip, exposes GPIO pins, and acts as the smart control board inside Tuya-style wall switches. [#20905212]

3. Why does tuya-cloudcutter fail on some TEEPAO curtain switches, and what wired flashing method works instead?

tuya-cloudcutter failed on this unit, so the successful fallback was direct UART flashing. The board used a CB3S module, and the author had to wire TX and RX, provide 3.3V power, and isolate the RX line from the button controller before flashing. That method worked with BK7231 Easy UART Flasher on Windows and booted OpenBK after restart. [#20902811]

4. What steps are needed to flash OpenBK on a TEEPAO SYS-CS 01 curtain switch using a USB-to-TTL adapter?

Use a 3-step wired UART process. 1. Open the switch, remove the button plate, and access the CB3S board. 2. Connect GND, 3.3V, TX, and RX, then isolate RX from the button controller. 3. Use BK7231 Easy UART Flasher under Windows to write OpenBK and reboot. The thread used an HW-597 USB-to-TTL adapter, plus external 3.3V power because the adapter alone was too weak. [#20902811]

5. How do I isolate the RX line on this TEEPAO curtain switch before flashing, and why does pin 16 of the button control chip have to be desoldered or cut?

You must disconnect the RX path from the button control chip before flashing. On this board, RX was tied to that chip, which blocked new firmware uploads. The working fix was to desolder pin 16 of the button control chip or cut the trace between RX and that chip. The author chose to lift pin 16 only, then flash normally. [#20902811]

6. Which pins on the TEEPAO curtain switch provide 3.3V and GND through the button plate to power board connector during flashing?

Connector pin 1 provides 3.3V and connector pin 2 provides GND during flashing. That let the flasher reuse the board-to-button connector for power and ground, so only TX and RX needed soldered wires. In the documented setup, pin 1 also fed an AMS1117-based 5V-to-3.3V converter used to stabilize power during programming. [#20902811]

7. What do Rel_n on P9 and LED_n on P23 actually control in the OpenBK template for the Teekar Smart Curtain Switch?

Rel_n on P9 is the inverted backlight, and LED_n on P23 is the inverted green LED under button 1. The template originally looked unclear, but the follow-up post confirmed channel 20 as backlight on P9 and channel 30 as the green LED on P23. Because both are inverted, their logic state works opposite to a normal active-high output. [#20905212]

8. How are the buttons, relays, backlight, and green LED mapped on the TEEPAO or Teekar SYS-CS 01 switch?

The hardware map is asymmetric: button 1 is on P10, button 2 on P7, and button 3 on P8. Relay output 1 is on P14, relay output 3 is on P24, backlight is on P9 inverted, the green LED is on P23 inverted, and P26 drives only the center button LED. There is no factory relay for button 2 on this PCB. [#20905212]

9. Why are the hard buttons reversed on my flashed Teekar Smart Curtain Switch, where Open triggers Stop, Stop triggers Down, and Down triggers Up?

The buttons are reversed because the click handlers do not match the physical button pins. In the shared curtain script, the intended mapping was OnClick 8=Start_Opening, OnClick 10=Stop_All, and OnClick 7=Start_Closing. If your faceplate labels differ from that pin order, Open, Stop, and Down will call the wrong actions until you remap the handlers to the actual button positions. [#21236706]

10. How do I fix mixed-up LED behavior and incorrect relay mapping in autoexec.bat for a CB3S BK7231N curtain switch running OpenBK?

Correct both the pin roles and the action script. The working fix in this thread was to keep the LED logic adjustments, then change the relay assignment from P26 to P9. After that change, the user reported the LED behavior was correct and the relay setup also worked. If your template treats P26 as a relay, it will fail because P26 is only the button-2 LED on this board. [#21241604]

11. What is CB3S, and how is it used in Tuya-based smart switches like the TEEPAO curtain controller?

CB3S is the plug-in Wi‑Fi module used as the main smart controller in this switch, and this unit used it with a BK7231N chip. The module exposes the GPIO lines later assigned to buttons, relays, backlight, and LEDs in OpenBK. In practice, CB3S is the board you flash when converting this Tuya-style switch from stock firmware to OpenBK. [#20902811]

12. What is BK7231 Easy UART Flasher, and when should I use it instead of tuya-cloudcutter for flashing OpenBK?

BK7231 Easy UART Flasher is a Windows flashing tool used to program BK7231-based boards over a wired serial connection. Use it when tuya-cloudcutter does not work on your device. In this case, cloudcutter failed, but BK7231 Easy UART Flasher succeeded after RX isolation and proper 3.3V wiring, and OpenBK booted on the first restart. [#20902811]

13. HW-597 with CH340G vs PL2302 for flashing a BK7231N switch: which adapter is more reliable for powering and programming the board?

PL2302 was more reliable for powering this board, while HW-597 with CH340G still worked for programming. The author reported that the HW-597 power output was too weak to run the button plate, so an external 5V-to-3.3V converter was added. With PL2302, the author had not seen that power problem. That makes PL2302 the simpler choice if you want fewer extra parts. [#20902811]

14. How can I use the middle button on the TEEPAO curtain switch to run a custom OpenBK script, such as toggling both relays or another automation?

Use the middle button as a script trigger, not as a physical relay output. The thread states that button 2 has no relay, but OpenBK can still bind that key to a custom command. One suggested use was switching both relays together, and another post pointed to an autoexec script approach for running custom actions from a button event. [#20905212]

15. What extra components are required to add a missing relay output for button 2 on the TEEPAO curtain switch PCB?

You need four hardware parts to add the missing output for button 2: a relay, a clamping diode, a driving transistor, and a resistor for the transistor input. The board also benefits from a proper output terminal, because otherwise you only get a solder point for the relay output wire. That means the PCB supports the idea electrically, but not as a complete factory-finished channel. [#20905212]
AI summary based on the discussion. May contain errors.
%}