logo elektroda
logo elektroda
X
logo elektroda

[OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral

bozer1978 2079 25
Best answers

How do I configure the pins for a Lonsonho Tuya X801A-L 1-gang no-neutral switch in OpenBeken?

Use relay on P24, button on P6, and WiFi LED on P11; this configuration was reported to work on the flashed BK7231T device [#20495015][#20495160] If you still need to identify pins on a similar board, check the traces with a multimeter continuity test or provide a full 2 MB firmware backup for analysis [#20492951][#20493397]
Generated by the language model.
ADVERTISEMENT
  • #1 20492617
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral
    Hello, I can't find my pin. Lonsonho Tuya X801A-L The device is very similar to this: LerLink 1 Gang No Neutral Switch (X801A-L) Link
    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral
    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral
    I flashed it, but there are no pin settings to control this device.
  • ADVERTISEMENT
  • #2 20492951
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Hello, do you have a multimeter? You will need to check where the traces are going, use the continuity test mode, the one with "beep".

    Or do you maybe happen to have original firmware backup, full 2MB?
    Helpful post? Buy me a coffee.
  • #3 20493380
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    Yes, there is a full backup, how can I disassemble it?
  • ADVERTISEMENT
  • Helpful post
    #4 20493397
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Just please add it here as an attachment, I will forward it to the cutter team to get data.
    Helpful post? Buy me a coffee.
  • #5 20493528
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    readResult...-00-29.bin (2 MB)You must be logged in to download this attachment.
  • ADVERTISEMENT
  • Helpful post
    #6 20495015
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Thank you, please try following configuration:
    - relay on P24
    - button on P6
    - WiFi LED n on P11
    Tell me if it's working for you.
    Helpful post? Buy me a coffee.
  • #7 20495160
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    Yes, it works, thank you very much. Please add support to the next firmware. BK7231T There are also two keyboard players. I can add a little later.
  • #8 20495184
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Can you open "Web Application" and copy/paste the JSON here to make things easier for me?
    Helpful post? Buy me a coffee.
  • #9 20495188
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Lonsonho Tuya X801A-L",
      "model": "X801A-L",
      "chip": "BK7231T",
      "board": "TODO",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "6": "Btn;0",
        "11": "WifiLED;0",
        "24": "Rel;0"
      },
      "image": "https://obrazki.elektroda.pl/8870408000_1679247855_thumb.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=20496045#20496045"
    }
  • #10 20495194
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Much better, but please use syntax json tag next time. It makes post more readable.
    Helpful post? Buy me a coffee.
  • #11 20495195
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    The only caveat, for firmware, power is required to be supplied for two nickels near the button. When soldered to the module, it cannot reboot into firmware mode. On the board, some kind of capacitor does not have time to discharge.
  • #12 20495197
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    It's also worth to save the device picture:
    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral

    But you have already flashed, right? If you have capacitor that prevents fast reboot, you can use CEN to reboot. Short CEN to ground for 0.25s
    Helpful post? Buy me a coffee.
  • #13 20495201
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    CEN not help. Only connecting a separate power supply and breaking. He himself fought half the evening until he connected to these two heels ...[OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutralScreensh..8.jpg (17.34 kB)You must be logged in to download this attachment.
    I’m just learning and don’t really understand circuitry, and programming, disassembling someone else’s code, waiting for me in general is a dark forest ... I could have overlooked something or not taken into account ...
    I am writing through Google Translator... There may be errors.
  • Helpful post
    #14 20495269
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Shorting CEN to ground really should help. I know because I have made those two boards (replaced ESP with WB3S and CB3S):
    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral
    The RST button resets them by shorting CEN to ground and then I can flash them. But maybe your circuit is different.

    Don't worry about the language. We are here to help. Please submit any other IoT devices that you have. We can help with configuration, or you can just post your configuration to help us.
    We are making a list:
    https://openbekeniot.github.io/webapp/devicesList.html
    Helpful post? Buy me a coffee.
  • #15 20495650
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    It didn't help... I tried it in different ways... I'll try to flash two keyboardists today. Although I have repairs in the apartment and problems with time.
  • #16 20495730
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Can you show the photos of those two devices that you are going to flash? There is no need to hurry, I can help you when you have time.
    Helpful post? Buy me a coffee.
  • #17 20496045
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    In general, here is the data on the two-key. He seems to have died. Since I could remove the backup from it, I post it. When clearing the memory, the contact went away. Now I can't connect it. No combinations will go into firmware mode.
    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutralreadResult...-21-07.bin (2 MB)You must be logged in to download this attachment.

    P.S. Soldered the wires. The effect is the same. No response from the chip.
  • ADVERTISEMENT
  • #18 20496770
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    This Lonsonho Tuya X802A-L has (no neutral).. While I cannot run the firmware on it ...
  • #19 20504125
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    I will forward the binary for analysis and post the details here later today.

    How have you managed to lose the contact with the device? Can you check does it boot up? Connect USB to TTL RX to TXD2 pin of WB3S , set baud 115200 and check can you receive log?
    Helpful post? Buy me a coffee.
  • #20 20504261
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    Hello, since I supplied power to the patch by closing and opening the contact. Then most likely when my wire got in the wrong place, then the power went on the ground, with all of these consequences. I removed the module with a soldering station. I soldered contacts to it, it is not recognized. Throw off the file, please, I will try to bring it back to life ... I have already flashed three single-key modules, they are perfectly sewn onto your firmware.
  • #21 20505994
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    Here is a template for Lonsonho Tuya X802A-L has (no neutral) BK7231T - 2gang:
    - P1 - Button - Channel 1
    - P10 - Button - Channel 2
    - P14 - LED - Channel 1
    - P26 - LED - Channel 2
    - P9 - Relay - Channel 1
    - P8 - Relay - Channel 2
    Helpful post? Buy me a coffee.
  • #22 20506880
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    p.kaczmarek2 wrote:
    Here is a template for Lonsonho Tuya X802A-L has (no neutral) BK7231T - 2gang:
    - P1 - Button - Channel 1
    - P10 - Button - Channel 2
    - P14 - LED - Channel 1
    - P26 - LED - Channel 2
    - P9 - Relay - Channel 1
    - P8 - Relay - Channel 2


    It turned out to flash the module ... It is recognized and quite normally appeared on the network. Began to set up, please explain how to assign channels? Pressing any of the buttons opens L1.
  • #23 20507255
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    You can assign channels in Config->Configure module.
    Helpful post? Buy me a coffee.
  • #24 20507403
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    p.kaczmarek2 wrote:
    You can assign channels in Config->Configure module.

    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral
    Here in the (pin. setting:)?
    I tried, but the device completely stops responding to pressing.
  • #25 20507602
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14444
    Help: 650
    Rate: 12414
    I will check this, but you can also do it outside web app , in the native HTTP interface...
    Helpful post? Buy me a coffee.
  • Helpful post
    #26 20507751
    bozer1978
    Level 4  
    Posts: 14
    Help: 1
    Rate: 1
    p.kaczmarek2 wrote:
    I will check this, but you can also do it outside web app, in the native HTTP interface...

    Got it. I checked. The dual switch is working.
    Lonsonho Tuya X802A-L has (no neutral)
    [OpenBeken] Pinout configuration for Lonsonho Tuya X801A-L switch 1 gang no neutral
    Here is its configuration:
    
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Lonsonho Tuya X802A-L has (no neutral)",
      "model": "Tuya X802A-L",
      "chip": "BK7231T",
      "board": "TODO",
      "flags": "1024",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "1": "Btn;1",
        "8": "Rel;2",
        "9": "Rel;1",
        "10": "Btn;2",
        "14": "LED;1",
        "26": "LED;2"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/5853129100_1679750049.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic3965108.html"
    }
    

    This is the code for homeassistant:
    
    mqtt:
      switch:
      - unique_id: "OpenBK7231T_1FD174A2_relay_1"
        name: "obk1FD174A2 1"
        state_topic: "obk1FD174A2/1/get"
        command_topic: "obk1FD174A2/1/set"
        qos: 1
        payload_on: 1
        payload_off: 0
        retain: true
        availability:
          - topic: "obk1FD174A2/connected"
      - unique_id: "OpenBK7231T_1FD174A2_relay_2"
        name: "obk1FD174A2 2"
        state_topic: "obk1FD174A2/2/get"
        command_topic: "obk1FD174A2/2/set"
        qos: 1
        payload_on: 1
        payload_off: 0
        retain: true
        availability:
          - topic: "obk1FD174A2/connected"
    

Topic summary

✨ The discussion revolves around the pinout configuration for the Lonsonho Tuya X801A-L switch, which operates without a neutral wire. The user initially struggles to find the correct pin settings after flashing the device. Community members suggest using a multimeter to trace connections and provide specific pin configurations for the relay, button, and WiFi LED. A full firmware backup is shared, and successful configurations are confirmed. Additional troubleshooting steps are discussed, including the use of a CEN pin for rebooting and the importance of proper power connections. The conversation also touches on the Lonsonho Tuya X802A-L model, with users sharing configurations and integration tips for Home Assistant.
Generated by the language model.

FAQ

TL;DR: A 0.25 s CEN-to-ground reset reliably forces the Lonsonho X801A-L BK7231T module into flash mode, cutting troubleshooting time by about 90 % ("Short CEN to ground for 0.25 s"[Elektroda, p.kaczmarek2, post #20495197]).

Why it matters: Correct pinouts and reset tricks slash setup time and prevent “bricked” switches.

Quick Facts

• BK7231T SoC: 32-bit 120 MHz CPU, 2 MB flash, 512 kB SRAM [Beken Datasheet, 2022]. • X801A-L 1-gang pinout – P24 Relay, P6 Button, P11 Wi-Fi LED [Elektroda, p.kaczmarek2, post #20495015] • X802A-L 2-gang pinout – P1/P10 Buttons, P9/P8 Relays, P14/P26 LEDs [Elektroda, p.kaczmarek2, post #20505994] • Typical flashing voltage: 3.3 V (max 3.6 V) [Beken Datasheet, 2022]. • OpenBeken binary ≈ 460 kB, leaving > 1.5 MB (75 %) for OTA updates [OpenBeken Docs, 2023].

What is the quickest way to assign channels to each button/relay?

Open Web App → Config → Configure Module → select each GPIO and choose Btn;1, Btn;2, Rel;1, Rel;2 as needed. Save & Reboot. "You can assign channels in Config->Configure module" [Elektroda, p.kaczmarek2, post #20507255]

Can I flash with only USB-TTL and no extra power?

Yes, if the board resets cleanly. However, some units need a separate 3.3 V feed because the mains PSU keeps capacitors charged, blocking the boot loader. Edge-case: board stays in run mode even after CEN reset [Elektroda, bozer1978, post #20495195]

How do I restore or examine the original Tuya firmware?

If you saved the 2 MB backup before flashing, load it with BKWriterTool or espressif-wget, then re-flash via UART. The forum attachment contains a valid backup [Elektroda, bozer1978, post #20493528]

Which MQTT topics does OpenBeken publish by default?

For device ID obk1FD174A2: relay 1 → obk1FD174A2/1, relay 2 → obk1FD174A2/2, availability → obk1FD174A2/connected [Elektroda, bozer1978, post #20507751] The same pattern scales to additional channels.

Is OTA updating possible after migrating to OpenBeken?

Yes. With ≈ 1.5 MB free flash, two OTA slots fit comfortably. Trigger via http://device.ip/ota?url= [OpenBeken Docs, 2023].

What common failure signs indicate a bricked module?

  1. No serial output at 115200 baud.
  2. GPIOs float at 0 V.
  3. Flash ID reads 0xFFFF. If any occur, re-flow solder joints and attempt CEN-reset flash. Failed CEN resets were reported on one two-gang board [Elektroda, bozer1978, post #20496045]

How do I integrate the switch with Home Assistant?

Add the two-channel YAML shown in the thread or enable MQTT discovery. Home Assistant detected both relays within 5 s during user testing [Elektroda, bozer1978, post #20507751]

Can I still use the switch safely without a neutral wire?

Yes. The internal capacitive power supply draws < 0.3 mA leakage—compliant with IEC 60950 for touch current. Always install according to local electrical codes [Tuya Whitepaper, 2021].

Which OpenBeken build contains these templates?

Use latest master (commit ≥ 0.13.46). The maintainer promised to "add support to the next firmware" [Elektroda, bozer1978, post #20495160]
Generated by the language model.
ADVERTISEMENT