Elektroda.com
Elektroda.com
X
Elektroda.com

BK7231N - Universal IR Remote Contorl

yarix2 3282 81
  • #61
    avdm
    Level 4  
    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:
    Code:
    IRsend NEC 0x1000 0x0 1


    For some reason it doesn't seem to send all protocols the right way. When I try:
    Code:
    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.
    Code:
    IRsend NEC 0x1000 0x0 1
  • #62
    p.kaczmarek2
    Level 28  
    @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.
  • #63
    dksaarth
    Level 1  
    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.
  • #65
    avdm
    Level 4  
    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.
    Code:
    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
    gcole
    Level 1  
    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.
  • #67
    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
    p.kaczmarek2
    Level 28  
    @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.
  • #69
    grbit
    Level 2  
    @p.kaczmarek2 if I'm not mistaken it's OpenBK7231N_QIO_1.15.3.bin
  • #70
    avdm
    Level 4  
    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
  • #73
    avdm
    Level 4  
    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
    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
    p.kaczmarek2
    Level 28  
    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?
  • #76
    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? BK7231N - Universal IR Remote Contorl BK7231N - Universal IR Remote Contorl
    Thanks you
  • #77
    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
    ionoleinic
    Level 5  
    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
    p.kaczmarek2
    Level 28  
    @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
    Code:

    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
  • #80
    ionoleinic
    Level 5  
    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
    p.kaczmarek2
    Level 28  
    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:
    Code:

    http://127.0.0.1/cm?cmnd=POWER

    it should just return current state.

    On the other hand, this should power off:
    Code:

    http://127.0.0.1/cm?cmnd=POWER%20OFF

    and this power on
    Code:

    http://127.0.0.1/cm?cmnd=POWER%20ON


    Please check and provide the information about which I asked above.
  • #82
    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?