logo elektroda
logo elektroda
X
logo elektroda

BK7231N - Universal IR Remote Contorl

yarix2 34518 176
ADVERTISEMENT
  • #121 20537417
    peterdpetroff
    Level 2  
    Hi team, I flashed OpenBK7231N on AI Smart Remote Control (model:IH-F8260), received from Aliexpress and it's working with Home Assistant very well with the configuration below:
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "AI Smart Remote Control",
      "model": "IH-F8260",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "4244480",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "7": "IRRecv;0",
        "8": "WifiLED;0",
        "26": "IRSend;0"
      },
      "command": "startdriver IR",
      "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }
  • ADVERTISEMENT
  • #122 20546319
    danielvedovato
    Level 2  
    danielvedovato wrote:
    good evening everyone, I ask if you can help me convert this raw data {"IrReceived":{"Protocol":"PulseDistance","Bits":24,"Data":"0xAB054F"}} into an IRSend command to be sent via MQTT.


    hello everyone, is there really no one who can help me?
  • ADVERTISEMENT
  • #123 20546536
    p.kaczmarek2
    Moderator Smart Home
    Hello, I think IRSend command is in the commands documentation:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Or Is there some issue with the command? If you've found a bug, please let us know, we will try to help. Just include the steps to reproduce the issue.
    Helpful post? Buy me a coffee.
  • #124 20547720
    Spark_ru
    Level 1  
    Hello. Thank you for your firmware. I want to use it with my suzuki air conditioner. This is not a popular model of air conditioners, but the TCL air conditioner remote control fits it. When I try to accept commands from the remote, I get this result:
    Debug:IR:IR decode returned true, protocol 0
    Debug:IR: Hash=0x0
    Debug:IR:0 bits (incl. gap and start) received
    Debug:IR:IR decode returned true, protocol UNKNOWN (0)
    Info:IR:IR IR_UNKNOWN 0x0 0

    Is there any workaround so I can use my air conditioner?

    Chipset: BK7231N
    Build: 1.17.11
  • ADVERTISEMENT
  • #125 20548063
    p.kaczmarek2
    Moderator Smart Home
    We have an updated version of IR in work but it requires some more work to be finished:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/723
    It adds many new protocols.

    Some more programming work is needed to finish it, if anyone wants to help, let me know.
    Helpful post? Buy me a coffee.
  • #126 20569376
    anthonythomas
    Level 9  
    Can someone help with MQTT command formatting?

    Testing a button on my TV remote.
    Using the following in the web app command box works great
    IRSend NEC-4-2-0


    When the button is pressed on the remote I get this output in the log

    Info:MQTT:Publishing val IR_NEC 0x4 0x2 0 to obkFFAEEEED/ir/get retain=0
    Info:IR:IR MQTT publish IR_NEC 0x4 0x2 0 took 5ms
    Info:MQTT:Publishing val {"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0xFD02FB04"}} to obkFFAEEEED/RESULT retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkFFAEEEED/ir/get


    If I send the following MQTT publish command
    cmnd/obkFFAEEEED/irsend {"Protocol":"NEC","Bits":32,"Data":"0xFD02FB04","Repeat":2}


    I get this result in the log
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/obkFFAEEEED/irsend {"Protocol":"NEC","Bits":32,"Data":"0xFD02FB04","Repeat":2}
    Error:IR:IRSend cmnd not valid [] not like [NEC-0-1A] or [NEC 0 1A 1].


    What needs changing in the publish command?

    Added after 33 [minutes]:

    Sorted.

    Format as follows works

     switch:
       - unique_id: "OpenBK7231N_FFAEEEED_IR_LG_TV_VolUp"
         name: "OpenBK7231N_FFAEEEED_IR_LG_TV_VolUp"
         command_topic: "cmnd/obkFFAEEEED/IRSend"
         qos: 1
         payload_on: NEC-4-2-0
         payload_off: NEC-4-2-0
         retain: false     
    [/code]
  • #127 20735380
    badgerman
    Level 14  
    Hello, dear community of Elektroda.pl.
    I bought an IR Blaster from AuBees - unfortunately, the manufacturer did not create models for it, but it did not do it itself, so it is highly probable that someone else did it and provided an appropriate model.
    Electronic module of an IR Blaster with LED diodes. Photo of the box for the Aubess WiFi Smart IR Controller. WiFi Smart IR Controller packaging with technical details. Black, round AuBees IR Blaster held in hand. Close-up photograph of the IR Blaster AuBees circuit board with a CBU Becken 7231N component.

    As you can see, the device is based on a CBU based on Becken 7231N and I managed to flash it with OpenBecken. The device responds normally on the network.
    Now I have a few questions (edit - I found the answers - I'm posting them for posterity - maybe someone else will need them):

    1. How can I make sure that the 3 pins are correctly assigned - at this point I signed a bit, suggesting in the first post I assigned - pin 7 (PWM1) as IRSend, pin 8 (PWM2) as IRRecv and pin 24 (PWM4) as WiFi Led.

    In the OpenBecken web application it is possible to select a device - if it is on the list (and it is), the pins are provided. If not, I suspect that you need a voltmeter and a script that will send something (and a remote control that will catalyze the receiver to find the receive pin)

    2. I would like to integrate this device with HomeAssistant - what is the best way to do it? MQTT ? Script control? something else?

    In my case, the best solution was a script that first turns on the projector (a separate microcontroller connected to the projector's COM port - unfortunately, the remote control does not have a direct selection of the input channel, and I use all 3 - you never know which channel was used previously). Later, in order to turn on the receiver, URL queries are sent to the blaster (reading the code from the remote control can be done by observing the application log in the blaster). Helpful sites include:
    to understand the ideas of action:
    https://www.circuitsnoop.com/2022/02/wifi-ir-blaster-hack-part2/
    to help create the URL:
    https://www.urlencoder.org/

    and so - the observed remote control code
     Onkyo 0x7A 0x354A 1 

    The command to send the codes is IRSend
    so the entire command that we paste into the generator from the second link is:
    IRSend Onkyo 0x7A 0x354A 1


    my blaster's IP address is 10.111.1.112, so the entire URL is
    http://10.111.1.112/cm?cmnd=IRSend%20Onkyo%200x7A%200x354A%201


    and now a simple bash script that will hit this URL on the blaster, triggering the recorded sequence
    
    #!/bin/bash
    
    curl http://10.111.1.112/cm?cmnd=IRSend%20Onkyo%200x7A%200x354A%201
    sleep 1
    wait


    the last two lines are optional - the first one will be useful to complicate the script with a few commands, the last one waits until the whole thing is finished. It may look a bit clumsy at first, but it works first class :D


    3. How can I record the remote control commands I would like to use? (if it helps, I need to control mainly the Yamaha HTR-2067 receiver, but I wouldn't mind controlling other things)

    As I mentioned in the previous point - shoot the blaster with the remote control and watch the logs. It is a good idea to turn off unnecessary "ticks" in the log window because there is a lot going on there and you can lose the information you are interested in in the thicket of other information that you do not need at the moment.
  • #128 20780140
    dpprpl
    Level 2  
    Hi all. I have this IR module (without the box) and trying to make it work. I applied config for Tuya Generic Smart Wi-Fi IR Remote Control from Temu IRC02 and it works for sending IR commands, which I can verify with flipper zero, but it doesn't receive anything. I tried to set each pin to IRRecv and rebooting the module but so far no luck. What should I try to do?

    Spoiler:
    IR electronic module with visible components and soldered connections. IR module with an integrated circuit on a dark background.
  • #129 20780158
    p.kaczmarek2
    Moderator Smart Home
    Hello @dpprpl , have you tried to do Tuya config extraction like on our YT channel?
    https://www.youtube.com/watch?v=WunlqIMAdgw&ab_channel=Elektrodacom
    Helpful post? Buy me a coffee.
  • #130 20780264
    dpprpl
    Level 2  
    nvm I figured it out manually) I was sending irsend NEC-EF00-2 from the module to the flipper and when I sent it back to the module it was not showing up in the logs. I enabled flag 15 to allow unknown protocols and then it showed up as Info:IR:IR IR_UNKNOWN 0x8CBEE187 0

    here are the pins if it helps anyone
    Spoiler:
    "pins": {
    "6": "Btn;1",
    "7": "IRRecv;1",
    "8": "WifiLED;1",
    "26": "IRSend;1"
    }
  • #131 20797033
    thanhli113
    Level 3  
    Hi everyone, I bought an IR controller and flashed it successfully but I don't know how to set the GPIO pins to make it work. Please help me do this. A person holding an AI Universal Remote box compatible with Amazon Alexa and Google Assistant. The image shows a printed circuit board with a mounted CB3S module, connected with multicolored wires. The board includes a USB port and an LED.
    This is json code when flashing :
    {
    "reset_pin":"6",
    "wfst_pin":"8",
    "owm":"1",
    "reset_lv":"0",
    "rsthold":"3",
    "wfst_lv":"1",
    "netyc":"1",
    "infrr":"7",
    "netnc":"0",
    "infre":"26",
    "crc":"42",
    "}ac_pin":"0suky1rrb1frmqcq\ifhAgw_di{abi",
    "id":"null",
    "swv":"2.0.0",
    "bv":"40.00",
    "pv":"2.2",
    "lpv":"3.3",
    "pk":"key54vrth5askhsj",
    "firmk":"key54vrth5askhsj",
    "cadv":"1.0.3",
    "cdv":"1.0.0",
    "dev_swv":"2.0.0",
    "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 }3LBwf_start_mdll",
    "md":"0",
    "random":"0",
    "wfb64":"1",
    "stat":"0",
    "token":"null",
    "region":"null",
    "reg_key":"null",
    "dns_prio":"00Atls_ca_cnt0 )OBgw_wsm{nc_tp",
    "ssid":"null",
    "passwd":"null",
    "psk_key":"lnlN3wDO6KGt7bn4t2hcjiMTXFqzZ2mLdrZlF",
    "auth_key":"rj9jHPw0i5PAyS1f9IgS7Lu82v5ANayl",
    "ap_ssid":"SmartLife",
    "ap_passwd":"null",
    "country_code":"null",
    "bt_mac":"null",
    "bt_hid":"null",
    "prod_test":"false",
    "fac_pin":"0suky1rrb1frmqcqAgw_ai{key",
    "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":"a47c1f50aa3b9465",
    "wx_uuid":"null",
    "dy_tls_m":"0",
    "cloud_cap":"0",
    "psk21_key":"null }0DAis_stride0{abi",
    "property":"{type",
    "maxlen":"3072}",
    "type":"obj}",
    "{mode":"ro",
    "wx_app_id":"null"
    }
  • #132 20799443
    chris28
    Level 1  
    Hey @thanhli113 I also got stuck on this when the generated script in the "Import" tab of the web app didn't work for me.

    I went through all the PWM pins (6, 7, 8, 9, 24, 26) til I got everything working, with:
      "pins": {
         "6": "Btn;1",
         "7": "IRRecv;0",
         "8": "WifiLED;0",
         "26": "IRSend;0"
       }
    


    However, it was only then that I spotted those pin numbers in my JSON.
    {
      "crc": 1,
      "infre": 26,
      "infrr": 7,
      "netnc": 0,
      "netyc": 1,
      "owm": 0,
      "reset_lv": 0,
      "reset_pin": 6,
      "rsthold": 3,
      "wfst_lv": 1,
      "wfst_pin": 8
    }


    So, I think the key fields in your json code are:
    reset_pin: 6 # pin6(PWM0)  - "RESET" button?
    reset_lv: 0  #             - ???
    wfst_pin: 8  # pin8(PWM2)  - "WiFi STatus" LED?
    wfst_lv: 1   #             - ???
    infrr: 7     # pin7(PWM1)  - "INFRared Receive"?
    infre: 26    # pin26(PWM5) - "INFRared Emit"?


    ie. as you have the same JSON as mine (just with a bunch of additional fields).
    (although we do differ on values for owm (0 vs 1) and crc (1 vs 42) ... whatever they are?!?)

    Nb. I could tell I had mine setup correctly because:
    * reset shows up in the logs as `Info:GEN:6 key_short_press` when I press the button
    * wfst LED flashes when connecting to wifi and stays on when connected
    * infrr shows up in the logs when I point a remote at the device and I have `Flag 15 - [IR] Allow 'unknown' protocol` enabled
    * infre shows up when sending an example command `IRSend Onkyo 0x7A 0x354A 1` and looking at the device with an android phone to see the actual Infrared flashes of light

    I then went spelunking around the code looking for why the script generation wasn't working.
    However I don't see any sign of these fields in the templateParser.js.
    Perhaps someone has a PR in the works to add mappings for these extra fields?
  • #133 20801082
    thanhli113
    Level 3  
    Tks for help, i testing and found IRSend is pin24, can you help me how to using Homekit ?
  • #134 20840390
    brianroy86
    Level 6  
    I ended up giving up on esphome and put OpenBKon this, but I have the S08 Pro which has the temp/humidity sensors in it. How would I go about configuring them in OpenBK? They are DP ID's 101 for temp and 102 for humidity.

    In esphome I had to set the uart config as follows.

    uart:
    rx_pin: RX1
    tx_pin: TX1
    baud_rate: 9600

    and the sensors portion to

    sensor:
    - platform: tuya
    sensor_datapoint: 101
    name: Temperature
    unit_of_measurement: ""
    accuracy_decimals: 1
    filters:
    - lambda: return (x * 0.1) * (9.0/5.0) + 32.0;

    - platform: tuya
    sensor_datapoint: 102
    name: Humidity
    unit_of_measurement: "%"


    How would this translate to OpenBK?
  • ADVERTISEMENT
  • #135 20840402
    p.kaczmarek2
    Moderator Smart Home
    Hello @brianroy86 , can you provide more information on your device? Is this a TuyaMCU device? Maybe a photo of the inside? That looks like 9600, if so, you need to write autoexec.bat.

    Can you try with the basic one?
    
    // start TuyaMCU driver
    startDriver TuyaMCU
    // set TuyaMCU default wifi state 0x04, which means "paired",
    // because some TuyaMCU MCUs will not report all data
    // unless they think they are connected to cloud
    tuyaMcu_defWiFiState 4
    
    
    // channel 1 will be temperature
    setChannelType 1 temperature
    // Map given dpID to channel 1, dpID type value
    linkTuyaMCUOutputToChannel 101 val 1
    
    

    See more at: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md

    I am not sure if it will work, so please check this and give feedback here, I will try to guide you step by step through the configuration. Still, I'm suprised, I wasn't aware that there is an IR remote that has TuyaMCU as well... or maybe it works in a different way?
    Helpful post? Buy me a coffee.
  • #137 20840567
    p.kaczmarek2
    Moderator Smart Home
    brianroy86 wrote:
    Thank you! I have pictures that I took under this thread.
    https://www.elektroda.com/rtvforum/topic4016699.html

    And there is a teardown someone else did when they replaced the chip with an esp8266 here.
    https://github.com/arendst/Tasmota/discussions/12767

    So, that SOIC chip is the MCU connected to WiFi module via UART on RX1 and TX1?

    brianroy86 wrote:
    What do I do with this autoexec script?

    Please consult the following video guide:



    See more detailed IoT guides at our channel: https://www.youtube.com/@elektrodacom
    Helpful post? Buy me a coffee.
  • #138 20840588
    brianroy86
    Level 6  
    p.kaczmarek2 wrote:
    brianroy86 wrote:
    Thank you! I have pictures that I took under this thread.
    https://www.elektroda.com/rtvforum/topic4016699.html

    And there is a teardown someone else did when they replaced the chip with an esp8266 here.
    https://github.com/arendst/Tasmota/discussions/12767

    So, that SOIC chip is the MCU connected to WiFi module via UART on RX1 and TX1?

    Maybe? I don't know what that means unfortunately.
  • #139 20840598
    p.kaczmarek2
    Moderator Smart Home
    Ok, so please check my autoexec.bat , save it to the device, reboot it, and open web app log to check if there are any TuyaMCU messages received. We'll know if it's TuyaMCU soon enough.

    Added after 44 [seconds]:

    EDIT: That github makes it clear it's TuyaMCU:
    Circuit board with labeled components such as AHT10 SDA/SCL, buttons, and LED.
    They suggest MCU removal, but that's not needed with OBK
    Helpful post? Buy me a coffee.
  • #140 20840657
    brianroy86
    Level 6  
    Your script seems to have worked. I went and added the humidity as well. The only issue, is the temperature is not formatted correctly. It is showing as 205 degrees Celsius, I think I need to move the decimal and convert to Fahrenheit. Any idea how I would do that?

    Screenshot from a console displaying temperature and humidity values.
  • #141 20840661
    p.kaczmarek2
    Moderator Smart Home
    Yes, as specified in our docs:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/README.md
    You may change channel type from temperature to temperature_div10. Here are channel types:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/channelTypes.md

    Then you will most likely want to do a Home Assistant configuration, that can be done via automatic HASS Discovery:




    EDIT: If you want a display in F I can add it as well, but we don't have this unit yet.
    Helpful post? Buy me a coffee.
  • #142 20841918
    brianroy86
    Level 6  
    Thank you for your help so far, I got those 2 sensors working just fine, and Home Assistant translates it from C to F automatically so I don't see a need to send it in F at this time.

    The last thing I need some help with is sorting out the IR codes. If I press a button on my remote I see the following in the logs.

    Info:IR:IR IR_NEC 0x4 0x2 0

    I've created a sensor in HA that looks like the following:
    switch:
    - unique_id: "OpenBKTestIR"
    name: "OpenBKTestIR_Power"
    command_topic: "cmnd/OpenBK/TestIR/IRSend"
    qos: 1
    payload_on: NEC-4-2-0
    payload_off: NEC-4-2-1
    retain: false

    And if I press that switch I get the following in my OBK logs.

    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/OpenBK/TestIR/IRSend
    Info:IR:Delay 100ms
    Info:IR:IR send NEC-4-2-0 protocol 7 addr 0x4 cmd 0x2 repeats 0

    But the volume doesn't change on my TV, and if I look at the LED's through my phone camera they don't light up.

    Any ideas what I could be doing wrong?
  • #143 20843038
    darkling07
    Level 3  
    >>20397694
    I tried changing the ir_Sony.hpp file
    sendPulseDistanceWidth(&SonyProtocolConstants, tData, numberOfBits, aNumberOfRepeats);
    to
    sendPulseDistanceWidth(&SonyProtocolConstants, tData, 12, aNumberOfRepeats);
    and it works! Probably the numberOfBits parameter is not initialized
  • #144 20843045
    p.kaczmarek2
    Moderator Smart Home
    @brianroy86 are you using VFonov version with new IR library old main OBK tree?

    @darkling same, which version? I will add a fix right away, thanks!
    Helpful post? Buy me a coffee.
  • #145 20843059
    brianroy86
    Level 6  
    No idea, I’m just using the official latest release from GitHub, I think it’s 308
  • #146 20843437
    darkling07
    Level 3  
    >>20843045
    Version? I use OpenBK7231T_App from git and Tuya mini universal IR Remote ( Chipset: BK7231N CBU Model: Unknown ) I think the problem is that commands like sony-10-13-1 do not contain information about the number of bits and the corresponding field remains null, but is used afterwards
  • #147 20845116
    estqwerty
    Level 5  
    what i do wrong?
    "IRsend IR_NEC 0xF04 0xAD 1" is not blinking ir leds.
    but "IRSend Onkyo 0x7A 0x354A 1" is blinking ir leds.
    i am using "execute custom command" from config menu.

    device is s18
    firmware flashed : 1.17.308

    figured : "IRsend NEC 0xF04 0xAD" is working.

    next:
    how to run DAIKIN AC commands?
    Info:IR:IR IR_UNKNOWN 0xB3E2CB06 0
    Info:IR:IR IR_UNKNOWN 0x0 0
    Info:IR:IR IR_UNKNOWN 0x0 0
  • #148 20846752
    Nargo
    Level 22  
    Today I released the AVATTO S16 IR transmitter purchased a few days ago in "Kleoshop". Below are photos of the device and pin configuration
     "pins": {
        "7": "IRSend;0",
        "8": "IRRecv;0",
        "24": "LED_n;10",
        "26": "Btn;12"
      },


    The board has individual +V, GND, Rx and Tx fields.
    To my unprofessional eye, Rx and Tx are connected to the USB port.
    Reading the batch did not pose any problem.
    The recording failed with the YP-05 converter, probably due to the lack of a decent 3.3V voltage.
    The ESP-01 programmer saved everything on the first try.

    IR Transmitter AVATTO S16 on a blue mat AVATTO S16 IR transmitter on a blue mat. AVATTO S16 IR transmitter on blue background View of the interior of the AVATTO S16 IR transmitter with an open casing. Top view of the AVATTO S16 IR transmitter circuit board with mounted diodes. IR AVATTO S16 board on a blue background Bottom view of a PCB with visible traces. Close-up of a circuit board with a CBU module and pin labels. Close-up of the AVATTO S16 IR transmitter circuit board showing connection pads and electronic components. Close-up of a circuit board with various electronic components and a wireless module. IR AVATTO S16 with wires and adapter on a service mat Box of AVATTO S16 IR Transmitter on a blue mat. Packaging of the AVATTO S16 IR Transmitter with barcode and technical specifications. SmartIR Remote Control (S16) manual on a blue background.

    The problem noticed is that the device does not correctly decode air conditioning remote controls:
    I have Daikin and Kaisai and it's a problem.
  • #150 20847948
    p.kaczmarek2
    Moderator Smart Home
    darkling07 wrote:
    >>20397694
    I tried changing the ir_Sony.hpp file
    sendPulseDistanceWidth(&SonyProtocolConstants, tData, numberOfBits, aNumberOfRepeats);
    to
    sendPulseDistanceWidth(&SonyProtocolConstants, tData, 12, aNumberOfRepeats);
    and it works! Probably the numberOfBits parameter is not initialized


    The following fix is still pending, I will look into it soon. If anyone wants to investigate more in depth, please do, and let me know.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the BK7231N Universal IR Remote Control, focusing on its disassembly, pin configuration, and firmware updates. Users share experiences with flashing the device, configuring IR send/receive functionalities, and troubleshooting issues related to IR protocols, particularly for various remote controls including air conditioners. Key points include successful firmware updates that enabled IR functionality, the importance of correct pin assignments for IRSend and IRRecv, and the challenges faced with specific protocols like Sony and Daikin. Users also discuss MQTT integration for sending IR commands and the need for additional IR protocols to support more devices.
Summary generated by the language model.
ADVERTISEMENT