logo elektroda
logo elektroda
X
logo elektroda

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

hakimmuhiddin 7062 29
ADVERTISEMENT
  • #1 20618377
    hakimmuhiddin
    Level 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
    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  

    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
    

  • #5 20625227
    p.kaczmarek2
    Moderator Smart Home

    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 12  
    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

    So wfst_pin is a WiFiLED_n? It seems I should update my config generator. Thanks!
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #8 20636984
    jkwim
    Level 12  

    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.
  • ADVERTISEMENT
  • #9 20641825
    bobthemonkee
    Level 5  

    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

    Here's a TV remote scripting example:



    Helpful post? Buy me a coffee.
  • #11 20696413
    wak5670
    Level 2  
    Anyone figure out how to receive RF transmission?
  • #12 20696669
    p.kaczmarek2
    Moderator Smart Home
    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  

    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  
    >>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  

    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  

    @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
    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 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
    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 34  
    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 4  

    >>21040232
    Thanks for your assistance. I'll have a look at it.
  • #22 21407223
    kar200
    Level 3  
    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  
    >>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 3  
    >>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  
    >>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  
    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  
    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  
    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 3  
    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 12  
    Maybe someone.of the Fellows has a diagram of the assembly cable for programming dc270 yooda roller shutters?

Topic summary

The discussion revolves around the Tuya SmartLife Universal IR+RF WiFi Remote Control with PCB code S11-SH4-CBU-V2.4. Users are seeking assistance with programming specific functions into the remote and understanding the JSON configuration format. Key points include the identification of pin functions such as "wfst_pin" for WiFi status and "infrr" and "infre" for infrared receive and emit, respectively. There is interest in porting the Tasmota RF driver to enable RF transmission capabilities, with several users expressing willingness to contribute to the development. The conversation also touches on the Tuya API and its integration with the device.
Summary generated by the language model.
ADVERTISEMENT