logo elektroda
logo elektroda
X
logo elektroda

[Solved] Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

MnM1 975 15
ADVERTISEMENT
  • #1 20632411
    MnM1
    Level 10  
    Hi,

    I have a garage batten Led light:

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    I have successfully flashed with BK7231N - 1.17.157
    It is on the Wwifi and I can connect to the interface.

    looking at the Tuya GPIO file with bk7321flasher I get the below:

    
    {
    	"rstnum":"3",
    	"rstcor":"c",
    	"Jsonver":"1.0.1",
    	"brightmin":"15",
    	"title20":"0",
    	"deftemp":"100",
    	"c_lv":"1",
    	"mutex":"1",
    	"wfcfg":"spcl_auto",
    	"pmemory":"1",
    	"pairt":"18",
    	"irfunc":"0",
    	"cmod":"cw",
    	"nightled":"0",
    	"wt":"20",
    	"cwtype":"0",
    	"onofftime":"800",
    	"prodagain":"1",
    	"rstbr":"50",
    	"remdmode":"1",
    	"cagt":"20",
    	"w_lv":"1",
    	"c_pin":"7",
    	"notdisturb":"0",
    	"module":"CB3L",
    	"cwmaxp":"100",
    	"dmod":"0",
    	"rgbt":"0",
    	"onoffmode":"0",
    	"brightmax":"100",
    	"w_pin":"6",
    	"wfct":"3",
    	"pwmhz":"16000",
    	"rsttemp":"100",
    	"category":"0502",
    	"defcolor":"c",
    	"defbright":"100",
    	"crc":"95",
    	"}~jd`uAgw_di0|Atls_ca_cntbv":"40.00",
    	"pv":"2.2",
    	"lpv":"3.3",
    	"pk":"keyyepxwk9my9esq",
    	"firmk":"keyyepxwk9my9esq",
    	"cadv":"0",
    	"cdv":"1.0.0",
    	"dev_swv":"1.0.0",
    	"s_id":"null",
    	"dtp":"0",
    	"sync":"0",
    	"attr_num":"0",
    	"mst_tp_0":"0",
    	"mst_ver_0":"null",
    	"mst_tp_1":"0",
    	"mst0er_1":"null",
    	"mst_tp_2":"0",
    	"mst_ver_2":"null",
    	"mst_tp_3":"0",
    	"mst_ver_3":"null "
    }
    


    
    Device configuration, as extracted from Tuya: 
    - LED Cool (Channel 4) on P7
    - LED Warm (Channel 5) on P6
    Device seems to be using CB3L module, which is using BK7231N.
    And the Tuya section starts at UNCOMMON POSITION 0
    




    I have configured it accordingly however I cannot turn it on or off as there are things missing I think.

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    Can anyone help with the Turn Off/Turn On part of the configuration?

    Thanks
  • ADVERTISEMENT
  • #2 20632492
    p.kaczmarek2
    Moderator Smart Home
    Hello, what do you mean by "turn on and off", how your current OBK main page looks like? Do you have a temperature slider? Is the "On"/"Off" button showing up there? Is it working?
    Helpful post? Buy me a coffee.
  • #3 20632513
    MnM1
    Level 10  
    Yes, all is there on the main page. Nothing is missing.

    But with the current GPIO configuration, the light doesn't turn off or on when I press the button on the web page.

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash
  • ADVERTISEMENT
  • #4 20632544
    p.kaczmarek2
    Moderator Smart Home

    So what do the sliders do? Do they work correctly?

    Or do you observe something like, I don't know, temperature slider is changing brightness, etc?

    Maybe you need the "alternate CW mode" flag?
    Helpful post? Buy me a coffee.
  • #5 20632607
    MnM1
    Level 10  
    That is what I am saying - nothing happens. I press the ON button on the main page - The lights do not come on.
    Since lights are not on when I press the OFF button nothing happens.

    As the lights are not ON then the sliders will not work either.

    So in summary - can not turn ON the lights.
  • #6 20632611
    p.kaczmarek2
    Moderator Smart Home
    Ok, so, maybe, let's try with basics. Use GPIODoctor to test each pin in relay mode (on and off), try to set all pins to state 1 (ON, aka high) and tell me, does anything light up?
    https://www.elektroda.com/rtvforum/topic3976371.html
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #7 20632623
    MnM1
    Level 10  
    Ok only PIN 6 and PIN 7 turned ON the light.
    PIN 6 - Warm White
    PIN 7 - Cool White

    The rest of the PINS did nothing

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    Added after 7 [minutes]:

    But now the front page looks like this

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash
  • #8 20632630
    p.kaczmarek2
    Moderator Smart Home
    Ok, now change the roles of P6 and P7 to PWM, does the light work now?

    If not, go to flags, enable "show raw PWM controllers" to show raw sliders for each PWM. Change those sliders on main page. Do they adjust the light colors, one for cool, second warm?
    Helpful post? Buy me a coffee.
  • #9 20632645
    MnM1
    Level 10  

    Changed them:

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    Enabled the raw option but there is no button for ON or OFF on the main page now:

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    Sliders do work and light dims or increases if I use them.
  • #10 20632662
    p.kaczmarek2
    Moderator Smart Home

    And now, if you disable "show raw PWM controllers", does the main page work?

    If not, try setting cool channel to 0 and warm to 1...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #11 20632682
    MnM1
    Level 10  

    Setting the PWM 6 to 1 and PWM 7 to 0 seems to have worked.

    However, there is one issue - the light is not as bright as it was when it was running the Tuya firmware. It is much dimmer now.
    I find that when I go to GPIO Doctor on HIGH, the light is much brighter too.

    Any ideas?
  • Helpful post
    #12 20632695
    p.kaczmarek2
    Moderator Smart Home

    What do you have on the main page now, what are the channel values at full brightness?

    Maybe you need to enable alternate PWM frequency in flags.
    Helpful post? Buy me a coffee.
  • #13 20632697
    MnM1
    Level 10  

    This is the main page now, with light working:

    Setting Up GPIO for LED Garage Batten Light with BK7231N - 1.17.157 Flash

    I will try your suggestion and see.
  • #14 20634661
    Nimierkki
    Level 4  
    >>20632682
    I also have this same exact brightness issue with another vendor's device, what I flashed with Openbeken. Did you find any solution?
  • #15 20634764
    p.kaczmarek2
    Moderator Smart Home

    @Nimierkki Keep in mind that for "I2C" LED drivers like SM2135 or BP5758, you can set the current via console command. Or is your device using PWMs without any custom controllers?
    Helpful post? Buy me a coffee.
  • #16 20733478
    MnM1
    Level 10  
    Lights installed.
    They seem very bright in the garage - the issue where they seemed not that bright might had been a perception error.

Topic summary

The discussion revolves around configuring GPIO for a garage batten LED light after flashing it with BK7231N firmware version 1.17.157. The user successfully connected the device to Wi-Fi but faced issues with the light not turning on or off via the web interface. After troubleshooting, it was determined that only specific GPIO pins (PIN 6 for Warm White and PIN 7 for Cool White) activated the light. Adjustments were made to the GPIO settings, including changing pin roles to PWM and enabling raw PWM controllers, which allowed the sliders to control brightness. However, the user noted that the brightness was lower compared to the original Tuya firmware. Suggestions included checking channel values and enabling alternate PWM frequency. Ultimately, the user reported that the lights appeared bright in the garage, indicating a possible perception error regarding brightness.
Summary generated by the language model.
ADVERTISEMENT