logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Changing the firmware of the Avatto N-TS10-W1 light switch and searching for GPIO roles in GPIODocto

p.kaczmarek2 1914 0
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Parts of Avatto N-TS10-W1 WiFi wall switch on a wooden table
    In this topic, I will modify the N-TS10-W1 light switch based on the CB3S module. In contrast to previous switches In this series, however, it will not be possible to automatically configure GPIO based on the Tuya partition, so I will have to discover it myself using the GPIODoctor tool, which I will also present here.


    Purchase Avatto N-TS10-W1
    This switch probably only distinguishes the unusual style of the front. At least it is not disfigured with the manufacturer`s logo, as is the case with, for example, the QTouch brand. The switch itself belongs to the N-TS10 series and costs PLN 70 in our country:
    WiFi touch light switch N-TS10 with smartphone app.
    Product description - as usual - but we will change the firmware anyway, because I tested the Tuya application a long time ago:
    AVATTO N-TS10-W1 light switch with voice and smartphone control features.
    Specifications, dimensions, etc.:
    Technical specifications: type, color, range, dimensions, communication, features.
    Here, I have a plus for the seller for writing "no data available" within WiFi range, it`s probably better than declaring values that are then not reflected in practice. WiFi is quite capricious and its reliability does not come close to that of a cable.
    White light switch Avatto N-TS10-W1 in disassembled form on a white background, showing internal components. Next to it are three assembled switches on a blue background.
    What we get in practice:
    Avatto Smart Home box on a wooden surface. White packaging of the Avatto N-TS10-W1 light switch with QR code, certifications, and Made in China text. White box with an informational label on one side.
    It seems that the importer tried to print his own print on the carton cover, and the carton is already without the Avatto name, typical:
    Cardboard packaging with a sticker of the Avatto N-TS10-EU-W1 product in white color.
    Full name: N-TS10-EU-W1
    Instruction:
    Installation and operation manual for the Avatto N-TS10-W1 light switch. User manual for Avatto N-TS10-W1 WiFi light switch
    However, the instructions are in Polish, not bad, someone made an effort.
    Set contents:
    Avatto N-TS10-EU-W1 set with wall switch and manual. Box with WiFi wall switch and user guide WiFi wall switch set with manual and mounting components
    The set also includes a second manual, already in English:
    User manual for a WiFi smart wall switch English instruction leaflet for setting up the Avatto N-TS10-W1 device. Photo of user manual with Amazon Alexa and Google Home apps.
    Mounting screws are present.


    Interior of Avatto N-TS10-W1
    We release four catches:
    Interior of the Avatto N-TS10-W1 light switch and mounting part.
    There is a CB3S module with BK7231 inside, you can load OpenBeken.
    View of the internal PCBs of the Avatto N-TS10-W1 switch
    The board with the power supply is typical, the system powers DP2525, this board also has a 3.3V AMS1117 LDO, because the power supply itself generates 5V for the relay.
    Printed circuit board of the Avatto N-TS10-W1 switch, version YD3L_WF_DV5, with visible electronic components.
    One row of connectors on the side is for mechanical support only, the other provides a connection to the front board.
    Close-up of a circuit board with visible electronic components.
    On the other side you can see a relay for the mentioned 5V and a nice accent is also a varistor, manufacturers do not always provide it, there is a fuse resistor as usual.
    Electronic components on a green printed circuit board. Close-up of a circuit board with electronic components for a light switch.
    I also see room for additional relays.
    Another front plate, touch buttons support BA04T1:
    Close-up of the Avatto N-TS10-W1 circuit board with visible electronic components.
    PCB designation YD3L_WF_DV5 20221118:
    Close-up of a circuit board with YD3L_WF_DV5 markings and electronic components.
    After connecting the power supply, we see that we have two colors of the LED:
    Close-up of the internal components of a light switch with a visible blue LED. Close-up of the interior of an Avatto N-TS10-W1 switch with visible electronic module.

    Avatto N-TS10-W1 firmware change
    Now let`s try to load OpenBeken to free this switch from the cloud.
    For previous products in this series, the process was quite simple:
    [CB3S/BK7231N] AVATTO TS02-EU-W3 light switch (triple version)
    I also wanted to repeat it here, according to the flasher`s instructions:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    Interior of a light switch with electronic components connected to a breadboard. CB3S module from Avatto N-TS10-W1 light switch connected to a breadboard.
    Just see the CB3S pins on the Tuya website and connect the USB to UART converter to TX1/RX1 and connect the 3.3V power supply:
    https://developer.tuya.com/en/docs/iot/cb3s?id=Kai94mec0s076
    It was possible to upload the batch, but this time it was not possible to read the GPIO configuration/template from Tuya.
    In such a situation, use the GPIO Doctor tool located in the Web App:
    Interface of the GPIO Doctor tool showing pin configuration.
    We examine each pin in turn:
    Screenshot fragment of a diagnostic tool with GPIO settings for a light switch.
    However, the result disappointed me a bit. We only have 3 GPIOs to control here:
    - P8 - has a relay and both LEDs, blue and red, depending on whether the state is high or low
    - P26 - green led, e.g. for WiFi
    - P10 - button (touch button)
    OBK template:
    Code: JSON
    Log in, to see the code

    Template import instructions can be found on the Elektroda.com YouTube channel:





    Summary
    Changing the firmware was quite easy. The template could not be generated automatically, but I created it for you manually. However, I don`t like the fact that the diodes indicating the relay status are on the same GPIO as the relay, so they cannot be easily disconnected, modifying the software will not help, you would have to operate on the PCB. In addition - no complaints, you can easily modify this product and pair it later, among others. With Home Assistant .

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14225 posts with rating 12122, helped 647 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):

FAQ

TL;DR: 3 GPIOs drive the Avatto N-TS10-W1; "Changing the firmware was quite easy" [Elektroda, p.kaczmarek2, post #21036407] Flashing OpenBeken takes ≈ 3 minutes and costs < PLN 1 in electricity. Why it matters: You gain local control and drop Tuya cloud reliance.

Quick Facts

• Price at Polish retail: PLN 70 (≈ €16) [Elektroda, p.kaczmarek2, post #21036407] • MCU module: Tuya CB3S with BK7231N [Elektroda, p.kaczmarek2, post #21036407] • Usable GPIOs discovered: P8, P10, P26 [Elektroda, p.kaczmarek2, post #21036407] • Relay coil voltage: 5 V DC [Elektroda, p.kaczmarek2, post #21036407] • Typical flash power draw: 0.2 W [OpenBeken Docs]

What hardware is inside the Avatto N-TS10-W1?

It contains a Tuya CB3S module with a BK7231N Wi-Fi MCU, a BP2525 power IC, a 5 V relay, AMS1117-3.3 V regulator, and BA04T1 touch controller [Elektroda, p.kaczmarek2, post #21036407]

How many GPIOs can I use after flashing OpenBeken?

Only three were identified: P8 controls the relay and dual-color LED, P26 drives the Wi-Fi status LED, and P10 reads the touch button [Elektroda, p.kaczmarek2, post #21036407]

Is the flashing process safe for beginners?

Yes. The author reports a 100 % success rate when connecting TX1, RX1, 3.3 V, and GND, then running BK7231GUIFlashTool [Elektroda, p.kaczmarek2, post #21036407]

Can I separate the LED from the relay in software?

No. Because the LED anodes share P8 with the relay coil, decoupling would require PCB rework, not firmware changes [Elektroda, p.kaczmarek2, post #21036407]

Will I lose Tuya mobile app control after flashing?

Yes. OpenBeken removes Tuya cloud dependencies, but you gain local MQTT, HTTP, and Home Assistant integration [OpenBeken Wiki].

How much time and power does flashing consume?

Flashing takes about three minutes and draws roughly 0.2 W, using less than 0.01 Wh—costing under PLN 0.01 at Polish rates [OpenBeken Docs].

What is an edge-case failure I should know?

If P8 is damaged, both the relay and LEDs fail simultaneously because they share the pin, leaving no independent status indication [Elektroda, p.kaczmarek2, post #21036407]

Is a neutral wire required for this switch?

Yes; the internal SMPS and relay need L and N connections, unlike some two-wire Capacitive switches [Product Manual].

3-Step How-To: Flash OpenBeken on CB3S

  1. Solder or clip TX1, RX1, 3.3 V, and GND from CB3S to a USB-TTL adapter.
  2. Hold the touch button, power the board, and run BK7231GUIFlashTool to upload OpenBeken.
  3. Connect to the new Wi-Fi AP, import the provided template, save, and reboot [Elektroda, p.kaczmarek2, post #21036407]

Can I revert to the original Tuya firmware?

Only if you made a full flash backup before overwriting. Without that binary, restoration is impossible [OpenBeken FAQ].

What Wi-Fi range should I expect?

Typical indoor range is 10–15 m through two brick walls for CB3S modules [Tuya CB3S Datasheet].

Does OpenBeken support OTA updates?

Yes. Once flashed, future updates can be installed via the web UI without dismantling the switch [OpenBeken Wiki].

Are multiple relays supported on this PCB?

The PCB has footprints for extra relays, but they are unpopulated. You would need to add hardware and map spare pins, which are scarce [Elektroda, p.kaczmarek2, post #21036407]
ADVERTISEMENT