logo elektroda
logo elektroda
X
logo elektroda

Query: Tuya Led Controller DC5-12v Compatibility with Cloudcutter Flash BK7321 and OBK Drivers

MnM1 6411 136
ADVERTISEMENT
  • #31 20685681
    p.kaczmarek2
    Moderator Smart Home
    Well, we can either guess, or if you have a backup - do you? You can flash the backup, then test device with Tuya app so we can do packets capture and write down how do they control colors, and then try to send the same packets from OBK.

    Maybe we could try without original 2MB flash if we manage to find some information how to send data to your device.
    I've tried searching but I only found devices that seem to have simple RGB/CCT control like that one:
    https://templates.blakadder.com/polux_313911.html
    Screenshot showing TuyaMCU configuration with function descriptions and settings.

    We could try searching Tasmota code, maybe they support it:
    https://github.com/arendst/Tasmota/blob/0ac5d...ta/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino
    but it doesn't look like it?
    https://tasmota.github.io/docs/TuyaMCU/#tuyasend-command

    So most likely restoring the Tuya firmware for further analysis is the way to go. If you don't have a backup, we could ask our dedicated Serbian tester and contributor, @DeDaMrAz to consider ordering this device and doing some captures. I also could do that myself, but I am not sure if you're willing to wait few weeks for me to have a free slot on my table. I am currently making a series of video tutorials for OBK and also I am focusing on code issues related to current features. Here's a sneak peak of what I am working on:
    Spoiler:

    Screenshot of a YouTube video list related to firmware update guides.

    Psst, remember to visit our Elektroda channel and like and subscribe: https://www.youtube.com/@elektrodacom


    MnM1 wrote:

    In regards to the individual addressable LED - I was only going by what you said in post number 2 in this thread (https://www.elektroda.com/rtvforum/topic3990646.html#20661340) :) and from the information I got from the sellers - "New information - they tell me that the driver is 16703. I assume it's SM16703."
    But maybe it is not?

    well, the question is simple - can this device display multiple colors on multiple LEDs at once?
    If it can display multiple colors on multiple LEDs at the same time then it's individual addressable LED

    This topic got kinda messy because it's now about two devices so I wanted to make sure we're on the same page.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 20685725
    MnM1
    Level 10  

    I will try to reply to all the questions :)

    Original Firmware backup - unfortunately, no, I don't have a backup of the original firmware.
    Tasmota - I have no idea if any of these work.

    Looking through the forums, this is the closest I can find to my device:

    [url=]https://www.elektroda.com/rtvforum/topic3982779.html[/url]

    I have tried a few commands from that thread with some success and others without:

    1. This one didn't work
    setChannelType 21 toggle
    linkTuyaMCUOutputToChannel 21 1 21


    2. This worked - it changed the color on the LEDs (from a multicolor pattern that I selected with the IR remote) to blue.
    tuyaMcu_sendState 25 3 ff0000646464ff


    3. From that thread, all the
    tuyaMCU_sendColor *******
    seem to work, but some of them produced different colors on the LEDs. This actually might be a device problem as even when I use the IR remote, some colors are not right - red = purple, blue = yellow, green = green, yellow = light blue.

    4. From the same thread -
    tuyaMCU_setupLED 24 0
    it does add the Dimmer/Brightness, RGB Color, and Temperature Slider on the front www page of the device. The Temperature Slider does not work at all.
    However, if I try to use them, they don't operate as they should. If I use the RGB color to pick a color, the device goes blank. Only with the IR remote can I get it to display colors again.
    If I use the Dimmer/Brightness - it does dim the LEDs, but it never increases the intensity back.
    If I use the Temperature Slider, it turns off the LEDs. And they never come back. I have to cut the power to the device and do some sort of a reset from the IR remote to get it back.

    In regards to individual addressable LEDs - yes, it does look like the LEDs can display different colors.

    If @DeDaMrAz or you would consider looking at this device, that would be great.

    Looking forward to your new YouTube videos :)
  • #33 20685736
    p.kaczmarek2
    Moderator Smart Home
    MnM1 wrote:

    2. This worked - it changed the color on the leds (from a multicolor pattern that I selected with the IR remote) to blue.
    tuyaMcu_sendState 25 3 ff0000646464ff

    It may be just a fluke. You can try with that command and multiple dpIDs:
    
    tuyaMCU_sendColor dpID red01 green01 blue01 tuyaRGB
    tuyaMCU_sendColor 25 1 0 0 1
    tuyaMCU_sendColor 25 0 1 0 1
    

    RGB values are in 0-1 range, so "1 0 0" is red, "0 1 0" is green, etc.

    Try those commands and let us know whether they give consistent results or do they give, for example, always blue...

    I think that it is very possible that someone somewhere in the web has documented this TuyaMCU format already and we just need to find it. Otherwise... it would mean that we are the first ones investigating that kind of device.

    Added after 51 [seconds]:

    Btw what if you use: tuyaMcu_sendQueryState command?

    Added after 0 [seconds]:

    Btw what if you use: tuyaMcu_sendQueryState command?
    Helpful post? Buy me a coffee.
  • #34 20685750
    MnM1
    Level 10  

    I tried the suggested commands - both of them just dimmed the LEDs.

    tuyaMcu_sendQueryState:

    Debug:CMD:cmd [tuyaMcu_sendQueryState]
    Info:CMD:[WebApp Cmd 'tuyaMcu_sendQueryState' Result] OK
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 14 01 00 01 01 25 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 20, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 15 04 00 01 01 29 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 21, dataType 4-DP_TYPE_ENUM and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 21 with value 1 is not mapped
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 1A 02 00 04 00 00 1F 40 90 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 26, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 8000
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 26 with value 8000 is not mapped
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 09 33 00 00 05 00 00 01 01 00 4C 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 16 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 51, dataType 0-DP_TYPE_RAW and 5 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 09 34 00 00 05 00 00 01 01 00 4D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 16 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 52, dataType 0-DP_TYPE_RAW and 5 data bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 35 02 00 04 00 00 01 2C 79 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 53, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 300
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 53 with value 300 is not mapped

  • ADVERTISEMENT
  • #37 20686161
    DeDaMrAz
    Level 19  
    Exact same order placed, be patient, we will work on supporting this device once it arrives. Estimated delivery time is August 28th
  • ADVERTISEMENT
  • #39 20695349
    DeDaMrAz
    Level 19  
    Device arrived, interesting construction but we can probably work on it.

    It has a TuyaMCU, a microphone(???) and the LED driver is blank - no markings on it so it will be interesting to figure out how to deal with it. Stand by and we will update this post once we get to it.

    Circuit board with TuyaMCU module and unmarked LED driver.
  • #40 20695358
    p.kaczmarek2
    Moderator Smart Home
    Prepare your scope and let's look at the waveforms. This will tell us whether they are WS2812b-compatible or something else.

    You can also later try swapping LED strip with WS2812B....

    Also, your one is CB2S? So BK7231N? So SM16703P driver will work without porting, or at least I hope so.
    Helpful post? Buy me a coffee.
  • #41 20695731
    MnM1
    Level 10  

    That was fast delivery :)

    Hope you guys can figure it out - me, I tried my best and all I could do is flash it to T via cloudcutter and firmware version, start TuyaMCU driver, and get the ON/OFF toggle. I could not figure anything further. But then again, I don't have your experience....
  • #42 20711720
    MnM1
    Level 10  
    Hi @DeDaMrAz how is it going?
    Did you get a chance to have a look at this device? Any progress?

    Cheers - appreciate it.
  • ADVERTISEMENT
  • #43 20711749
    DeDaMrAz
    Level 19  

    @mnm11

    Unfortunately, no progress yet - because life, and job, and heat :)

    But there will be something soon, and we will post updates here. You can count on that, just not as fast as we (and probably you) imagined. Sorry for that.
  • #44 20711837
    MnM1
    Level 10  
    Is all good buddy :)
    I fully understand what you mean as I am in the same boat as you - family. job, life in general - need abut 48 hours in a day to do all what I want :)
    No heat here yet but is coming... NOT looking forward to that!

    When you have the time - looking forward to it.
  • #45 20711866
    p.kaczmarek2
    Moderator Smart Home
    I am also slowly building up time and equipment to test the "direct" (without TuyaMCU) SM16703P and possibly WS2812B driver, but it's very hard. It has turned out that hardware SPI, required for such driver, is using P16 which is not available on CB3S and CB2S, so I had to solder directly to QFN pin and route out wire myself:
    Close-up of an electronic circuit with soldered wires. Close-up of an electronic module with a thin wire soldered to a pin.
    It is soldered now, soon I will test it with WS2812B and maybe attempt to port driver to BK7231T as well.
    Helpful post? Buy me a coffee.
  • #46 20711872
    MnM1
    Level 10  
    Ohhh wow - looks very involved.
    I know how hard it to find free time these days for everything we "wish" to do :)
    So plz guys don't be sorry - I fully understand. When you get the chance - and again thank you both for helping with this!!!
  • #47 20711886
    p.kaczmarek2
    Moderator Smart Home
    I have basically first disconnected the trace to CEN pad:
    The image shows a damaged printed circuit board with visible traces, mounting holes, and signs of modification. Close-up of circuit traces on a printed circuit board.
    Then I routed P16 to CEN pad, which is now P16:
    Close-up of a blue PCB with several connected colored wires and CB2S marking.

    I know this is not directly related to the device from this topic (TuyaMCU one), but maybe we could also just skip TuyaMCU there and wire a jumper directly to addressable LEDs... there are many options
    Helpful post? Buy me a coffee.
  • #48 20711889
    MnM1
    Level 10  
    Hopefully for this device we will still use the MCU - I am not good with soldering at that small scale. And as the firmware can be flashed with cloud-cutter then I wont have to open the device at all :)
  • #50 20713960
    MnM1
    Level 10  
    @DeDaMrAz here the dpIDs:

    Dreamlight scene mode(51)
    ON/OFF(20)
    Dreamlight built-in music sync(52)
    Mode(21)
    Strip light pixel number set(53)
    Color(24)
    Scene(25)
    Timer(26)
    Music sync of microphone(42)
    Music(27)
    Adjust(28)




    I also got a JSON file with more information from Tuya IoT - not sure if it helps but here it is in any case:

    Spoiler:
    Code Type Values
    switch_led Boolean
    "{true,false}"
    work_mode Enum
    {
    "range": [
    "white",
    "colour",
    "scene",
    "music"
    ]
    }
    colour_data Json
    {
    "h": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 360,
    "step": 1
    },
    "s": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    },
    "v": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    }
    }
    scene_data Json
    {
    "scene_num": {
    "min": 1,
    "scale": 0,
    "max": 8,
    "step": 1
    },
    "scene_units": {
    "unit_change_mode": {
    "range": [
    "static",
    "jump",
    "gradient"
    ]
    },
    "unit_switch_duration": {
    "min": 0,
    "scale": 0,
    "max": 100,
    "step": 1
    },
    "unit_gradient_duration": {
    "min": 0,
    "scale": 0,
    "max": 100,
    "step": 1
    },
    "bright": {
    "min": 0,
    "scale": 0,
    "max": 1000,
    "step": 1
    },
    "temperature": {
    "min": 0,
    "scale": 0,
    "max": 1000,
    "step": 1
    },
    "h": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 360,
    "step": 1
    },
    "s": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    },
    "v": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    }
    }
    }
    countdown Integer
    {
    "min": 0,
    "max": 86400,
    "scale": 0,
    "step": 1
    }
    music_data Json
    {
    "change_mode": {
    "range": [
    "direct",
    "gradient"
    ]
    },
    "bright": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    },
    "temperature": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    },
    "h": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 360,
    "step": 1
    },
    "s": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 255,
    "step": 1
    },
    "v": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 255,
    "step": 1
    }
    }
    control_data Json
    {
    "change_mode": {
    "range": [
    "direct",
    "gradient"
    ]
    },
    "bright": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    },
    "temperature": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 1000,
    "step": 1
    },
    "h": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 360,
    "step": 1
    },
    "s": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 255,
    "step": 1
    },
    "v": {
    "min": 0,
    "scale": 0,
    "unit": "",
    "max": 255,
    "step": 1
    }
    }
  • #51 20713962
    DeDaMrAz
    Level 19  
    @MnM1

    For some reason I am unable to pair my device to TuyaAPP (or SmartLife app) I asked about the dpID's but saw a bit latter that you already posted that.

    How did you device behave on the first power up? Before you linked it to the APP? Did it fast blink red color?
  • #52 20713963
    MnM1
    Level 10  

    Yes, I think I had that issue too initially.
    I asked the vendor for instructions back then, and they sent me a file (see below).

    Basically, the easiest way was to LONG Press the Music Button on the remote - that put it in pairing mode right away.
  • #53 20713965
    p.kaczmarek2
    Moderator Smart Home
    What features are exactly available in Tuya App for this device? I am curious how much real control over color we have... hopefully @DeDaMrAz will manage to check
    Helpful post? Buy me a coffee.
  • #54 20713968
    DeDaMrAz
    Level 19  
    MnM1 wrote:
    Yes I think I had that issue too initially.
    I asked vendor for instructions back then and they sent me a file (see below).

    Basically the easiest way was to LONG Press the Music Button on the remote - that put it in pairing mode right away.


    FFS never in a million years would I guess to hold down the music button... tried holding PWR button, light button....

    Thanks for this tip!

    We can finally do some tests now :)

    TuyaMCU Explorer/Analyzer program interface with packet data in hex format.
  • #55 20713970
    MnM1
    Level 10  
    Once you get into the Tuya app this is what is there:

    Tuya app screen with color and brightness selection. Tuya app interface with lighting scene selection. Tuya app interface with music-synchronized lighting feature. Tuya app interface with a microphone icon.
  • #56 20713971
    DeDaMrAz
    Level 19  

    This device will be fully supported. It's not going to be straightforward, but @p.kaczmarek2 has some ideas already, and we will work on implementing support for it.
  • #57 20713973
    p.kaczmarek2
    Moderator Smart Home
    So there is only a predefined set of animations?

    With a direct connection to SM16703, we could do much more.
    Helpful post? Buy me a coffee.
  • #58 20713974
    MnM1
    Level 10  

    In the 2nd picture I posted, I think there are 8 "scenes" - assuming that is what you meant?
  • #59 20713976
    p.kaczmarek2
    Moderator Smart Home
    Yes, this is most likely what I mean.

    With a direct connection to SM16703, we could have created our own scenes, fully customizable. With a TuyaMCU in a way, we have to use the scenes that Tuya created.

    We will try both approaches.
    Helpful post? Buy me a coffee.
  • #60 20713978
    MnM1
    Level 10  

    p.kaczmarek2 wrote:
    With a direct connection to SM16703, we could have created our own scenes, fully customizable. With a TuyaMCU in a way, we have to use the scenes that Tuya created.


    I see what you mean.
    Yes, that will be great to have this device working with the Tuya "way" as well as a more customized version (for later when I will be brave enough to open it and use my stone-age soldering skills :) )

Topic summary

The discussion revolves around the compatibility of a Tuya LED controller (DC5-12V) with Cloudcutter for flashing firmware on devices using BK7231 and OBK drivers. Users explore the feasibility of flashing the device, identifying the correct firmware version (N or T), and the potential for GPIO settings. The LED driver in question is identified as SM16703, with users attempting to control individually addressable LEDs. Various commands and configurations are tested, including the use of TuyaMCU for controlling LED states and colors. Issues with color mismatches and device behavior after power cycles are also addressed, with suggestions for workarounds and firmware updates to improve functionality. The community collaborates on troubleshooting and developing solutions for better integration with Home Assistant.
Summary generated by the language model.
ADVERTISEMENT