logo elektroda
logo elektroda
X
logo elektroda

BK7231N - Universal IR Remote Contorl

yarix2 34524 176
ADVERTISEMENT
  • #61 20272067
    avdm
    Level 5  
    I've received a second version of the blaster. Here's a tear down of both blasters and the Pin connections that seem to work for me.

    Model: iH-F8260 / PCB: v4
    Photos:
    Spoiler:
    BK7231N - Universal IR Remote Contorl BK7231N - Universal IR Remote Contorl


    Model: iH-F8260 / PCB: v4 pin
    Pin Symbol I/O type Function Possible connection
    14 P7 I/O GPIOP_7, which corresponds to P7 of the IC, PWM 1 IRRecv
    5 P26 I/O GPIOP_26, which corresponds to P26 of the IC, PWM 5 IRSend
    13 P8 I/O GPIOP_8, which corresponds to P8 of the IC, PWM 2 (wifi) status led


    Model S08 / PCB: S06-CBU-V1.2
    Photos:
    Spoiler:


    Model S08 / PCB: S06-CBU-V1.2 Pin
    Pin Symbol I/O type Function Possible connection
    8 P8 I/O Support hardware PWM (Correspond to Pin 24 of the IC) IRrecv
    9 P7 I/O Support hardware PWM (Correspond to Pin 23 of the IC) IRsend
    12 P24 I/O GPIOP_24, which corresponds to P24 of the IC, PWM 4 (wifi) status led


    They can receive each other’s commands. Testing a command can be done trough the terminal/log screen. Example:
    IRsend NEC 0x1000 0x0 1


    For some reason it doesn't seem to send all protocols the right way. When I try:
    IRsend Panasonic 0x1CA 0x3D 
    IRsend Sony 0x1 0x15 1

    The receiver shows an Unkown or garbage code on my second blaster and my devices (TV or audio receiver) don't seem to respond. Any idea what I could be doing wrong? The code below does work correctly on both my TV decoder and when I try to receive it with another blaster.
    IRsend NEC 0x1000 0x0 1
  • ADVERTISEMENT
  • #62 20273998
    p.kaczmarek2
    Moderator Smart Home
    @btsimonh , the maintainer of IR driver, is temporary away, we will look into it together when he comes back. I can assist with the scope as I have Rigol DS1054 at hand.

    Thank you for posting device information. I will add it to our online database so it can be useful for future users.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #63 20280560
    dksaarth
    Level 2  
    Awesome finding this project and somebody with the same IR blaster as well!

    I also have the Model S08 (with the PCB now showing V1.3)

    Pin 8 works for receiving, although not with my aircon remote. It just shows Info:IR:IR IR_UNKNOWN 0x0 0 for any button.

    Other remotes I tested with appear to show proper codes.

    However I didn't see any flashes from the leds through my phone's camera when trying to send on Pin 9, not sure if that's guaranteed with these leds or not, but TV etc didn't respond either.

    Might order another one to provide a better testbed - unfortunately don't have a scope.
  • #64 20280588
    p.kaczmarek2
    Moderator Smart Home
    Hello, can you specify whether your IR blaster is using a BK7231T or BK7231N?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #65 20280701
    avdm
    Level 5  
    dksaarth wrote:
    Awesome finding this project and somebody with the same IR blaster as well!

    I also have the Model S08 (with the PCB now showing V1.3)

    Pin 8 works for receiving, although not with my aircon remote. It just shows Info:IR:IR IR_UNKNOWN 0x0 0 for any button.

    Other remotes I tested with appear to show proper codes.


    I have the same results with some remotes.I think the protocol for those specific remotes is not supported (yet).

    dksaarth wrote:

    However I didn't see any flashes from the leds through my phone's camera when trying to send on Pin 9, not sure if that's guaranteed with these leds or not, but TV etc didn't respond either.

    Might order another one to provide a better testbed - unfortunately don't have a scope.


    In some cases I have the same issue. Could you try this one and see if it flashes? For me this one works. Try it a couple of times in the dark to increase the chance of picking up the light with your camera.
    IRsend NEC 0x1000 0x0 1


    p.kaczmarek2 wrote:
    Hello, can you specify whether your IR blaster is using a BK7231T or BK7231N?


    Sure! They are both are using a version of the BK7231N. The Model S08 uses the CBU and the iH-F8260 uses the CB3S. The last one seems to have the exact same pin configuration as the Jinvoo AC/TV Box IR Controller (SM-AW502S) including the button on p6.
  • #66 20282426
    gcole
    Level 3  
    btsimonh wrote:
    omelchuk890 wrote:
    there is no way through mqtt

    is there no way to send commands via MQTT? - that is something we should resolve....
    cmnd/ir_blaster/IRSend = no way, surely not impemented!!!

    using a false pin is an interim solution. One question is, why are you getting IR on real input?


    MQTT works just fine via Node Red, just publish to cmnd/nameofdevice/IRSend

    I send something like the following NEC 0x4 0x8 which is power toggle for my display.
  • ADVERTISEMENT
  • #67 20285656
    grbit
    Level 2  
    avdm wrote:
    I've received a second version of the blaster. Here's a tear down of both blasters and the Pin connections that seem to work for me.

    Model S08 / PCB: S06-CBU-V1.2 Pin
    Pin Symbol I/O type Function Possible connection
    8 P8 I/O Support hardware PWM (Correspond to Pin 24 of the IC) IRrecv
    9 P7 I/O Support hardware PWM (Correspond to Pin 23 of the IC) IRsend
    12 P24 I/O GPIOP_24, which corresponds to P24 of the IC, PWM 4 (wifi) status led



    @avdm Can you please specify exactly firmware you have used for S06-CBU-V1.2? I have V1.3, all pins are the same, but none of IR leads are light up on "IRSend" command. I can read IR signals, but can't send them. Maybe with a different firmware it'll be better.
  • #68 20285762
    p.kaczmarek2
    Moderator Smart Home
    @grbit may I know which OBK version are you using? Some earlier versions just didn't have IR send implemented. We're constantly working to make our firmware better for you guys.
    Helpful post? Buy me a coffee.
  • #69 20285821
    grbit
    Level 2  
    @p.kaczmarek2 if I'm not mistaken it's OpenBK7231N_QIO_1.15.3.bin
  • #70 20290847
    avdm
    Level 5  
    grbit wrote:
    avdm wrote:
    I've received a second version of the blaster. Here's a tear down of both blasters and the Pin connections that seem to work for me.

    Model S08 / PCB: S06-CBU-V1.2 Pin
    Pin Symbol I/O type Function Possible connection
    8 P8 I/O Support hardware PWM (Correspond to Pin 24 of the IC) IRrecv
    9 P7 I/O Support hardware PWM (Correspond to Pin 23 of the IC) IRsend
    12 P24 I/O GPIOP_24, which corresponds to P24 of the IC, PWM 4 (wifi) status led



    @avdm Can you please specify exactly firmware you have used for S06-CBU-V1.2? I have V1.3, all pins are the same, but none of IR leads are light up on "IRSend" command. I can read IR signals, but can't send them. Maybe with a different firmware it'll be better.


    I've been using the latest versions for a while. At the moment going to update from 1.15.34 to 1.15.44.

    I think I understand what's going on. The formatting of the table is a bit unclear is I copied it from the datasheet. The first number is the pin number of module on the PCB. The second number (symbol) is the function of the pin on the software side. You have to look at the symbol value to configure the Pin number in the web interface. So 9 is pin 9 on the PCB and has the function (symbol) of Pin 7 in software. Sorry I completely overlooked that. To send correctly set IRSend to 7.

    Below as screenshot of my config of the s08.

    BK7231N - Universal IR Remote Contorl
  • #72 20305872
    p.kaczmarek2
    Moderator Smart Home
    Hello, have you set IR Send pin and restarted your device afterwards?
    Helpful post? Buy me a coffee.
  • #73 20309296
    avdm
    Level 5  
    ionoleinic wrote:
    Hi people, which is the correct mqtt topic for sending IR comands ?
    I have tried cmnd/ir_name/IRSend RC5-1-1-0 and cmnd/ir_name/IRSend RC5 0x1 0x1 0.
    Both aren't recognized.
    BK7231N - Universal IR Remote Contorl
    I have this device : https://www.elektroda.com/rtvforum/topic3933390.html
    Thanks.


    Strange, this works for me:
    cmnd/IRBlaster/IRSend
    Raw: NEC 0x80 0x12

    Here are screenshots of mqtt explorer and the log.

    BK7231N - Universal IR Remote Contorl BK7231N - Universal IR Remote Contorl
  • #74 20309619
    syfq91
    Level 2  
    Hi,

    I have 2 S08 IR (PCB: S06-CBU-V1.3) remote that i flashed with BK7231N firmware a few weeks ago.
    It can connect to wifi and I can access the web UI. But the IR send/recv does not work, so I assumed my device is broken.

    A few days ago, after I updated the firmware and suddenly IR start working on 1 of the board. I can see IR response in the Logs page.
    But another board it still does not work. Nothing shows in the Logs when I use IR send command or point IR remote to it.

    Any idea why suddenly 1 of the board start working?
    Beside setting the pin and restart, is there anything I need to do before the board can detect/send IR command?

    these are pin settings:
    BK7231N - Universal IR Remote Contorl
    both device shows IR drivers active.
    BK7231N - Universal IR Remote Contorl
  • #75 20309809
    p.kaczmarek2
    Moderator Smart Home
    That's strange, have you done reboot AFTER setting the IRSend/IRRecv pins?

    Changing those pins at runtime won't apply until next reboot.

    @btsimon, thoughts?
    Helpful post? Buy me a coffee.
  • #76 20310645
    thinhvq
    Level 2  
    Hi,
    I have a S06 IR (PCB: S06-CBU-V1.3) and want to flash BK7231N firmware. Is anyone help me how to flash it via serial? Circuit board of an open Wi-Fi IR controller case. A circuit board with an electronic module in an open casing.
    Thanks you
  • #77 20310649
    syfq91
    Level 2  
    p.kaczmarek2 wrote:
    That's strange, have you done reboot AFTER setting the IRSend/IRRecv pins?

    Changing those pins at runtime won't apply until next reboot.


    Yes, I have reboot it after setting the pin. But IR still doesn’t work on 1 of the board.
  • #78 20312011
    ionoleinic
    Level 10  
    Hi, @p.kaczmarek2 how can i make a mqtt post to a topic when IRRecv is handled?
    Something like this: stat/sonoffIRBridge_1/RESULT = {"IrReceived":{"Protocol":"RC_5","Bits":0x1,"Data":"0xC"}}
    I need this for my project .
    Thank you.
  • #79 20312098
    p.kaczmarek2
    Moderator Smart Home
    @syfq91 hmm it would be interesting to read both flashes (full 2MB) and compare them, but it requires some work, so maybe... first just to make sure, can you try if the problems persists if you disable MQTT (enter empty host) on the problematic device?

    @ionoleinic there is a simple publish made when you enable it in Flags, but I see you are quoting a json format, would you need that one? I can add json publish format as well in a day or two, if that's needed.

    Dodano po 11 [godziny] 30 [minuty]:

    IR publish system updated!
    We support two publish formats - raw and JSON (Tasmota style).
    You can enable them in flag:
    BK7231N - Universal IR Remote Contorl
    This is how they look like in HA:
    BK7231N - Universal IR Remote Contorl
    if there is some kind of issue in JSON, please report, I don't have Tasmota device to compare if our format is OK


    Please also remember about possibility to script IR events!
    Create autoexec.bat:
    BK7231N - Universal IR Remote Contorl
    
    clearAllHandlers
    addEventHandler2 IR_Samsung 0x707 0x60 setChannel 1 0
    addEventHandler2 IR_Samsung 0x707 0x61 setChannel 1 1
    

    Write script:
    BK7231N - Universal IR Remote Contorl
    Script will run on reboot. You can also exec it now with a button.
    Now that IR buttons will enable and disable relay.
    You can also use toggleChannel to toggle a channel within a single event.
    You can also use "led_addDimmer 10" to change brightness of LED, you can use "led_basecolor_rgb" to set color, you can use "led_nextColor" to set the next predefined color of RGB strip.


    You can also do a custom publish:
    BK7231N - Universal IR Remote Contorl
    Result in HA:
    BK7231N - Universal IR Remote Contorl
    Helpful post? Buy me a coffee.
  • #80 20314424
    ionoleinic
    Level 10  
    Thank you very much @p.kaczmarek2 . Can you also add JSON format for switches and smart plugs sensor data? And i have one problem.When i send cmnd/name/POWER without payload i should get current power status without do nothing, but your obk ignore it and power off the relay. This is a problem for me because i interrogate this way the device to get current power status (for example when my application starts).
  • #81 20315543
    p.kaczmarek2
    Moderator Smart Home
    ionoleinic wrote:
    And i have one problem.When i send cmnd/name/POWER without payload i should get current power status without do nothing, but your obk ignore it and power off the relay.

    This is not supposed to happen. I will try to fix it, but first, I need more information.

    Does the problem also happen if you send it by HTTP, like in Tasmota?
    I mean:
    
    http://127.0.0.1/cm?cmnd=POWER
    

    it should just return current state.

    On the other hand, this should power off:
    
    http://127.0.0.1/cm?cmnd=POWER%20OFF
    

    and this power on
    
    http://127.0.0.1/cm?cmnd=POWER%20ON
    


    Please check and provide the information about which I asked above.
    Helpful post? Buy me a coffee.
  • #82 20315705
    syfq91
    Level 2  
    p.kaczmarek2 wrote:
    @syfq91 hmm it would be interesting to read both flashes (full 2MB) and compare them, but it requires some work, so maybe... first just to make sure, can you try if the problems persists if you disable MQTT (enter empty host) on the problematic device?


    Disabling MQTT does not solve the issue.

    I'm not sure what happened, but the problematic device suddenly reset itself. All setting lost, and now it appeared as OpenBK7231N_........
    I tried to set the pin again but it still not working.

    How to read both flashes? Is it different from read RFconfig/Config/FlashVar in the web app?
  • #83 20321723
    ionoleinic
    Level 10  
    p.kaczmarek2 wrote:
    ionoleinic wrote:
    And i have one problem.When i send cmnd/name/POWER without payload i should get current power status without do nothing, but your obk ignore it and power off the relay.

    This is not supposed to happen. I will try to fix it, but first, I need more information.

    Does the problem also happen if you send it by HTTP, like in Tasmota?
    I mean:
    
    http://127.0.0.1/cm?cmnd=POWER
    

    it should just return current state.

    On the other hand, this should power off:
    
    http://127.0.0.1/cm?cmnd=POWER%20OFF
    

    and this power on
    
    http://127.0.0.1/cm?cmnd=POWER%20ON
    


    Please check and provide the information about which I asked above.



    HTTP works
    BK7231N - Universal IR Remote Contorl

    But with mqtt, it doesn't publish current state to the topic qiachip_switch/1/get.
    BK7231N - Universal IR Remote Contorl
  • #84 20323730
    doe699450
    Level 2  
    Hi everybody,

    Is there possible to add protocols for Air Conditioners ?
    Now if I try to read any IR data from IR Remote for my Mitsu AIR Con , I get IR_UNKNOWN 0x0 0.
    I guess that's because of no support for AC in FW, other IR Remotes read fine.
  • #85 20324448
    p.kaczmarek2
    Moderator Smart Home
    Hello @doe699450 , as far as I know, our contributor @btsimonh used the same IR Library that is popular among Arduino users and that is used by Tasmota.
    Do you know if that protocol is supported already by Tasmota? I am asking in order to make sure if that's simply not supported protocol, and not the bug.




    ionoleinic wrote:

    HTTP works
    BK7231N - Universal IR Remote Contorl

    But with mqtt, it doesn't publish current state to the topic qiachip_switch/1/get.
    BK7231N - Universal IR Remote Contorl

    huh, are you saying that doing that HTTP request should trigger a publish? Do I understand correctly?
    It is not implemented yet, simply, but I can do that for you in a hour, if you just need it.

    Can you describe exactly the behaviour you need? So, basically, you want the "STATUS" command to also trigger MQTT publish of channel values?

    The publish is done when changing the state of relay, and if you enable "broadcast self state every minute" it's also done periodically. It can be also done on MQTT connect (publishing initial values). The publish is not yet on when receiving STATUS.
    Helpful post? Buy me a coffee.
  • #86 20324757
    ionoleinic
    Level 10  
    p.kaczmarek2 wrote:
    huh, are you saying that doing that HTTP request should trigger a publish? Do I understand correctly?
    It is not implemented yet, simply, but I can do that for you in a hour, if you just need it.

    I dont use http commands in my project.I use only mqtt.
    p.kaczmarek2 wrote:
    Can you describe exactly the behaviour you need? So, basically, you want the "STATUS" command to also trigger MQTT publish of channel values?

    Yeah, just like in tasmota, for example if i need senzor status, i request it with ( cmnd/mqtt_name/STATUS 8) and topic for publishing will be ( stat/mqtt_name/STATUS8 ) and so on.For power status in tasmota you just make a req to the topic cmnd/mqtt_name/POWER but without payload, and it should publish back current status to the topic (stat/mqtt_name/POWER)
  • #87 20324766
    doe699450
    Level 2  
    Hello @p.kaczmarek2 ,

    According to info on Tasmota docs (https://tasmota.github.io/docs/Tasmota-IR/) , the protocol of my Aircon should be supported (MITSUBISHI_AC) in IRremoteESP8266 library that used by Tasmota.
    If I type a command like "IRSend Mitsubishi 0x08 0x04 1" and send it in command prompt, I get
    Info:IR:Delay 100ms
    Info:IR:IR send Mitsubishi 0x4 0x8 protocol 0 addr 0x4 cmd 0x8 repeats 0
    But I can't see any data transmition by IR LED. At the same time command like "IRSend NEC 0x08 0x04 1" work out right and I can see IR LED transmition.
  • #88 20324910
    omelchuk890
    Level 11  
    Does anyone have the authority to move posts 80, 81, 83, 85 and 86 to the topic "[BK7231T] my HTTP server, configurator, MQTT, for home assistant support" - it seems to me that they are superfluous here, but very relevant in this topic.
  • #89 20325247
    p.kaczmarek2
    Moderator Smart Home
    ionoleinic wrote:

    Yeah, just like in tasmota, for example if i need senzor status, i request it with ( cmnd/mqtt_name/STATUS 8) and topic for publishing will be ( stat/mqtt_name/STATUS8 ) and so on.For power status in tasmota you just make a req to the topic cmnd/mqtt_name/POWER but without payload, and it should publish back current status to the topic (stat/mqtt_name/POWER)

    Ok I will add it. Can you just provide me a little bit more information?

    1. Is Tasmota doing a MQTT reply publish if I send the "POWER" (without arguments, so only polling status) command by HTTP? Or is the MQTT published only if I send the initial command by MQTT?
    2. Would you be able to make a list of publish+reply pairs that you think are needed? I need a list to know what to implement. I want to keep good compatibility with Tasmota, basically 1:1

    doe699450 wrote:
    the protocol of my Aircon should be supported (MITSUBISHI_AC) in IRremoteESP8266 library

    Huh, thanks, you made me realize what's wrong! We need to update our IRLibrary. We have an older version. Thanks again, that's a useful information.
    @btsimonh , as a maintainer of IR stuff, would you be able to do that?
    Helpful post? Buy me a coffee.
  • #90 20326374
    ionoleinic
    Level 10  
    p.kaczmarek2 wrote:
    2. Would you be able to make a list of publish+reply pairs that you think are needed? I need a list to know what to implement. I want to keep good compatibility with Tasmota, basically 1:1

    POWER publish -> cmnd/mqtt_name/POWER ON/OFF reply -> stat/mqtt_name/POWER
    example result ->ON
    cmnd/tasmota_switch/Power ← // an empty message/payload sends a status query
    ↳ stat/tasmota_switch/RESULT → {"POWER":"OFF"}
    ↳ stat/tasmota_switch/POWER → OFF
    more info: https://tasmota.github.io/docs/MQTT/#management

    SENZOR publish -> cmnd/mqtt_name/STATUS 8 reply -> stat/mqtt_name/STATUS8
    ex. result -> {StatusSNS: {
    Time: '0000-00-00T00:00:00',
    ENERGY: {
    TotalStartTime: '2022-10-13T16:13:07',
    Total: '-:-',
    Yesterday: '-:-',
    Today: '-:-',
    Power: '-:-',
    ApparentPower: '-:-',
    ReactivePower: '-:-',
    Factor: '-:-',
    Voltage: '-:-',
    Current: '-:-',
    },
    },
    }
    if device hasn't sensors, return will be -> {StatusSNS: {Time: '0000-00-00T00:00:00'}}

    NET INFO publish -> cmnd/mqtt_name/STATUS 5 reply -> stat/mqtt_name/STATUS5
    ex. result-> {"StatusNET":{
    "Hostname":"gosundsp111",
    "IPAddress":"192.168.0.100",
    "Gateway":"192.168.0.1",
    "Subnetmask":"255.255.255.0",
    "DNSServer1":"192.168.0.1",
    "DNSServer2":"0.0.0.0",
    "Mac":"C4:4F:33:F7:C4:C7",
    "Webserver":2,"HTTP_API":1,
    "WifiConfig":4,
    "WifiPower":17.0
    }
    }
    ... and so on for all status info.
    BK7231N - Universal IR Remote Contorl
    more info about commands and status : https://tasmota.github.io/docs/Commands/#command-flow

    if you dont have a tasmota device,or you can't find formats for all statuses i can send you a list with examples of replies in JSON Format.

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