logo elektroda
logo elektroda
X
logo elektroda

Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4

hakimmuhiddin 12909 32
ADVERTISEMENT
  • #1 20618377
    hakimmuhiddin
    Level 4  
    Posts: 4
    Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul

    Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4

    PCB CODE: S11-SH4-CBU-V2.4

    Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4 Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4 Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4 Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4 Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4 Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4

    Added after 11 [minutes]:



  • ADVERTISEMENT
  • #2 20618479
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632
    Hello, can you attach the OBK template from the Web App? The JSON template?
    Helpful post? Buy me a coffee.
  • #3 20625085
    jassuncao
    Level 1  
    Posts: 1

    Hope this is useful.

    JSON format:
    
    {
    	"wfst_pin":"9",
    	"rf_study_feq":"0",
    	"owm":"1",
    	"rsthold":"3",
    	"wfst_lv":"1",
    	"netyc":"1",
    	"infrr":"8",
    	"netnc":"0",
    	"infre":"7",
    	"crc":"46",
    	"}":"false",
    	"fac_pin":"loqui5wq9whciaerbJ5Agw_di{abi",
    	"id":"null",
    	"swv":"2.0.8",
    	"bv":"40.00",
    	"pv":"2.2",
    	"lpv":"3.3",
    	"pk":"keym4vvjhx4sd9kk",
    	"firmk":"keym4vvjhx4sd9kk",
    	"cadv":"1.0.3",
    	"cdv":"1.0.0",
    	"dev_swv":"2.0.8",
    	"s_id":"null",
    	"dtp":"0",
    	"sync":"0",
    	"attr_num":"0",
    	"mst_tp_0":"0",
    	"mst_ver_0":"null",
    	"mst_tp_1":"0",
    	"mst_ver_1":"null",
    	"mst_tp_2":"0",
    	"mst_ver_2":"null",
    	"mst_tp_3":"0",
    	"mst_ver_3":"null }{nc_tp",
    	"ssid":"null",
    	"passwd":"null",
    	"md":"0",
    	"random":"0",
    	"wfb64":"1",
    	"stat":"0",
    	"token":"null",
    	"region":"null",
    	"reg_key":"null",
    	"dns_prio":"0 } )95Agw_wsm{nc_tp",
    	"psk_key":"NujFeKQ682eztk0jHOfpRt02ifO9LqwWDcllJ",
    	"auth_key":"6APzRTif0qKPtmgyUQy7nghfOKMc1FSD",
    	"ap_ssid":"SmartLife",
    	"ap_passwd":"null",
    	"country_code":"null",
    	"bt_mac":"null",
    	"bt_hid":"null",
    	"prod_test":"false",
    	"lckey":"null",
    	"h_url":"null",
    	"h_ip":"null",
    	"hs_url":"null",
    	"hs_ip":"null",
    	"hs_psk":"null",
    	"hs_psk_ip":"null",
    	"mqs_url":"null",
    	"mqs_ip":"null",
    	"mq_url":"null",
    	"mq_ip":"null",
    	"ai_sp":"null",
    	"ai_sp_ip":"null",
    	"mq_psk":"null",
    	"mq_psk_ip":"null",
    	"time_z":"null",
    	"s_time_z":"null",
    	"w{uuid":"49c07d75a7a784c7",
    	"wx_uuid":"null",
    	"dy_tls_m":"0",
    	"cloud_cap":"0",
    	"psk21_key":"null } )95Agw_wsm{nc_tp",
    	"ap_s{wfst_pin":"9"
    }
    


    Text description:
    
    Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
    No module information found.
    And the Tuya section starts, as usual, at 2023424
    

  • ADVERTISEMENT
  • #4 20625156
    hakimmuhiddin
    Level 4  
    Posts: 4
    Tuya SmartLife Universal IR+RF WIFI REMOTE Control Smatrul PCB CODE S11-SH4-CBU-V2.4
    Attachments:
    • SH4 Module Datasheet_Documentation_Documentation.pdf (667.86 KB) You must be logged in to download this attachment.
    • IR RF Remote Control_Documentation_Documentation.pdf (91.33 KB) You must be logged in to download this attachment.
  • #5 20625227
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632

    Very good information!
    I wonder what is that:
    
    "wfst_pin":"9",
    

    WFST? What could it stand for? Is the IR receiver (or IR sender) on P9? Or is it a standby?

    Also...
    
    	"infrr":"8",
    	"infre":"7",
    

    Are those pin numbers? P8 and P7? Maybe one is send and second receive?
    Helpful post? Buy me a coffee.
  • #6 20636079
    jkwim
    Level 13  
    Posts: 186
    Help: 4
    Rate: 25
    p.kaczmarek2 wrote:

    Very good information!
    I wonder what is that:
    
    "wfst_pin":"9",
    

    WFST? What could it stand for? Is the IR receiver (or IR sender) on P9? Or is it a standby?

    Also...
    
    	"infrr":"8",
    	"infre":"7",
    

    Are those pin numbers? P8 and P7? Maybe one is send and second receive?


    "wfst_pin":"9", --> WiFi Status
    "infrr":"8", --> Infrared Receive
    "infre":"7", --> Infrared Emit
  • ADVERTISEMENT
  • #7 20636181
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632

    So wfst_pin is a WiFiLED_n? It seems I should update my config generator. Thanks!
    Helpful post? Buy me a coffee.
  • #8 20636984
    jkwim
    Level 13  
    Posts: 186
    Help: 4
    Rate: 25

    p.kaczmarek2 wrote:

    So wfst_pin is a WiFiLED_n? It seems I should update my config generator. Thanks!


    Depends on the preference. I chose to have WiFiLED so that it blinks during establishment and steady on once connected.
  • #9 20641825
    bobthemonkee
    Level 5  
    Posts: 33
    Rate: 2

    Thank you for this post! I just set one of these up and have the pin settings as above. I was curious though, how are you going about programming specific functions into the remote? This is my first non-light project using Open Beken.
  • #10 20641826
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632

    Here's a TV remote scripting example:



    Helpful post? Buy me a coffee.
  • #11 20696413
    wak5670
    Level 2  
    Posts: 2
    Anyone figure out how to receive RF transmission?
  • ADVERTISEMENT
  • #12 20696669
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632
    That would most likely require just porting of Tasmota RF driver. Our licences are compatible, so no problems there.
    Helpful post? Buy me a coffee.
  • #13 20707743
    irony666
    Level 5  
    Posts: 6
    Rate: 2

    I'd also be very happy about this. I also own an Avatto S11 (S11-SH4-CBU-V2.4). IR works somewhat, but RF is the main reason I bought this...

    Happy to provide any help I can!
  • #14 20743279
    peterdpetroff
    Level 2  
    Posts: 2
    Rate: 3
    >>20696669
    Hi, can you please share where to find info how to port Tasmota RF driver?

    Thank you in advance.
  • #15 20922852
    irony666
    Level 5  
    Posts: 6
    Rate: 2

    Is there any update? I'd still love to get this feature - I'd love to also contribute, if I have the skills. Can someone explain the steps for including RF to OpenBK?
  • #16 20940466
    rodionzhitomirsky
    Level 2  
    Posts: 10
    Rate: 3

    @p.kaczmarek2
    @irony666

    Hey guys! Same here: I bought some of these as I have both IR and RF devices in the same rooms. So, maybe we can speed up this one? I also have the skills (including C/C++).
  • #17 20940597
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632
    Any help is welcome. I don't have RF device at hand. For porting, you would need to create a new entry in drivers table:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/driver/drv_main.c
    and then create separate file like drv_rf.c and put the code there.

    See a sample driver:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/driver/drv_httpButtons.c
    Helpful post? Buy me a coffee.
  • #18 21040223
    merni99
    Level 6  
    Posts: 7
    Rate: 4

    Any update on this? I'm also very interested in the RF functionality. Which Tasmota driver(s) should be migrated?
    I also have developer skills. So I can help with this, too.
  • #19 21040232
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14615
    Help: 655
    Rate: 12632
    Well, the RFSend command I guess:
    https://github.com/search?q=repo%3Aarendst%2FTasmota+RFSend&type=code
    Maybe that..
    https://github.com/arendst/Tasmota/blob/54e4a...tasmota_xdrv_driver/xdrv_17_rcswitch.ino#L152

    Added after 32 [seconds]:

    EDIT: Or RF receiver, depending on whether you want to receive or send RF
    Helpful post? Buy me a coffee.
  • #20 21040274
    divadiow
    Level 38  
    Posts: 5062
    Help: 438
    Rate: 893
    jassuncao wrote:
    Hope this is useful.


    may be of some use. Tuya API response using the fkey and factory pin

    Code: JSON
    Log in, to see the code


    @hakimmuhiddin are you able to post the 72kb tuya config file from this device?

    https://www.youtube.com/watch?v=WunlqIMAdgw

    Added after 3 [hours] 31 [minutes]:

    merni99 wrote:
    I also have developer skills.


    maybe you could kickstart Realtek OBK development 😜
  • #21 21040711
    merni99
    Level 6  
    Posts: 7
    Rate: 4

    >>21040232
    Thanks for your assistance. I'll have a look at it.
  • #22 21407223
    kar200
    Level 4  
    Posts: 4
    Hi guys,

    New here so first of all thank you for this project!
    If anyone is interested in the RF commands I managed to make mine work with the help of this repo:

    https://github.com/olivluca/tuya_rf

    I managed to learn all remote commands (since I had flashed the device before extracting the commands) and it all worked perfectly.

    I did have to change the firmware first by using tuya cloud cutter and then built the esphome in a python venv from the repo.
  • #23 21412512
    irony666
    Level 5  
    Posts: 6
    Rate: 2
    >>21407223

    Hey kar200,

    thank you so much for your comment. I haven't touched my device for quite a while, there is still OpenBeken flashed. Could you maybe do a quick step by step tutorial what needs to be done to be able to control RF and IR with this device? If I see correct, this uses ESPHome? Does it work with this microcontroller type?

    I'm sure there are plenty of others stumbling across this thread, being thankful for your info :)

    Thank you in advance!
  • #24 21412540
    kar200
    Level 4  
    Posts: 4
    >>21412512

    No worries. I flashed first using cloud-cutter. I don't recall how I moved then to esphome but it should be easy. (I cann dig into it if needs be).

    I am using linux (any distro with python should do the trick. First clone the repo in a folder. If I am missing something please let me know.

    The code is set to dump raw data. This is enough to copy the commands and put them in a new file. I am sharing also my secret file to show how I set them up.

    I am using a dooya remote DC2702. This is better suited for button only. I changed the repeat option from 7 to 3 (for no reason :)).

    Checking the source code of the dooya protocol it looks the same as mine (I do have one extra value at the start of the code). But it also looks like the code is reversed. I don't have a separate RF433 device to confirm.

    I am garbage with programming and I tried to use Claude AI and Deepseek to try and revert the signal to see if it gets recognised but I havent managed yet to do it. Maybe someone more skilled here with a different device can confirm. I am not even sure 100 percent that it is the case.

    
    $ git clone https://github.com/olivluca/tuya_rf.git
    $ cd cd tuya_rf
    


    Then create a pyton venv

    $ python -m venv ./venv
    $ source venv/bin/activate


    Here you will be in python virtual environement so anything can be installed and removed without altering your distro.

    $ pip install esphome


    Then from here you can compile the yaml file.

    This is a sample one I am using (theres one included in the repo as well).

    external_components:
     - source:
        type: local
        path: components
       components: [ tuya_rf ] 
    esphome:
      name: tuya
      
    bk72xx:
      board: cbu
      framework:
        version: latest
        
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
    # Enable logging
    logger:
    web_server:
      version: 3
    # Enable Home Assistant API
    api:
      reboot_timeout: 0s
    ota:
      platform: esphome
    
    #status led
    output:
      platform: gpio
      id: status
      pin: P9
    
    #reset button, it has an external pull-down in my board
    binary_sensor:
      - platform: gpio
        id: reset_button
        pin: P23
    
    #rf transmitter and receiver
    tuya_rf:
      id: rf
      receiver_disabled: true
      dump: raw
    
    #for the ir leds
    remote_transmitter:
      id: ir
      pin: P7
      carrier_duty_percent: 50%
    
    #for the ir receiver
    remote_receiver:
      pin:
       number: P8
       inverted: true
    
    button:
      - platform: template
        name: turn off receiver
        web_server:
          sorting_weight: 1010
        on_press:
           - tuya_rf.turn_off_receiver:
      - platform: template
        name: turn on receiver
        web_server:
          sorting_weight: 1020
        on_press:
           - tuya_rf.turn_on_receiver:
      - platform: template
        name:  Right up
        web_server:
          sorting_weight:  10
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret RightUp
           - output.turn_off: status
      - platform: template
        name:  Right Down
        web_server:
          sorting_weight:  20
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret RightDown
           - output.turn_off: status
      - platform: template
        name:  Right Stop
        web_server:
          sorting_weight:  30
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret RightStop
           - output.turn_off: status
    
      - platform: template
        name:  Right up
        web_server:
          sorting_weight:  10
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret RightUp
           - output.turn_off: status
      - platform: template
        name:  Right Down
        web_server:
          sorting_weight:  20
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret RightDown
           - output.turn_off: status
      - platform: template
        name:  Right Stop
        web_server:
          sorting_weight:  30
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret RightStop
           - output.turn_off: status
      - platform: template
        name:  Left up
        web_server:
          sorting_weight:  40
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret LeftUp
           - output.turn_off: status
      - platform: template
        name:  Left Down
        web_server:
          sorting_weight:  50
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret LeftDown
           - output.turn_off: status
      - platform: template
        name:  Left Stop
        web_server:
          sorting_weight:  60
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret LeftStop
           - output.turn_off: status
      - platform: template
        name:  Middle up
        web_server:
          sorting_weight:  70
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret MiddleUp
           - output.turn_off: status
      - platform: template
        name:  Middle Down
        web_server:
          sorting_weight:  80
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret MiddleDown
           - output.turn_off: status
      - platform: template
        name:  Middle Stop
        web_server:
          sorting_weight:  90
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret MiddleStop
           - output.turn_off: status
      - platform: template
        name:  All up
        web_server:
          sorting_weight:  100
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret AllUp
           - output.turn_off: status
      - platform: template
        name:  All Down
        web_server:
          sorting_weight:  110
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret AllDown
           - output.turn_off: status
      - platform: template
        name:  All Stop
        web_server:
          sorting_weight:  120
        on_press:
           - output.turn_on: status
           - remote_transmitter.transmit_raw:
              transmitter_id: rf
              repeat:
                times: 3
                wait_time: 0s
              code: !secret AllStop
           - output.turn_off: status
    


    You can then compile the code:

    esphome compile tuya.yaml


    The file that you need to upload is located in
    .esphome/build/tuya/.pioenvs/tuya/esphome_2024.12.4_cbu_bk7231n_lt1.8.0.uf2
    



    This is my secret file:

    # Your Wi-Fi SSID and password
    wifi_ssid: "wifiSSID"
    wifi_password: "WIFIPassword"
    
    
    RightUp: [8717, -4779, 1621, -344, 752, -754, 368, -762, 362, -344, 781, -375, 721, -375, 746, -750, 375, -718, 406, -379, 749, -715, 375, -375, 750, -343, 784, -719, 371, -750, 375, -750, 374, -753, 375, -715, 406, -375, 
                750, -718, 410, -343, 747,-749, 378, -747, 343, -375, 754, -749, 372, -375, 750, -375, 719, -381, 744, -375, 750, -344, 781, -344, 754, -375, 715, -785, 344, -403, 719, -375, 753, -372, 750, -719, 406, -719, 378, -750, 341, -781, 344, -375]
    
    RightStop: [8322, -4813, 1564, -385, 741, -750, 376, -719, 407, -375, 723, -372, 750, -344, 782, -751, 344, -754, 372, -375, 720, -750, 376, -375, 753, -373, 750, -720, 375, -750, 376, -754,
                         372, -719, 406, -720, 375, -375, 751, -754, 419, -297, 750,-751, 375, -751, 382, -368, 720, -750, 376, -375, 751, -377, 717, -376, 750, -375, 751, -375, 726, -400, 719, -376, 750, -720, 406, -344, 754, -747, 345, -406, 719, -751, 377, -380, 744, -751, 375, -344, 751, -750]
    
    RightDown: [8726, -4777, 1622, -344, 788, -712, 375, -750, 344, -406, 719, -410, 716, -406, 723, -746, 375, -750, 378, -341, 750, -781, 344, -375, 750, -385, 744, -715, 375, -750, 375, -750,
                         391, -738, 340, -782, 344, -406, 719, -753, 372, -375, 750,-750, 375, -721, 408, -346, 744, -750, 375, -376, 750, -375, 724, -401, 741, -356, 750, -372, 757, -368, 719, -375, 750, -754, 371, -375, 751, -375, 750, -722, 403, -719, 406, -719, 375, -750, 344, -410, 715, -407]
    
    
    LeftUp: [8724, -4784, 1590, -373, 750, -719, 406, -719, 375, -375, 754, -371, 719, -375, 751, -750, 375, -753, 372, -344, 781, -719, 375, -375, 753, -372, 719, -781, 344, -750, 375, -754,
                         371, -751, 375, -718, 407, -343, 750, -750, 375, -375, 719,-750, 375, -725, 401, -375, 750, -719, 406, -344, 750, -378, 747, -375, 719, -375, 750, -375, 754, -371, 751, -718, 375, -376, 750, -377, 748, -344, 750, -375, 750, -750, 378, -716, 406, -719, 375, -719, 406, -344]
    
    LeftStop: [8345, -4781, 1590, -406, 718, -750, 375, -722, 403, -344, 750, -374, 750, -375, 724, -776, 344, -750, 374, -375, 750, -753, 372, -375, 750, -343, 750, -758, 370, -747, 344, -781, 343, -750, 375, -753, 372, -375, 750, -718, 375, -375, 751,
               -752, 372, -750, 344, -374, 750, -753, 372, -375, 750, -374, 719, -406, 730, -367, 747, -374, 750, -344, 750, -750, 378, -371, 750, -375, 719, -750, 375, -375, 753, -746, 375, -344, 781, -719, 378, -372, 750, -749]
    
    LeftDown: [8689, -4780, 1563, -402, 719, -781, 344, -750, 375, -377, 747, -375, 719, -375, 781, -719, 378, -747, 343, -375, 767, -733, 375, -375, 756, -369, 750, -718, 375, -750, 378, -750, 372, -718, 375, -750, 375, -375, 753, -747, 343, -406, 719,
                    -719, 406, -722, 403, -344, 781, -718, 406, -344, 753, -372, 718, -407, 718, -375, 750, -376, 754, -370, 718, -750, 375, -375, 750, -375, 750, -344, 750, -749, 375, -753, 372, -718, 375, -750, 375, -375, 750, -347]
    
    MiddleUp: [8754, -4748, 1588, -371, 750, -718, 406, -719, 375, -374, 753, -372, 718, -406, 719, -749, 375, -719, 406, -375, 749, -719, 406, -343, 753, -372, 750, -749, 344, 
                        -781, 343, -753, 372, -750, 374, -719, 406, -375, 722, -746, 375, -343, 781,-719, 406, -722, 371, -375, 750, -749, 375, -375, 752, -372, 718, -375, 750, -374, 750, -344, 784, -340, 750, -749, 375, -750, 347, -378, 743, -375, 749, -375, 750, -718, 406, -719, 406, -718, 375, -750, 374, -347]
    
    MiddleStop: [8340, -4783, 1627, -337, 750, -749, 375, -753, 340, -406, 734, -360, 749, -375, 753, -715, 406, -719, 406, -343, 750, -753, 371, -344, 781, -343, 750, -781, 343, 
                        -750, 375, -718, 406, -719, 406, -718, 375, -375, 749, -750, 375, -343, 781,-722, 372, -749, 375, -375, 750, -718, 410, -371, 719, -406, 718, -375, 750, -343, 781, -344, 749, -375, 719, -780, 344, -753, 372, -374, 750, -718, 407, -374, 753, -715, 406, -344, 750, -749, 375, -347, 746, -750]
    
    MiddleDown: [8751, -4751, 1590, -407, 725, -744, 375, -750, 375, -344, 750, -378, 747, -375, 750, -719, 407, -718, 391, -360, 750, -719, 406, -375, 719, -375, 750, -750, 344, 
                        -750, 375, -750, 379, -746, 375, -719, 407, -343, 782, -722, 372, -375, 719,-781, 344, -750, 375, -410, 715, -751, 375, -343, 782, -347, 755, -367, 719, -428, 697, -406, 719, -379, 746, -751, 375, -750, 344, -375, 753, -372, 719, -781, 344, -781, 344, -723, 403, -718, 407, -344, 781, -344]
    
    
    AllUp: [8714, -4779, 1590, -375, 725, -774, 344, -749, 375, -375, 749, -379, 746, -343, 781, -719, 375, -749, 379, -371, 750, -749, 375, -375, 718, -406, 719, -749, 375,
                    -750, 375, -749, 375, -718, 375, -750, 398, -352, 749, -757, 368, -375, 721,-750, 371, -750, 408, -345, 746, -750, 375, -343, 750, -375, 753, -375, 746, -375, 749, -375, 719, -406, 718, -375, 749, -375, 750, -375, 753, -371, 719, -374, 719, -781, 343, -785, 371, -719, 374, -750, 375, -375]
    
    AllStop: [8348, -4747, 1632, -368, 751, -718, 407, -719, 375, -375, 718, -376, 750, -406, 719, -719, 407, -718, 406, -344, 781, -719, 375, -344, 753, -372, 750, -750, 375,
                     -719, 407, -753, 372, -719, 406, -719, 375, -375, 725, -775, 344, -406, 719,-750, 375, -760, 369, -371, 757, -712, 406, -344, 751, -374, 750, -375, 718, -375, 750, -375, 756, -368, 750, -375, 749, -344, 781, -343, 750, -750, 374, -375, 719, -781, 343, -375, 750, -718, 406, -375, 750, -721]
    
    AllDown: [8698, -4773, 1585, -374, 750, -750, 350, -743, 375, -374, 750, -375, 718, -406, 719, -750, 374, -750, 406, -312, 782, -749, 375, -343, 750, -375, 750, -752, 372, 
                    -718, 407, -718, 406, -718, 419, -709, 372, -375, 749, -750, 344, -406, 721,-747, 374, -750, 375, -375, 749, -722, 403, -375, 749, -344, 750, -375, 758, -366, 719, -406, 718, -406, 718, -395, 733, -372, 749, -375, 750, -343, 750, -750, 375, -749, 375, -750, 343, -785, 340, -406, 718, -406]
  • #25 21429534
    irony666
    Level 5  
    Posts: 6
    Rate: 2
    >>21412540

    Hey, thanks for your amazing description! So basically I understand, esphome supports bk72xx?

    I also use linux, can compile it, no issues - but I am unable to flash it to the device. How did you finally flash your uf2 file? Why uf2 and not bin?

    I am not sure, what's the reason why I can't flash - last time I had a look into this topic was quite a while ago, but I remember it was quite fickle. I am using USB to TTY Adapter, but it's just not working right now. will update, if I have progress of course.

    Update: I still failed to flash ESPHome on top of OpenBK with a serial to USB Adapter. Again i'll emphasize, my case is that i already had OpenBK flashed on the Avatto S11.

    Apparently it's possible to flash it as OTA Update. I renamed image_bk7231n_app.ota.rbl to OpenBK7231N_esphome.rbl and flashed it and it worked like charm. Now i need to get some 433Mhz and IR Commands working. I'll also update on this here.

    Thank you again for your hints @kar200!

    read the "Migrating from OpenBEKEN(OTA) " part here: https://docs.libretiny.eu/docs/flashing/esphome/#converting-devices-with-tuya-cloudcutter

    
    OpenBeken is a custom, Tasmota-like firmware for non-ESP chips. Currently, this part of the guide applies to BK7231 only, as that's the only chip supported both by LT and OBK.
    
    OBK is compatible with standard Beken OTA packages, but the web panel does a filename check to prevent chip type mismatch. Grab the image_bk7231t_app.ota.rbl file from build directory (note: without "UG" in the name!), rename it to something like OpenBK7231T_esphome.rbl (change T to N depending on the chip type), and drop it on the OTA panel.
    
  • #26 21432262
    irony666
    Level 5  
    Posts: 6
    Rate: 2
    So, i have been testing around with those raw high/low [] RF Codes. I am now trying to get along with IR Codes - am i right, only NEC Codes are working? Would love to learn more about IR on this device.

    This is probably not specifically related to Avatto S11, but nevertheless, this is what i found out:

    I am mainly using old Intertech / "Brennenstuhl" Power Switches. Those have a decimal code, which is basically the animation on the left here: https://tools.isn-systems.com/it2elro/
    basically if it's "down", it's binary value is 01, if it's up, it's binary value is 00. So it's 24 Bit - 10 bits Device Code (12345), 10 bits Channel Code (ABCDE), 4 bits Command (On/Off).

    I couldn't find reliably the pattern from just reading the raw values from Transmitter On inside esphome. With analyzing it further with urh and a rtl sdr, my findings were: 1 bit is 1200µs.
    0 is "900, -300"
    1 is "-600, 300, -300"

    As positive/negative values have to alternate, 01 becomes "900, -900, 300, -300" - 011 becomes "900, -900, 300, -900, 300, -300" ... and so on.
    With this i could write a small python program to create at least the on values. For some reason, the only relevant difference between on and off is the second last value - this does not fit to any pattern i found.

    this:
    [9730, -300,
    900, -300, 900, -300, 900, -300, 900, -300, 900, -300, 900, -300,
    900, -300, 900, -300, 900, -300, 900, -300, 900, -300, 900, -300,

    900, -900, 300, -300, 900, -900, 300, -300, 900, -900, 300, -300,
    900, -900, 300, -900, 300, -900, 300, -900, 300, -900, 300, -300]

    equals 000000 000000 010101 01 1111, which is ON.

    the fitting Off Value is:

    [9730, -300,
    900, -300, 900, -300, 900, -300, 900, -300, 900, -300, 900, -300,
    900, -300, 900, -300, 900, -300, 900, -300, 900, -300, 900, -300,

    900, -900, 300, -300, 900, -900, 300, -300, 900, -900, 300, -300,
    900, -900, 300, -900, 300, -900, 300, -900, 300, -900, 900, -300]

    So, 300 becomes 900, second last value. Please explain if you have a clue, why that might be.



    def convert(bin):
    mylist = [9730, -300]

    for i in range(len(bin)):


    if bin == "0":

    if mylist[-1] > 0:
    mylist[-1] = mylist[-1] 900
    mylist.append(-300)
    else:
    mylist.append(900)
    mylist.append(-300)

    elif bin[i] == "1":
    if mylist[-1] < 0:
    mylist[-1] = mylist[-1] -600
    mylist.append(300)
    mylist.append(-300)
    else:
    mylist.append(-600)
    mylist.append(300)
    mylist.append(-300)
    if bin[i] == " ":
    print("space, continue...")

    str_list = [str(x) for x in mylist]
    outputstring = "[" ', '.join(str_list) "]"
    return outputstring
    [/i][/i]
  • #27 21432904
    kasjo
    Level 26  
    Posts: 769
    Help: 94
    Rate: 88
    Can this remote be "paired" over RF433 with any device by copying the signals from the original remote? Does it only work with Tuya devices?
  • #28 21434715
    irony666
    Level 5  
    Posts: 6
    Rate: 2
    433 mhz is most of the time unencrypted, so I would say you can basically control any 433 mhz device. esphome sends raw high/low values, so if you can record those values and put them into this form, it will work well imho. also I don't know of any 433mhz devices that do "pairing". so yes, tldr any 433 mhz device without rolling code should work.
  • #29 21441995
    kar200
    Level 4  
    Posts: 4
    Hi Irony and sorry for the late reply.

    After testing for a while I finally managed to get my answers.

    I used CC1101 (cheap from aliexpress and very very useful) with ESP32 using this
    https://github.com/dbuezas/esphome-cc1101

    The guy also provides a nice web interface to paste raw dump and look at the signal in detail.
    https://dbuezas.github.io/esphome-remote_receiver-oscilloscope/

    I realized my tuya device actually starts capturing my signal after the first pause (signal is sent 4 times from the dooya remote). The signal also looked inverted. Since both sender and receiver are inverted in the code it made it work.

    I managed to get the dooya protocol recognized and identified with the CC1101. I copied the commands without using RAW onto the tuya esp32 yaml file and that worked finally.

    I copied the codes and inverted the sender (and receiver) and that made it work straight away without using raw codes.
    tuya_rf:
      id: rf
      receiver_disabled: true
      dump: raw
      tx_pin:
         number: P20
         inverted: true
      rx_pin:
        number: P22
        inverted: true



    The reason for my signal learning to be captured from the first pause is that a lot of filtering and assumptions are made on the tuya_rf code. This is explained on the first page of the github repo.

    Quote:
    The rf signal is quite noisy, so I do some filtering to receive the codes:

    The starting pulse must be longer than 6ms but shorter than 10ms.
    any time I see a starting pulse I discard the data and start again (usually the same code is sent more than once).
    the pauses cannot last more than 6ms, if I see a pause longer than that I discard the data and start again.
    the end pulse is around 90ms, I look for a pulse of at least 50ms to detect the end of the data.
    if the end pulse never arrives, when the receiving buffer is about to overflow I discard the data and start again.
  • #30 21542974
    stratos37
    Level 13  
    Posts: 289
    Rate: 123
    Maybe someone.of the Fellows has a diagram of the assembly cable for programming dc270 yooda roller shutters?

Topic summary

✨ The discussion centers on the Tuya SmartLife Universal IR+RF WiFi Remote Control with PCB code S11-SH4-CBU-V2.4, focusing on firmware configuration, IR and RF functionality, and integration with OpenBK and ESPHome platforms. Key technical details include pin assignments such as "wfst_pin" for WiFi status LED, "infrr" for infrared receive, and "infre" for infrared emit. Users share JSON configuration templates and explore programming IR remote functions using OpenBeken firmware. A significant topic is enabling RF transmission and reception, with suggestions to port Tasmota RF drivers (e.g., xdrv_17_rcswitch) due to compatible licenses. Several contributors express interest in developing RF support, noting partial IR functionality but limited RF support in current firmware. Alternative approaches involve flashing custom firmware using Tuya Cloud Cutter and ESPHome, enabling raw RF signal capture and replay, demonstrated with protocols like Dooya DC2702. Discussions include challenges in flashing firmware via USB-to-TTY adapters and successful OTA flashing methods. Users analyze RF signal encoding, including NEC IR codes and 433 MHz raw high/low pulse sequences, and confirm that most 433 MHz RF devices operate unencrypted and do not require pairing, allowing broad compatibility. Additional tools mentioned include CC1101 RF modules with ESP32 and esphome-cc1101 integration for signal decoding and visualization. The thread also touches on scripting examples for TV remote control and requests for assembly cable diagrams for programming related devices.
Generated by the language model.

FAQ

TL;DR: For S11-SH4-CBU-V2.4, 3 core pins matter: P7 IR emit, P8 IR receive, P9 WiFi status; "IR works like a charm" with ESPHome, while RF433 needs tuya_rf or further OpenBeken driver work. This FAQ helps Avatto/Smatrul users flash, map pins, and replay IR/RF codes. [#21618884] Why it matters: The S11 can become a local Home Assistant IR/RF bridge, but only if firmware, pins, and raw RF timing are handled correctly.

Alternative IR support RF433 support Typical use in thread
OpenBeken Works for IR scripting RF driver still requested Existing BK7231 firmware and web app
ESPHome + olivluca/tuya_rf Works on P7/P8 Learn/replay raw RF Home Assistant YAML workflow
ESPHome + CC1101 helper External decoder Cleaner protocol analysis Debugging Dooya-style RF

Key insight: Use P7/P8/P9 as the stable base mapping, then choose firmware by RF needs. ESPHome already shows working RF workflows, while OpenBeken still needs a dedicated RF driver port.

Quick Facts

  • PCB code discussed: S11-SH4-CBU-V2.4, sold as Tuya SmartLife Universal IR+RF WiFi Remote / Avatto S11. [#20618377]
  • Mini pin table:

    Function Pin
    WiFi status LED P9
    Infrared receive P8
    Infrared emit P7

    [#20636079]

  • Tuya model/API data included HMS11CBUSH4, category Universal Remote Control, protocol 2.2, baseline 40.00, and schema IDs 201 and 202. [#21040274]
  • ESPHome examples use bk72xx board: cbu, RF repeat values such as 2, 3, or 7, and IR carrier duty of 50%. [#21618884]
  • RF filtering notes include start pulses 6–10 ms, pause rejection over 6 ms, and an end pulse detected at at least 50 ms. [#21441995]

How do I configure the Avatto/Smatrul S11-SH4-CBU-V2.4 Tuya IR+RF remote pins for OpenBeken or ESPHome?

Configure P7 as IR transmit, P8 as IR receive, and P9 as WiFi status LED. Use CBU as the BK72xx board in ESPHome. A working YAML also uses P23 as reset button. Set remote_transmitter on P7 with 50% carrier duty. Set remote_receiver on P8 with inverted: true. For RF, add tuya_rf and use raw dumps or protocol dumps. [#21618884]

What do the Tuya config fields wfst_pin, infrr, and infre mean on the S11 IR+RF remote?

wfst_pin means WiFi status, infrr means infrared receive, and infre means infrared emit. The mapped values are P9, P8, and P7. "wfst_pin" is a Tuya configuration field that assigns the WiFi status indicator GPIO, letting firmware blink or hold the LED during connection state changes. One contributor used WiFiLED blinking during connection and steady on after connection. [#20636079]

How can I flash ESPHome onto an Avatto S11 with a BK7231N/CBU module after OpenBeken is already installed?

Flash the ESPHome OTA RBL through the OpenBeken OTA panel after renaming the file. 1. Compile ESPHome for bk72xx and board: cbu. 2. Find image_bk7231n_app.ota.rbl, without UG in the filename. 3. Rename it to OpenBK7231N_esphome.rbl and upload it in OpenBeken OTA. This solved a failed USB-to-TTL serial flash on an already OpenBeken-flashed Avatto S11. [#21429534]

What is Tuya CloudCutter and how is it used with the Avatto S11 IR+RF controller?

Tuya CloudCutter was used first to change the stock firmware before building ESPHome from the RF repository. "Tuya CloudCutter" is a flashing method that replaces compatible Tuya firmware without opening the device, commonly used before installing local firmware on supported BK7231 devices. In this thread, the user then built ESPHome inside a Python virtual environment from olivluca/tuya_rf. [#21407223]

What is the CBU module in the Tuya SmartLife Universal IR+RF WiFi remote?

CBU is the BK72xx module target used by the S11 ESPHome configurations. "CBU" is a Tuya/Beken WiFi module category that ESPHome targets with bk72xx board: cbu, enabling firmware builds for BK7231-based Tuya devices. The working YAML sets bk72xx, board: cbu, and framework version: latest. [#21412540]

How do I add RF433 support to OpenBeken for the S11 by porting a Tasmota RF driver?

Add a new OpenBeken driver entry, then create a separate RF driver source file. The proposed path was src/driver/drv_main.c for the driver table. Then create a file such as drv_rf.c. Use an existing driver, such as drv_httpButtons.c, as the structure example. The maintainer stated help was welcome because no RF device was available locally. [#20940597]

Which Tasmota RF driver or RFSend code should be migrated to OpenBeken for 433 MHz support?

Start with Tasmota RFSend and the xdrv_17_rcswitch.ino code path. The OpenBeken maintainer pointed to RFSend search results and line-level rcswitch code. For receive-only work, migrate the RF receiver path instead. The thread separates sending and receiving because each needs different driver behavior and command handling. [#21040232]

How can I use the olivluca/tuya_rf ESPHome component to learn and transmit RF commands on the S11?

Use the olivluca/tuya_rf ESPHome external component, enable raw dumping, then replay captured arrays. 1. Add external_components from the local repo or GitHub URL. 2. Configure tuya_rf with id: rf, receiver_disabled, and dump: raw. 3. Use remote_transmitter.transmit_raw with transmitter_id: rf, repeat count, and captured code. One example used repeat 3 for Dooya commands. [#21412540]

Why do some RF raw high/low codes from the S11 look inverted or start after the first pause?

The S11 capture can start after the first pause because the tuya_rf code filters noisy RF aggressively. It expects a start pulse longer than 6 ms and shorter than 10 ms. It rejects pauses over 6 ms and waits for an end pulse of at least 50 ms. In one working setup, both tx_pin P20 and rx_pin P22 were set inverted. [#21441995]

How can I capture and replay 433 MHz raw RF commands for Dooya, Yooda, Intertech, or Brennenstuhl devices?

Capture the 433 MHz signal as raw high/low timings, then replay the same timing array. Dooya DC2702 commands worked after learning every remote command. Intertech/Brennenstuhl analysis found a 24-bit pattern: 10 device bits, 10 channel bits, and 4 command bits. One measured bit time was 1200 µs, with 0 represented as 900, -300. Rolling-code devices are excluded. [#21432262]

What is the difference between using the S11 built-in RF hardware and a CC1101 module for decoding 433 MHz signals?

The S11 built-in RF hardware can replay raw codes, while CC1101 gives cleaner analysis for decoding. One user used a cheap CC1101 with ESP32 and an ESPHome oscilloscope tool. That setup identified the Dooya protocol and showed the S11 capture was inverted. The CC1101 workflow helped move from raw arrays to protocol-level commands. [#21441995]

OpenBeken vs ESPHome on BK7231 S11 IR+RF remotes — which is better for IR and RF control?

ESPHome is better documented in this thread for combined IR and RF control. OpenBeken already handled IR scripting examples, but RF still required driver work. ESPHome examples show tuya_rf, P7 IR transmit, P8 IR receive, and Home Assistant API support. OpenBeken remains useful when it is already installed, especially for OTA migration to ESPHome. [#21429534]

How do I set up IR transmit and receive on the Avatto S11 using ESPHome remote_transmitter and remote_receiver?

Set remote_transmitter to P7 and remote_receiver to P8 with inversion enabled. A working S11 YAML used carrier_duty_percent: 50% for the IR LEDs. Another example used dump: all and tested LG TV power with transmit_lg data 0x20DF10EF, 32 bits. The thread also shows NEC testing with address 0xFA05 and command 0xEB14. [#21618884]

Why might an S11 variant from Taobao stop powering from USB while still working from UART, and how can it be troubleshot?

The thread reports the failure but gives no confirmed repair. The Taobao S11 variant still worked from UART but no longer restored power from USB. Treat this as a hardware power-path fault first. Check USB 5 V input, connector continuity, regulator output, and any damaged protection components. Compare the board visually with the shared photos before flashing again. [#21609204]

Where can I find or make a programming cable diagram for DC270 Yooda roller shutters?

The thread asks for a DC270 Yooda programming cable diagram but does not provide one. The closest related data is a working Dooya DC2702 RF workflow, not a cable pinout. Do not infer a wiring diagram from RF codes. Use the roller shutter manufacturer documentation or continuity-test the original cable before connecting UART, power, or motor lines. [#21542974]
Generated by the language model.
ADVERTISEMENT