logo elektroda
logo elektroda
X
logo elektroda

Configuring Openbk to Always Toggle LED Ceiling Lamp On After Restart

mihaim1980 807 3
ADVERTISEMENT
  • #1 20869518
    mihaim1980
    Level 4  

    Hello!

    I have an LED ceiling lamp using Openbk with the "remember LED controller parameters" configuration on. However, I want to make it always toggle on (regardless if it's off/on) when it is restarted.

    How can I do that?
  • ADVERTISEMENT
  • #2 20871454
    p.kaczmarek2
    Moderator Smart Home
    This can be very easily done with autoexec.bat. We have commands for delays, for toggling channels and for LED manipulation. For example:
    
    delay_s 1
    toggleChannel 1
    delay_s
    toggleChannel 1
    

    The code above will toggle channel 1 twice on reboot.
    In your specific case, if you just want to enable the LED, you can do:
    
    led_enableAll 1
    

    Put that in autoexec.bat in LittleFS:



    See more autoexec.bat examples here:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20871458
    mihaim1980
    Level 4  

    In the meantime, I managed to use the led_enableAll 1 command and it seems to be working.
  • #4 20871495
    p.kaczmarek2
    Moderator Smart Home
    It's led_enableAll 1, I have corrected your post.

    Yes, you can place it in autoexec.bat or in Short Startup Command and it will work. You can also set color there, for example by using led_basecolor_rgb FF0000
    Helpful post? Buy me a coffee.
ADVERTISEMENT