logo elektroda
logo elektroda
X
logo elektroda

[Solved] Configuring ALDI Casalux LED Strip IR Commands with OpenBK Beken 7231N

Helmi_Beh 4482 4
ADVERTISEMENT
  • #1 20862590
    Helmi_Beh
    Level 2  
    Hello @All,
    I'm pretty new using OpenBK. Bought an ALDI Casalux WIFI RGB-LED Flexband 5m stripe. It was said, that it is TUYA compatible. It contains the stripe, a PWM RGB controller with one button and IR receiver, power supply and IR remote control with 24 keys. Controller is a Beken 7231N. I flashed it with the newest version and tried to configure it. The blue channel is at P7, the red at P6 and the green at P24. The switch is connected to P20 and the IR receiver at P26. So far, all ok. I get MQTT messages and I can control it using the app. But, i have the problem translating the IR commands into functions. Log says during pressing or releasing some of the keys: IR_NEC 0xEF00 0x2 0 or IR_NEC 0xEF00 0x17 1.
    How can I tell the controller to do one of the functions? Is there an example, how to do? Sorry, but I found nothing in the documentation.

    Best regards!
  • ADVERTISEMENT
  • Helpful post
    #2 20862886
    p.kaczmarek2
    Moderator Smart Home
    Hello, I think we have example for that here:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    
    // IR driver will start itself automatically after reboot
    
    // P21 role is Btn, a power button that works without scripting
    // set button hold/repeat/etc times
    SetButtonTimes 10 3 3
    // alias to turn off LED after 4 secs (repeating event with 1 repeat)
    alias add_turnoff_event addRepeatingEvent 4 1 led_enableAll 0
    // button events - 23, 22, etc are pin numbers
    addEventHandler OnHold 23 add_dimmer 10
    addEventHandler OnHold 22 add_dimmer -10
    addEventHandler OnDblClick 22 led_dimmer 5
    addEventHandler OnDblClick 23 led_dimmer 100
    addEventHandler OnClick 20 add_turnoff_event
    // IR events
    addEventHandler2 IR_Samsung 0x707 0x62 add_dimmer 10
    addEventHandler2 IR_Samsung 0x707 0x65 add_dimmer -10
    addEventHandler2 IR_Samsung 0x707 0x61 led_enableAll 0
    addEventHandler2 IR_Samsung 0x707 0x60 led_enableAll 1
    

    Also, it's in this video:



    Basically, you can use event handlers to link commands to IR events
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20862992
    Helmi_Beh
    Level 2  

    That helped me a bit, but it's unclear how to set the color. I have three channels for R, G, and B. Can I set the color with one command? I tried the "color" command with the parameter 0xFF0000 for red and 0x00FF00 for green, but nothing happened. Led_enableAll 0 or 1 is fine, but add_dimmer -10 or +10 shows a nonlinear behavior.
  • ADVERTISEMENT
  • Helpful post
    #4 20863135
    p.kaczmarek2
    Moderator Smart Home
    Dimmer is supposed to be non-linear, we even had a pull request for that... it's called gamma ramp:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/led_gamma_control.md
    It should be possible to disable it if you want.

    Why do you think that Color does not work?

    Can you try first assigning Color command from command line, just to see if it works?
    Helpful post? Buy me a coffee.
  • #5 20882795
    Helmi_Beh
    Level 2  

    Now all worked fine: ledenable_all, add_dimmer, and color commands work as specified. The only problem is the color range of the LEDs. But that's not a problem of the software.
ADVERTISEMENT