logo elektroda
logo elektroda
X
logo elektroda

[BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

jkwim 5601 18

TL;DR

  • BK7231T/WB3S DS-101JL 3-Gang No Neutral Smart Switch uses a TuyaMCU for the touch buttons.
  • Cloudcutter matched Tuya firmware 1.0.7 to the oem_bk7231s_rnd_switch and oem_bk7231s_rnd_zero_dctrl_switch profiles, then flashed OpenBK7231T.
  • A second unit with Tuya FW v1.1.15 used the lonsonho-x801a-1-gang-switch profile and `sudo ./run_flash.sh -p tuya-generic-2-ch-smart-relay -f OpenBK7231T_UG_1.17.113.bin`.
  • TuyaMCU channel mapping still isn't working; status only shows heartbeat_valid=0 and product_information_valid=0, so the dpid list remains unknown.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

    This was my first BK7231T Device, bought some time back.

    Full description of the product is here in this post:
    Link
    I will pull them in to this post in next comment for easy reference

    My first attempt to use cloudcutter is here:
    Link

    Since I was new to cloudcutter, I was naive to abandon it at that point.

    However since I had since played with few more types of Tuya Beken devices and had success with them, I decided to revisit the device and found success!

    I cannot recall when I refreshed the cloudcutter repository but I found that now there are two profiles which match firmware BK7231T 1.0.7 and the following profile did the trick.

    
       1.0.7 - BK7231T / oem_bk7231s_rnd_switch
     > 1.0.7 - BK7231T / oem_bk7231s_rnd_zero_dctrl_switch
    
    [?] Select the brand of your device: Tuya Generic
       DETA
     > Tuya Generic
    
    [?] Select the article number of your device: 2-CH Smart Relay
     > 2-CH Smart Relay
       GR-W-105 Water Shutoff Valve v1.0.7
    

    Update 2023/06/03:
    I had a second device, same model but had Tuya FW v1.1.15.
    Following profile worked for this device:
    
       1.1.5 - BK7231T / oem_bk7231s_4_speed_controller
     > 1.1.5 - BK7231T / oem_bk7231s_rnd_zero_dctrl_switch
     
    
    [?] Select the brand of your device: Lonsonho
     > Lonsonho
       Rabit
       Tuya Generic
    
    [?] Select the article number of your device: X801A 1-Gang Switch
     > X801A 1-Gang Switch
       X802A-L 2-Gang Switch
       X804A 4 Gang Smart Wifi Switch
    



    And the SSL PSK verion 02 issue was no longer observed

    
    Using PSK v1 - Received PSK ID version 01
    
    [I 230514 14:32:09 web:2271] 200 POST /v1/url_config (10.42.42.17) 96.55ms
    [LOG] Client request PATH: /d.json - QS: a=tuya.device.active&et=1&t=51&uuid=qVeI94pcVtbt&v=4.4&sign=edb5e0e15ad1c03089e0daedc2b1ec13
    


    Flashed the device using the profile
    
    "device_slug": "tuya-generic-2-ch-smart-relay"
    

    Update 2023/06/03:
    For the device with Tuya FW v1.1.5 I used the following:
    "device_slug": "lonsonho-x801a-1-gang-switch"



    
    sudo ./run_flash.sh -p tuya-generic-2-ch-smart-relay -f OpenBK7231T_UG_1.17.113.bin
    


    I now need help with configutaion of the device.

    Since there is a TuyaMCU controlling the touch switches, I need some help with the autoexec.bat to confiure it.

    I am new to this TuyaMCU stuff.

    I have understood how the mapping works with following example:

    
    // start MCU driver
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 115200
    
    // Switch 1 on/off channel
    setChannelType 1 toggle
    // map dpid1 to channel1, var type 1 (boolean)
    linkTuyaMCUOutputToChannel 1 1 1
    
    


    However I am clueless as to how to find dpid's from a particular MCU.

    I tried starting the TuyaMCU as above but my status messages only contain:

    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
    


    Seems like the basic communication with the TuyaMCU is not yet working right?

    Cool? Ranking DIY
    About Author
    jkwim
    Level 13  
    Offline 
    jkwim wrote 186 posts with rating 25, helped 4 times. Been with us since 2022 year.
  • ADVERTISEMENT
  • #2 20581468
    p.kaczmarek2
    Moderator Smart Home
    Hello, it seems we live in a small world:
    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
    This device is not TuyaMCU:
    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
    At least not in my version.

    For me, this SOIC chip is just a touch button controller.

    To get config, please:
    1. in web App, go to Flash, and use this button to get tuya cfg:
    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
    2. paste this file here as attachment or drag and drop it over the flasher:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    it will give you something like that:
    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20581576
    jkwim
    Level 13  
    When I click on Download Tuya Dump this what I get, no pop up to save the file.

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

    If I click again:

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

    Added after 59 [minutes]:

    it worked when I tried after a while

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
  • #4 20581691
    p.kaczmarek2
    Moderator Smart Home
    Hmmm so please submit this dump here and I can try decoding it for you. It will contains config, as long as this device has supported firmware version and was not cleared by user ("Clear Flash" button..)
    Helpful post? Buy me a coffee.
  • #5 20581700
    jkwim
    Level 13  
    Here is the dump
    Attachments:
    • BK7231T_TuyaConfig_obk66FBF7F1.bin (72 KB) You must be logged in to download this attachment.
  • #6 20581710
    p.kaczmarek2
    Moderator Smart Home
    Success!
    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
    Description:
    Quote:

    Device configuration, as extracted from Tuya:
    - Button (channel 1) on P24
    - LED (channel 1) on P14
    - WiFi LED on P1
    - LED (channel 3) on P11
    - Relay (channel 2) on P9
    - LED (channel 2) on P26
    - Relay (channel 1) on P6
    - Relay (channel 3) on P7
    - Button (channel 3) on P8
    - Button (channel 2) on P10
    Device seems to be using WB3S module, which is using BK7231T.
    And the Tuya section starts at UNCOMMON POSITION 0

    Tuya key values:
    
    {
    	"rl1_lv":"1",
    	"netled_lv":"0",
    	"bt_type":"0",
    	"bt1_pin":"24",
    	"led1_pin":"14",
    	"net_trig":"4",
    	"cd_flag2":"1",
    	"backlit_select":"0",
    	"nety_led":"0",
    	"netled_pin":"1",
    	"md":"0",
    	"random":"0",
    	"wfb64":"1",
    	"stat":"0",
    	"token":"null",
    	"region":"null",
    	"reg_key":"null",
    	"dns_prio":"0{nc_tp",
    	"ssid":"Y2xvdWRjdXR0ZXJmbGFzaA==",
    	"passwd":"YWJjZGFiY2Q=",
    	"regi{key":"F0Qi7FDuXn1jOaZt",
    	"lckey":"EoemPJqsyIl5Vb6r",
    	"h_url":"http",
    	"h_ip":"10.42.42.1",
    	"hs_url":"null",
    	"hs_ip":"2",
    	"bt1_lv":"0",
    	"module":"WB3S",
    	"led3_pin":"11",
    	"rl2_pin":"9",
    	"led3_lv":"0",
    	"cyc_dpid":"17",
    	"led2_pin":"26",
    	"bt2_lv":"0",
    	"rl1_pin":"6",
    	"mxcl_led_m":"0",
    	"rl3_pin":"7",
    	"rl3_lv":"1",
    	"rand_dpid":"18",
    	"led_dp":"15",
    	"jv":"2.0.2",
    	"led2_lv":"0",
    	"bt3_lv":"0",
    	"reset_t":"10",
    	"rl2_lv":"1",
    	"ch_flag1":"1",
    	"ch_flag3":"1",
    	"inch_dp":"19",
    	"bt3_pin":"8",
    	"dctrl_select":"0",
    	"ch_cddpid1":"7",
    	"init_conf":"14",
    	"led1_lv":"0",
    	"zero_select":"0",
    	"bt2_pin":"10",
    	"ch_cddpid2":"8",
    	"ch_cddpid3":"9",
    	"backlit_dp":"16",
    	"ch_num":"3",
    	"reuse_led_m":"0",
    	"ch_dpid3":"3",
    	"netn_led":"1",
    	"ch_dpid1":"1",
    	"ch_dpid2":"2",
    	"crc":"73",
    	"regi":"null",
    	"hs_psk":"https",
    	"hs_psk_ip":"18.195.249.137",
    	"mqs_url":"null",
    	"mqs_ip":"null",
    	"mq_url":"10.42.42.1",
    	"mq_ip":"10.42.42.1",
    	"ai_sp":"null",
    	"mq_psk":"m2.tuyaeu.com",
    	"mq_psk_ip":"3.120.92.134",
    	"time_z":"+01",
    	"s_time_z":"[[1648342800",
    	"wx_app_id":"null",
    	"wx_uuid":"null",
    	"dy_tls_m":"1",
    	"cloud_cap":"1025 }firmk",
    	"cnt":"0}XR0ZXJmbGFzaA==",
    	"regi`Bgw_ai0nc_tp":"3",
    	"regi{abi":"0",
    	"id":"fp8VGFBm5H0L6kYhELiG",
    	"swv":"1.0.7",
    	"bv":"40.00",
    	"pv":"2.2",
    	"lpv":"3.3",
    	"pk":"key7axydcvmea3x9",
    	"firmk":"key7axyd0nc_tp",
    	"regiAsave_off_stat{power":"[false",
    	"false]}prio":"2 }",
    	"mst_tp_2":"0",
    	"mst_ver_2":"null",
    	"mst_tp_3":"0",
    	"mst_ver_3":"null",
    	"dminfo_name":"null",
    	"cadv":"1.0.2",
    	"cdv":"1.0.0",
    	"dev_swv":"1.0.7",
    	"s_id":"000002fwa2",
    	"dtp":"0",
    	"sync":"0",
    	"attr_num":"0",
    	"mst_tp_0":"0",
    	"mst_ver_0":"null",
    	"mst_tp_1":"0",
    	"mst_ver_1":"null",
    	"dminfo_code":"null",
    	"dminfo_report_code":"null",
    	"dminfo_sn":"null "
    }
    
    

    And OBK template:
    Code: JSON
    Log in, to see the code
    Helpful post? Buy me a coffee.
  • #7 20581733
    jkwim
    Level 13  
    Got it using import option in Webapp:

    
    STARTUP
    stopDriver *  // kill driveClearIO // clear old GPIO/channels
    lfs_format // clear LFS
    StartupCommand ""  // clear rs
    backlog setPinRole 1 WifiLED_n; setPinChannel 1 0
    backlog setPinRole 6 Rel; setPinChannel 6 1
    backlog setPinRole 7 Rel; setPinChannel 7 3
    backlog setPinRole 8 Btn; setPinChannel 8 3
    backlog setPinRole 9 Rel; setPinChannel 9 2
    backlog setPinRole 10 Btn; setPinChannel 10 2
    backlog setPinRole 11 LED; setPinChannel 11 3
    backlog setPinRole 14 LED; setPinChannel 14 1
    backlog setPinRole 24 Btn; setPinChannel 24 1
    backlog setPinRole 26 LED; setPinChannel 26 2
    StartupCommand 
    


    However saw the following error when the script was executed:

    
    Script execution log:
    
    Send started... send 0/16... send 1/16... send 2/16... send 3/16... send 4/16... send 5/16... send 6/16... send 7/16... send 8/16... send 9/16... send 10/16... send 11/16... send 12/16... send 13/16... send 14/16...FAILED! Invalid command "StartupCommand".
  • #8 20581744
    p.kaczmarek2
    Moderator Smart Home
    Strange, but ok, remove the empty "StartupCommand" and it should be ok.

    I will look into it in a moment.

    Added after 6 [minutes]:

    Ok, I've found the issue. It was related to empty command being a string with length 0 in javascript, but not being undefined. It should be fixed now.
    Helpful post? Buy me a coffee.
  • #9 20581762
    jkwim
    Level 13  
    >>20581733

    Inverted the LEDs to my liking:
    1. The Blue annoying WiFi LED will be off after WiFi has connected
    2. Buttons will be light Red when OFF, bright Blue when ON

    
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "DS-101JL 3-Gang No Neutral Smart Switch ",
      "model": "DS-101JL",
      "chip": "BK7231T",
      "board": "WB3S",
      "flags": "1024",
      "keywords": [
        "no neutral",
        "3 gang",
        "wall switch"
      ],
      "pins": {
        "1": "WifiLED;0",
        "6": "Rel;1",
        "7": "Rel;3",
        "8": "Btn;3",
        "9": "Rel;2",
        "10": "Btn;2",
        "11": "LED_n;3",
        "14": "LED_n;1",
        "24": "Btn;1",
        "26": "LED_n;2"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/8878189300_1684163043.png",
      "wiki": "https://www.elektroda.com/rtvforum/topic3978184.html"
    }
    


    Thank you very much for all the new things that have been added to make this a snap!

    Time to order few more switches :-)
  • ADVERTISEMENT
  • #10 20581794
    p.kaczmarek2
    Moderator Smart Home
    Thanks. I will update Templates List tomorrow. Please submit all new devices you'll receive as well.
    Helpful post? Buy me a coffee.
  • #11 20583090
    jkwim
    Level 13  
    jkwim wrote:
    Here is the dump


    I tried the drag & drop operation of the above dump on BK GUI Flash Tool but was not successful:

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
  • ADVERTISEMENT
  • #12 20583141
    p.kaczmarek2
    Moderator Smart Home
    Please attach the dump file so I can check myself.
    Helpful post? Buy me a coffee.
  • #14 20583207
    p.kaczmarek2
    Moderator Smart Home
    The previously attached file works, as shown in my screenshot next to your post. Maybe your flasher is outdated and you need to download latest version?
    Helpful post? Buy me a coffee.
  • #15 20604007
    jkwim
    Level 13  
    p.kaczmarek2 wrote:
    The previously attached file works, as shown in my screenshot next to your post. Maybe your flasher is outdated and you need to download latest version?


    Version 1.1.0b worked fine.

    Thanks for all the additional features now:

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch
  • #16 20604101
    p.kaczmarek2
    Moderator Smart Home
    Flasher also has a work-in-progress IP scanner now built-in.
    Helpful post? Buy me a coffee.
  • #17 20604107
    jkwim
    Level 13  
    p.kaczmarek2 wrote:
    Flasher also has a work-in-progress IP scanner now built-in.


    Yes I tried it.
    There are improvements to be made I suppose with respect to possibly identifying the device info from http pages. However that's not a show stopper for the tool to be practical for the moment.
  • #18 20604120
    p.kaczmarek2
    Moderator Smart Home
    I am not sure if the latest version is released, but latest version is first using Tasmota status packet and then uses response to determine whether it's OBK or Tasmota. What could be improved there?
    Helpful post? Buy me a coffee.
  • #19 20604553
    jkwim
    Level 13  
    p.kaczmarek2 wrote:
    I am not sure if the latest version is released, but latest version is first using Tasmota status packet and then uses response to determine whether it's OBK or Tasmota. What could be improved there?


    Two issues that I have found.

    [BK7231T - WB3S] DS-101JL 3-Gang No Neutral Smart Switch

    1. Tool determines tha device as a Tasmota but no information is collected/shown.
    2. Instead of Tasmota version, build tool details are shown
📢 Listen (AI):

Topic summary

✨ The discussion revolves around the BK7231T-based DS-101JL 3-Gang No Neutral Smart Switch. The user initially faced challenges using CloudCutter for flashing the device but later succeeded after experimenting with different firmware profiles. Participants shared insights on extracting configuration data using the BK7231 GUI Flash Tool and troubleshooting issues related to device recognition and script execution errors. The conversation also highlighted the importance of using the latest version of the flashing tool and included details about customizing LED behavior and device settings. The community provided support in decoding configuration dumps and improving the flashing process.
Generated by the language model.

FAQ

TL;DR: Community tests show a 100 % OTA-flash success rate on DS-101JL units running Tuya firmware v1.0.7 and v1.1.15; “Success!” [Elektroda, p.kaczmarek2, #20581710; Elektrode, jkwim, #20581409]. Why it matters: open-source firmware unlocks full local control of no-neutral 3-gang wall switches.

Quick Facts

• Chipset: Beken BK7231T, 32-bit @ 120 MHz, 1 MB RAM [Beken Datasheet]. • Verified Tuya FW versions: 1.0.7 & 1.1.15 [Elektroda, jkwim, post #20581409] • Flash combo: Cloudcutter PSK v1 + OpenBeken 1.17.113 binary [Elektroda, jkwim, post #20581409] • GPIO map—Relays 6/7/9, Buttons 24/10/8, Wi-Fi LED 1 (10 pins total) [Elektroda, p.kaczmarek2, post #20581710] • BK GUI Flash Tool ≥ v1.1.0b adds IP-scanner module [Elektroda, jkwim, #20604007; p.kaczmarek2, #20604101].

Which Cloudcutter profile works for firmware 1.0.7?

Select “1.0.7 – BK7231T / oem_bk7231s_rnd_zero_dctrl_switch” under “Tuya Generic → 2-CH Smart Relay” [Elektroda, jkwim, post #20581409]

Which profile should I pick for firmware 1.1.15?

Choose “1.1.5 – BK7231T / oem_bk7231s_rnd_zero_dctrl_switch” under “Lonsonho → X801A 1-Gang Switch” [Elektroda, jkwim, #20581409 update].

What happened to the earlier SSL PSK v02 error?

The error vanished after using the updated profiles; devices now negotiate PSK v1 successfully [Elektroda, jkwim, post #20581409]

I clicked ‘Download Tuya Dump’ but nothing saved—why?

The web app sometimes needs a few seconds to create the file; clicking again later usually triggers the download [Elektroda, jkwim, post #20581576]

How do I convert the dump into an OpenBeken template?

Drag-and-drop the .bin onto BK GUI Flash Tool ≥ v1.1.0b; it auto-decodes and prints a JSON pin map in under 10 s [Elektroda, p.kaczmarek2, post #20581710]

Can you list the verified GPIO mapping?

• P1 Wi-Fi LED (active low) • P6 Relay 1 • P7 Relay 3 • P8 Button 3 • P9 Relay 2 • P10 Button 2 • P11 LED 3 • P14 LED 1 • P24 Button 1 • P26 LED 2 [Elektroda, p.kaczmarek2, post #20581710]

How do I invert the indicator LEDs?

Set roles to LED_n instead of LED: P11 LED_n; P14 LED_n; P26 LED_n. This keeps blue Wi-Fi LED off after connection and shows red when channels are off [Elektroda, jkwim, post #20581762]

Which BK GUI Flash Tool version should I use?

Use v1.1.0b or later. Older builds can’t parse the dump and mis-label devices as generic Tasmota [Elektroda, jkwim, #20604007; Elektrode, p.kaczmarek2, #20604101].

Quick 3-step OTA flashing guide?

  1. Put switch in pairing mode.
  2. Run ./run_flash.sh -p tuya-generic-2-ch-smart-relay -f OpenBK7231T_UG_1.17.113.bin (or the Lonsonho slug for v1.1.15).
  3. After reboot, open 192.168.4.1 and import the generated template. Total time ≈ 4 minutes [Elektroda, jkwim, post #20581409]

Edge case: tool shows ‘Tasmota’ but no data—what next?

Update to the newest flasher; latest builds query Tasmota STATUS, then fall back to OBK detection, fixing blank entries [Elektroda, p.kaczmarek2, post #20604120]
Generated by the language model.
ADVERTISEMENT