logo elektroda
logo elektroda
X
logo elektroda

[CB3S/BK7231N] Tuya LED Controller iH001 - RGB Version (USB, Buttton, PWM, NoIR)

terryb8s 2808 7
ADVERTISEMENT
  • CB3S pinout and working template for iH001 RGB controller

    #1 21234084
    terryb8s
    Level 4  
    Posts: 41
    Help: 1
    Rate: 8
    I note that this device has been mentioned before but seemed to be unresolved Here, the one I am submitting appears to be a slightly different version of it, it may also go by a different device name apologies if it does I had a good look but couldn't find it.

    PCB with Tuya CB3S module inside a casing. A spool of LED strip with purple LEDs on, lying on a desk with a control button on the cable. LED strip wound on a spool with partially lit blue diodes and a connected cable, featuring a white controller with a button. Four-pin plug connector on a green surface. A white device with a button and USB cable, resting on a green mat. Close-up of a circuit board with a Tuya CB3S module and various electronic components. Green PCB with various electronic components and wires. White LED controller model iH001 with a label indicating compatibility with Amazon Alexa.

    Board: Tuya CB3S

    Pins:
    P8 PWM 0
    P9 Btn 0
    P24 PWM 1
    P26 PWM 2

    Template (Working with button as Colour Change Autoexec for on\off on hold)
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "LED Controller",
      "model": "iH001",
      "chip": "BK7231N",
      "board": "CB3S",
      "flags": "0",
      "keywords": [
        "USB",
        "NoIR",
        "RGB"
      ],
      "pins": {
        "8": "PWM;0",
        "9": "Btn_NextColor;0",
        "24": "PWM;1",
        "26": "PWM;2"
      },
      "command": "backlog PowerSave 1",
      "image": "https://obrazki.elektroda.pl/8253390200_1726911490.png",
      "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=21234084"
    }


    Autoexec.bat
    SetButtonTimes 10 1 1
    addEventHandler OnHold 9 led_enableAll 0
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • Helpful post

    Beken PWM numbering differs from OBK channel assignment

    #2 21234450
    divadiow
    Level 38  
    Posts: 5212
    Help: 446
    Rate: 914
    PR for template add https://github.com/OpenBekenIOT/webapp/pull/1...mits/ae8577cc8c249d9ffc647a4a51cc5ccf3af39955

    are you sure PWM;0 though? I thought R=1, G=2, B=3, CW=4, 5=WW
    It's just on Beken only 6 pins can be used for PWM and they're referred to as PWM0-5 by Beken. But for OBK channel assignment it's 1-5

    The image shows a list of pins with assigned PWM numbers. It displays the descriptions: P6 (PWM0), P7 (PWM1), P8 (PWM2), P9 (PWM3).

    Table showing PWM options for pins P26 and P24 in the context of GPIO inputs and outputs.
    Table showing PWM pin configuration for Beken device.
  • ADVERTISEMENT
  • Factory Tuya config maps RGB channels to 1, 2, 3

    #3 21234781
    terryb8s
    Level 4  
    Posts: 41
    Help: 1
    Rate: 8
    Kia ora divadiow,

    If its best practice, I'm happy to change the channels.

    Quote:
    Red is 1, Green is 2, Blue is 3 (altough firmware will also support indexing started from 0)
    Link

    Tuya config from factory Image
    {
       "Jsonver":"1.0.0",
       "gmwb":"75",
       "title20":"0",
       "gmwg":"70",
       "knum":"1",
       "wfcfg":"spcl_auto",
       "colormin":"10",
       "pmemory":"1",
       "gmkb":"60",
       "wgmod":"0",
       "cmod":"rgb",
       "cwtype":"0",
       "tempstep":"25",
       "rstbr":"75",
       "ktime":"5",
       "colormax":"100",
       "notdisturb":"1",
       "module":"CB3S",
       "b_pin":"26",
       "ir":"14",
       "b_lv":"1",
       "rstmode":"2",
       "dmod":"0",
       "sfunc":"1",
       "key_lv":"0",
       "wfct":"10",
       "pwmhz":"1000",
       "r_pin":"8",
       "defbright":"100",
       "rstnum":"3",
       "rstcor":"r",
       "r_lv":"1",
       "deftemp":"100",
       "k1dfunc":"3",
       "keyfunc":"1",
       "irfunc":"1",
       "g_lv":"1",
       "ismusic":"0",
       "wt":"20",
       "prodagain":"1",
       "key_pin":"9",
       "remdmode":"0",
       "cagt":"20",
       "g_pin":"24",
       "swgmod":"0",
       "gmwr":"100",
       "rgbt":"5",
       "gmkg":"60",
       "onoffmode":"0",
       "keynumber":"0",
       "aging":"1",
       "category":"0503",
       "gmkr":"80",
       "defcolor":"r",
       "crc":"14"
    }
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #4 21234797
    divadiow
    Level 38  
    Posts: 5212
    Help: 446
    Rate: 914
    well, I never knew that! fair enough.

    You'd have complained about the colours being wrong or not working anyway, so seems obvious now.
  • ADVERTISEMENT
  • #5 21234809
    terryb8s
    Level 4  
    Posts: 41
    Help: 1
    Rate: 8
    >>21234797 All good, was a good exercise in understanding PWM some more with OBK, so I appreciate you pointing it out.

    Thanks for doing a pull for the config as well :-)
    Helpful post? Buy me a coffee.
  • Channel indexes can start at 0

    #6 21236053
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14755
    Help: 659
    Rate: 12881
    Thank you, merged. Device should be soon live at:
    https://openbekeniot.github.io/webapp/devicesList.html

    Channel indexes can start with 0.

    You could get more functionality of this device by using Btn_SmartLED, altough this button code itself could use more tuning.

    This LED controller can be also repurposed to 3x white strip independent control with PwmToggler.

    Added after 47 [seconds]:

    EDIT: I can also see it has 5 transistors? So you can easily use it as RGBCW.
    Helpful post? Buy me a coffee.
  • #7 21236186
    terryb8s
    Level 4  
    Posts: 41
    Help: 1
    Rate: 8
    p.kaczmarek2 wrote:
    Btn_SmartLED

    Thanks will check this out, was initially replicating tuya stock functionality so will likely do more.

    I also note the IR pads on the underside of the PCB and dumped tuya config seems to indicate P14 for their use, I imagine adding an IR diode would be relatively easy.
    Helpful post? Buy me a coffee.
  • #8 21236571
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14755
    Help: 659
    Rate: 12881
    There is a guide for that:


    Helpful post? Buy me a coffee.

Topic summary

LABEL_AI_GENERATED
The discussion revolves around the Tuya LED Controller iH001, specifically the RGB version utilizing the CB3S board. Users are addressing the configuration of PWM channels for color control, with a focus on ensuring correct channel assignments for RGB and CW (Cool White) functionalities. A pull request was made to update the template for better compatibility with the OpenBeken firmware, highlighting the importance of accurate PWM channel mapping. The device features five transistors, allowing for independent control of RGB and CW strips. Additionally, there is mention of potential IR functionality with the addition of an IR diode. The conversation emphasizes collaboration in refining the device's configuration and functionality.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT