logo elektroda
logo elektroda
X
logo elektroda

[BK7231] [WB3S] Tuya Generic S09 Temperature/Humidity/Clock/IR - LCD, TuyaMCU, 5V USB [AHT20]

divadiow 2382 11
ADVERTISEMENT
  • #1 20959091
    divadiow
    Level 34  
    First seen mentioned in this thread https://www.elektroda.com/rtvforum/topic3819498.html where 3 variants appear to have been discussed:

    - TH06 - temp/humidity/clock - no IR
    - S09 eMylo - temp/humidity/clock - IR
    - S09 Generic - temp/humidity/clock - IR (the device in this new thread)

    My device was purchased from https://www.aliexpress.com/item/1005005119038112.html

    Screenshot of an AliExpress listing for a smart IR remote with temperature and humidity sensor.

    Packaging and externals
    View of S09 device packaging with LCD display and technical specifications. Product label with printed barcode and description of a smart WiFi remote control. Components of the IR remote control set with temperature and humidity display Smart IR remote control with temperature and humidity sensor S09 with manual and packaging Device displaying temperature, humidity, and time, with a user manual.
    Back of S09 device with temperature and humidity sensor, along with USB cable.

    Upon opening you can see the BK7231T based WB3S module, as well as the TuyaMCU and LCD controller controller chips and then the tiny AHT20 sensor. Silkscreen text S09Y-WB3S-AHT20_v1.1: 2023-08-11

    WB3S module on a PCB with visible QR code and CE, RoHS markings. Close-up of an HLOTHK HT1621B integrated circuit on a circuit board. Close-up of a PCB with visible microchips and track labels. Interior of an electronic device with exposed components, including the WB3S module. Close-up of a printed circuit board with electronic components. View of the S09Y-WB3S-AHT20_V1.1 module with components mounted on the board. Interior of a device with a WB3S module and other electronic components. Black plastic device cover with visible mounting features and holes.

    Unlike experiences in the TH06 thread with other S09s, I was not successful flashing dumping and flashing the Beken chip without cutting TXD1/RXD1 to the TuyaMCU, despite many attempts. Pogo pins and then soldering, different USB-TTL adaptors, different cables. No joy. Using the TuyaMCU Analyser I could see the MCU sending and receiving commands, so it seemed this was getting in the way.

    I confirmed continuity between TXD1/RXD1 and the MCU pins with a multimeter and with the aid of this image from the TH06 thread.
    Close-up of an electronic board with a WB3S module labeled with its model and serial number.

    I cut the two pins at the MCU end using some small pincer pliers, though maybe desoldering and lifting is a nicer solution.
    Close-up of a circuit board with integrated circuits and pins labeled MCU_RX.

    with those gone, retrieving fw backup, boot log and flashing OpenBeken was easy

    
    V:BK7231S_1.0.5
    CPSR:000000D3
    R0:1D6FFE41
    R1:2213F356
    R2:F9ABF3BE
    R3:7B3DE02C
    R4:7F1E3ABA
    R13:EFEE5DFF
    R14(LR):47E73BE7
    ST:15968C66
    J 0x10000
    prvHeapInit-start addr:0x41f8f8, size:132872
    [01-01 18:12:15 TUYA Info][mqc_app.c:175] mqc app init ...
    [01-01 18:12:15 TUYA Info][sf_mqc_cb.c:42] register mqc app callback
    [01-01 18:12:15 TUYA Debug][mqc_app.c:118] mq_pro:5 mqc_handler_cnt:1
    [01-01 18:12:15 TUYA Debug][mqc_app.c:118] mq_pro:31 mqc_handler_cnt:2
    [01-01 18:12:15 TUYA Debug][uni_thread.c:215] Thread:sys_timer Exec Start. Set to Running Status
    [01-01 18:12:15 TUYA Debug][log_seq.c:732] read from uf. max:1 first:0 last:0
    [01-01 18:12:15 TUYA Debug][svc_online_log.c:288] svc online log init success
    [01-01 18:12:15 TUYA Err][tuya_ws_db.c:314] kvs_read fails gw_bi -1
    [01-01 18:12:15 TUYA Err][ws_db_gw.c:111] gw base read fails -935
    [01-01 18:12:15 TUYA Debug][tuya_bt_sdk.c:89] ty bt cmmod register finish 1
    [01-01 18:12:15 TUYA Debug][tuya_ble_api.c:301] ble sdk inited
    !!!!!!!!!!tuya_bt_port_init
    [01-01 18:12:15 TUYA Debug][tuya_ble_api.c:337] ble sdk re_inited
    [01-01 18:12:15 TUYA Notice][tuya_bt_sdk.c:130] ty bt sdk init success finish
    [01-01 18:12:15 TUYA Debug][tuya_device.c:91] < TUYA IOT SDK V:1.0.6 BS:40.00_PT:2.2_LAN:3.3_CAD:1.0.2_CD:1.0.0 >
    < BUILD AT:2021_01_29_19_13_10 BY embed FOR ty_iot_wf_bt_sdk_bk AT bk7231t >
    IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 SHUTDOWN_MODE:0 LITTLE[01-01 18:12:15 TUYA Debug][tuya_device.c:92] bk7231t_common_user_config_ty:1.1.80
    [01-01 18:12:15 TUYA Notice][simple_flash.c:432] key_addr: 0x1ee000   block_sz 4096
    [01-01 18:12:15 TUYA Notice][simple_flash.c:500] get key:
    0xcb 0x4e 0x3e 0xa4 0x0 0x30 0x9d 0xab 0x65 0x6d 0x8d 0xbf 0xe4 0xb9 0x3f 0x35
    [01-01 18:12:15 TUYA Notice][tuya_main.c:334] **********[bk7231t_common_user_config_ty] [1.1.80] compiled at Apr  2 2021 16:33:19**********
    [bk]tx_txdesc_flush
    user define rfcali mode:1
    rfcali_mode:1, 1
    ble use fit!
    temp in flash is:273
    xtal in flash is:32
    -----pwr_gain:12, g_idx:12, shift_b:0, shift_g:0
    -----[pwr_gain]12
    Initializing TCP/IP stack
    -----rw_main task init----
    -----rw_main  start----
    gapm_cmp_evt_handler operation = 0x1, status = 0x0
    gapm_cmp_evt_handler operation = 0x3, status = 0x0
    STACK INIT OK
    ble create new db
    ble_env->start_hdl = 0x7gapm_cmp_evt_handler operation = 0x1b, status = 0x0
    CREATE DB SUCCESS
    !!!!!!!!!!tuya_bt_reset_adv
    [01-01 18:12:15 TUYA Notice][tuya_ble_api.c:398] ble adv && resp changed
    !!!!!!!!!!tuya_before_netcfg_cb
    appm start advertising
    [01-01 18:12:16 TUYA Notice][tuya_main.c:364] mf_init succ
    do td cur_t:244--last:idx:13,t:273 -- new:idx:11,t:249
    --0xc:08, shift_b:-1, shift_g:-1, X:0
    [01-01 18:12:16 TUYA Notice][ty_com_pro_svc_download_file.c:666] file_download_init OK
    [01-01 18:12:16 TUYA Notice][ty_com_pro_base_main_service.c:184] recv jump_pack ok.
    [01-01 18:12:16 TUYA Notice][ty_com_pro_base_main_service.c:373] user config open ir...tx:26,rx:8...
    [01-01 18:12:16 TUYA Notice][ty_com_pro_base_main_service.c:411] open ir sever............
    [01-01 18:12:16 TUYA Notice][ir_lib.c:386] ty_uart_ir_main_components_version:1.0.7
    [01-01 18:12:16 TUYA Notice][ir_lib.c:236] remain size:66040
    [01-01 18:12:16 TUYA Notice][ty_com_pro_base_cloud_handle.c:1116] cfg_mode:0.first_mode:3.firmware_key:key34ak4q5rmrkef.product_key:whs3cty93fzrqkpt
    [01-01 18:12:16 TUYA Notice][tuya_iot_wifi_api.c:199] wifi mcu init. pid:whs3cty93fzrqkpt firmwarekey:key34ak4q5rmrkef v1:1.1.80 v2:1.0.0
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3671] serial_no:18de500d5da9
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3706] gw_cntl.gw_wsm.stat:0
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3709] gw_cntl.gw_wsm.nc_tp:1
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3710] gw_cntl.gw_wsm.md:0
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3754] gw_cntl.gw_if.abi:0 input:0
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3755] gw_cntl.gw_if.product_key:whs3cty93fzrqkpt, input:whs3cty93fzrqkpt
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3756] gw_cntl.gw_if.tp:1, input:1
    [01-01 18:12:16 TUYA Notice][gw_intf.c:3758] gw_cntl.gw_if.firmware_key:key34ak4q5rmrkef, input:key34ak4q5rmrkef
    [01-01 18:12:17 TUYA Info][gw_mqc_cb.c:475] register mqc app callback
    [01-01 18:12:17 TUYA Notice][tuya_bt_sdk.c:148] ty bt update product:whs3cty93fzrqkpt 0
    [bk]tx_txdesc_flush
    sizeof(wpa_supplicant)=2512
    oper_state: state 0, operstate 0
    enter low level!
    mac 18:de:50: d:5d:a9
    leave low level!
    wpa_supplicant_scan 866
    no ht in scan
    scan_start_req_handler
    oper_state: state 0, operstate 0
    oper_state: state 0, operstate 0
    mm-next-timer_null
    [bk]tx_txdesc_flush
    me_set_ps_disable:840 0 0 0 467697 926416
    ------beacon_int_set:100 TU
    set_active param 0
    [msg]APM_STOP_CFM
    update_ongoing_1_bcn_update
    mm-next-timer_null
    hal_machw_enter_monitor_mode
    [01-01 18:12:18 TUYA Notice][ty_com_pro_base_cloud_handle.c:903] wifi status is :1
    !!!!!!!!!!tuya_bt_reset_adv
    [01-01 18:12:18 TUYA Notice][tuya_ble_api.c:398] ble adv && resp changed
    gapm_cmp_evt_handler operation = 0x10, status = 0x0
    [01-01 18:12:18 TUYA Notice][ty_com_pro_base_main_service.c:701] wifi ble mode not config data not to send fail:1
    [01-01 18:12:18 TUYA Err][ty_com_pro_base_main_service.c:738] data_upload_async_proc error.
    [01-01 18:12:18 TUYA Notice][ty_com_pro_base_main_service.c:701] wifi ble mode not config data not to send fail:1
    [01-01 18:12:18 TUYA Err][ty_com_pro_base_main_service.c:738] data_upload_async_proc error.
    [01-01 18:12:19 TUYA Notice][ty_com_pro_base_init.c:136] send heat beat ,get heap size 60632
    [01-01 18:12:19 TUYA Notice][ty_com_pro_base_main_service.c:184] recv jump_pack ok.
    [01-01 18:12:34 TUYA Notice][ty_com_pro_base_init.c:136] send heat beat ,get heap size 60632
    [01-01 18:12:34 TUYA Notice][ty_com_pro_base_main_service.c:184] recv jump_pack ok.
    do td cur_t:257--last:idx:11,t:249 -- new:idx:12,t:261
    --0xc:08, shift_b:-1, shift_g:-1, X:0
    [01-01 18:12:49 TUYA Notice][ty_com_pro_base_init.c:136] send heat beat ,get heap size 60568
    [01-01 18:12:49 TUYA Notice][ty_com_pro_base_main_service.c:184] recv jump_pack ok.
    [01-01 18:13:04 TUYA Notice][ty_com_pro_base_init.c:136] send heat beat ,get heap size 60544
    [01-01 18:13:04 TUYA Notice][ty_com_pro_base_main_service.c:184] recv jump_pack ok.
    Close COM10 Success
    


    Because of the TuyaMCU, Easy Flasher was not able to automatically determine any GPIO assignments
    Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
    Baud keyword found, this device may be TuyaMCU or BL0942. Baud value is 9600}e
    No module information found.
    And the Tuya section starts, as usual, at 2023424


    The correct details can be determined using settings already mentioned in the TH06 thread and with the GPIO finder.

    P6 Btn
    P8 IRRecv
    P26 IRSend

    and the autoexec content required
    startDriver TuyaMCU
    startDriver NTP
    ntp_timeZoneOfs 00:00
    // dpID 101 is tempererature div 10
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 101 val 1
    // dpID 102 is % humidity
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 102 val 2


    With that in place we have a working device

    Screenshot of the user interface for the OpenBeken S09 device.

    I don't have an immediate use for the IR or the button, but to test I assigned a command to button push that I knew would turn on my amp. this was added to autoexec.bat
    addEventHandler OnClick 6 IRSend NEC-0x4583-0x11-0


    OBK Template

    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 20961482
    spin55
    Level 17  
    divadiow wrote:
    Unlike experiences in the TH06 thread with other S09s, I was not successful flashing dumping and flashing the Beken chip without cutting TXD1/RXD1 to the TuyaMCU, despite many attempts. Pogo pins and then soldering, different USB-TTL adaptors, different cables. No joy.


    Judging by the photos I posted in the other thread it seems that it is the same device that I flashed without needing to cut tracks or desolder.
    Would you mind commenting on how you connect the ground of the USB converter?
  • #4 20961566
    divadiow
    Level 34  
    it does indeed look to be identical, so I'm not sure what I was not doing that meant I had to cut the rx/tx.

    I had two setups, initially longer GND from

    USB-TTL GND -> breadboard
    PSU GND -> breadboard
    BK7231N GND/pogo -> breadboard

    pic shows GND only connected in this example.
    Breadboard setup with electronic components and wires connected to a laptop.

    but then I shortened it all, cut out the pogo and soldered to the GND pin on BK.

    so, dunno. I kind of want to get another to do it all again.
  • ADVERTISEMENT
  • #5 20961593
    spin55
    Level 17  
    Solder some cables directly to the pins of the WB3S module that I point out in the image and connect the USB converter to them (Rx to Tx, Tx to Rx, and GND). Use CEN as usual.

    Close-up of a circuit board with a WB3S module and marked pins Rx, Tx, GND, and CEN.

    Added after 28 [minutes]:

    WB3S module with soldered wires connected to a USB converter. USB to TTL converter with black wires on the left side. USB to TTL CP2102 converter with attached cables.
  • ADVERTISEMENT
  • #6 21204173
    sliver85
    Level 4  
    I followed the tutorial, and everything is working perfectly—date, time, temperature. My module wasn't a WB3S but a CB3S. However, all the pins were identical:

    "6": "Btn;0",
    "8": "IRRecv;0",
    "26": "IRSend;0"

    What's unfortunate is that with the official Tuya app, I was able to properly control my Daikin air conditioner, which correctly handled the IR. Since flashing OpenBK, it no longer works. When I use the Daikin remote and press the buttons, nothing is detected—no IR signals at all. However, if I use the remote for my TV or soundbar, everything works fine. I receive the IR signal and can resend it using IRSend.

    I suppose that the Daikin IR signal is not supported by OpenBK, whereas it was directly supported by Tuya. Do you know if any work is being done on this?

    Thanks again for all the hard work!

    PS: The original firmware is attached.
  • #8 21204196
    sliver85
    Level 4  
    >>21204185

    Hello and thank you for your response.
    Would your solution be more or less the same as using an ESP (Wemos D1 Mini) with an IR module flashed with ESPHome from Home Assistant?
    If so, the climate_ir from ESPHome also doesn't support my Daikin air conditioner (FTXS20K from 2016).
  • #9 21204244
    insmod
    Level 23  
    >>21204196 Should be the same. But common IR transmitter modules are terrible, I had trouble using them even in direct sight. It is possible that esphome would work on this device.
  • #10 21204335
    sliver85
    Level 4  
    >>21204244

    Well, I did as you suggested and switched the module to LibreTiny.
    I was skeptical, but I was wrong! You were right; it works perfectly now

    Thank you very much!
  • #11 21204351
    insmod
    Level 23  
    >>21204335 For tuyamcu, configuration should be something like that
    
    uart:
      rx_pin: 10
      tx_pin: 11
      baud_rate: 9600
    
    time:
      - platform: homeassistant
        id: homeassistant_time
        timezone: UTC
    
    tuya:
      id: tuyamcu
      time_id: homeassistant_time
    
    sensor:
      - platform: "tuya"
        name: "Temperature"
        sensor_datapoint: 101
        device_class: "temperature"
        filters:
          - multiply: 0.1
      - platform: "tuya"
        name: "Humidity"
        sensor_datapoint: 102
        device_class: "humidity"
    
  • #12 21417735
    cijoml
    Level 7  
    Hello my device comes with CB3S module. Is it fully supported? Can I set time/date and receive humidity/temperature and receive/send IR codes? I would like to know prior to flashing if it is worth it.

Topic summary

The discussion revolves around the Tuya Generic S09 device, which features temperature, humidity, clock, and IR capabilities. Users share experiences with flashing the device, specifically the BK7231T-based WB3S module, and troubleshooting issues related to IR functionality, particularly with Daikin air conditioners. Some users successfully flashed their devices with OpenBK and LibreTiny firmware, while others encountered challenges with IR signal detection. Configuration details for UART and sensor integration with Home Assistant are also provided, highlighting the use of TuyaMCU for temperature and humidity readings.
Summary generated by the language model.
ADVERTISEMENT