logo elektroda
logo elektroda
X
logo elektroda

Bulb RGB Color Interchange issue - Syska 12W Bulb

DCG 1182 16
ADVERTISEMENT
  • #1 20723619
    DCG
    Level 6  
    Hello All,

    I recently migrated an ESP home bulb to Openbeken as I was observing flickering on the ESP firmware.

    Openbenekn migration was smooth, flickering issue vanished and the bulb works fine now... however I have noticed the RGBCW colors have interchanged:

    Actual RGB Current RGB
    R 0 G
    G 1 C
    B 2 W
    C 3 R
    W 4 B

    Below are the only two pins I have configured in settings

    Quote:
    ],
    "pins": {
    "7": "BP5758D_DAT;0",
    "8": "BP5758D_CLK;0"
    },


    Please help
  • ADVERTISEMENT
  • #2 20723799
    p.kaczmarek2
    Moderator Smart Home
    Hello, you need to do the colors remap. The easiest way to do it is currently via Web App, here:
    Screenshot of the control panel for LED color remapping tools.
    You can try guessing remap or getting one from here:
    https://www.youtube.com/watch?v=WunlqIMAdgw&ab_channel=Elektrodacom
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20723995
    DCG
    Level 6  

    Yes, I did fiddle around with the LED Tools option, and my bulb's actual settings are 4 2 3 1 0...
    I have applied the above settings, but it's not working. I know I must be doing something wrong.
  • #4 20724028
    p.kaczmarek2
    Moderator Smart Home
    Did the order of colors change? Try another order of colors.

    It is very simple. Enter number 0 for first field, click "apply and set to red" - is it red? If yes, then okay. If not, then enter number 1. Try again. Is it red? Good, check the next field. You can just brute force it...
    Helpful post? Buy me a coffee.
  • #5 20724103
    DCG
    Level 6  

    Yes, orders changed and somehow I am just not able to understand how this mapping works.

    As of now, only Green, Warm & Cool are perfectly matching... RGB is interchanged for Red & Blue.. but if I just change the numbers for Red & Blue, everything gets messed up.

    Table showing differences between actual and current RGB mapping and values for C and W.

    Also, how do I retain the last power / memory status if there is a power outage...? If the bulb was on and there was a power outage, the bulb doesn't turn back on when the power resumes.
  • #6 20724168
    p.kaczmarek2
    Moderator Smart Home
    There is a flag for remembering the LED status.

    I would say you need to swap the indices that are currently for Red and Blue. Or maybe' let's approach it from a different angle. Can you do Tuya config extraction?
    https://www.youtube.com/watch?v=WunlqIMAdgw&ab_channel=Elektrodacom
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #7 20724218
    DCG
    Level 6  

    Jason format  - 
    {
    	"rstnum":"3",
    	"rstcor":"c",
    	"Jsonver":"1.0.0",
    	"brightmin":"10",
    	"gmwb":"75",
    	"title20":"0",
    	"deftemp":"100",
    	"gmwg":"70",
    	"wfcfg":"spcl_auto",
    	"colormin":"10",
    	"pmemory":"1",
    	"gmkb":"60",
    	"iicb":"3",
    	"dccur":"22",
    	"cmod":"rgbcw",
    	"mixway":"0",
    	"iicscl":"8",
    	"wt":"10",
    	"cwtype":"0",
    	"prodagain":"0",
    	"rstbr":"50",
    	"remdmode":"0",
    	"colormax":"100",
    	"cagt":"10",
    	"iicw":"0",
    	"notdisturb":"1",
    	"drgbcur":"5",
    	"module":"CB2L",
    	"colorpfun":"0",
    	"iicsda":"7",
    	"cwmaxp":"100",
    	"dmod":"6",
    	"iicc":"1",
    	"gmwr":"100",
    	"rgbt":"10",
    	"gmkg":"60",
    	"onoffmode":"1",
    	"brightmax":"100",
    	"iicg":"2",
    	"dwcur":"22",
    	"wfct":"3",
    	"rsttemp":"100",
    	"category":"0505",
    	"gmkr":"80",
    	"defcolor":"c",
    	"iicr":"4",
    	"defbright":"100",
    	"crc":"61",
    	"}3Awf_start_mdhj0Bgw_di0#Atls_ca_cntbv":"40.00",
    	"pv":"2.2",
    	"lpv":"3.4",
    	"pk":"key8u54q9dtru5jw",
    	"firmk":"key8u54q9dtru5jw",
    	"cadv":"0estamp",
    	"index":"0"
    }


    If I try to import the above Jason - I get error - Failed - SyntaxError: Bad escaped character in JSON at position 772.

    Device configuration, as extracted from Tuya: 
    - BP5758D_DAT on P7
    - BP5758D_CLK on P8
    - LED remap is 4 2 3 1 0
    Device seems to be using CB2L module, which is using BK7231N.
    And the Tuya section starts at UNCOMMON POSITION 0
    

  • #8 20725186
    DCG
    Level 6  

    @p.kaczmarek2 Please help with this. I have 3 more bulbs of the same model and need to resolve this one before moving the other bulbs to Openbeken.
  • #9 20725238
    p.kaczmarek2
    Moderator Smart Home
    Well, we can try another way.

    Open console in the Web App, enter:
    
    BP5758D_Map 4 2 3 1 0
    

    Then in main OBK panel, try setting:
    - red, and tell me result
    - green, and tell me result
    - blue, and tell me result
    We will adjust that map if it's somehow wrong....
    Helpful post? Buy me a coffee.
  • #10 20726713
    DCG
    Level 6  
    @p.kaczmarek2 thanks for the inputs I will check & share the results soon.

    I am now in a different situation with another Bulb (same model) however this time the chip seems to be different...
    in this Bulb I am getting all the RGBW colors to match perfectly except the Cool white which never gets to display...
    I tried changing the RGBCW codes but the Cool white never turns... (only instance I see Cool white is when I move the slider close to warm)

    R - Working
    G - Working
    B - Working
    C - Not Working
    W - Working

    I am using the below Jason code

    {
      "manufacturer": "Tuya Generic",
      "name": "A60 RGBCT Bulb 1.1.2",
      "key": "keytg5kq8gvkv9dh",
      "ap_ssid": "SmartLife",
      "github_issues": [
        21
      ],
      "image_urls": [],
      "profiles": [
        {
          "slug": "oem-bk7231s-light-ty-1.1.2-sdk-2.0.0-30.06",
          "name": "1.1.2 - BK7231T",
          "type": "CLASSIC",
          "sub_name": "oem_bk7231s_light_ty",
          "icon": "lightbulb-outline"
        }
      ],
      "schemas": {
        "00000225qx": [
          {
            "type": "obj",
            "mode": "rw",
            "property": {
              "type": "bool"
            },
            "id": 20
          },
          {
            "type": "obj",
            "mode": "rw",
            "property": {
              "range": [
                "white",
                "colour",
                "scene",
                "music"
              ],
              "type": "enum"
            },
            "id": 21
          },
          {
            "type": "obj",
            "mode": "rw",
            "property": {
              "min": 10,
              "max": 1000,
              "scale": 0,
              "step": 1,
              "type": "value"
            },
            "id": 22
          },
          {
            "type": "obj",
            "mode": "rw",
            "property": {
              "min": 0,
              "max": 1000,
              "scale": 0,
              "step": 1,
              "type": "value"
            },
            "id": 23
          },
          {
            "type": "obj",
            "mode": "rw",
            "property": {
              "type": "string",
              "maxlen": 255
            },
            "id": 24
          },
          {
            "type": "obj",
            "mode": "rw",
            "property": {
              "type": "string",
              "maxlen": 255
            },
            "id": 25
          },
          {
            "type": "obj",
            "mode": "rw",
            "property": {
              "min": 0,
              "max": 86400,
              "scale": 0,
              "step": 1,
              "type": "value"
            },
            "id": 26
          },
          {
            "type": "obj",
            "mode": "wr",
            "property": {
              "type": "string",
              "maxlen": 255
            },
            "id": 27
          },
          {
            "type": "obj",
            "mode": "wr",
            "property": {
              "type": "string",
              "maxlen": 255
            },
            "id": 28
          }
        ]
      },
      "device_configuration": {
        "Jsonver": "1.1.6",
        "b_lv": 1,
        "b_pin": 6,
        "brightmax": 100,
        "brightmin": 10,
        "c_lv": 1,
        "c_pin": 8,
        "cagt": 20,
        "category": "0505",
        "cmod": "rgbcw",
        "colormax": 100,
        "colormin": 10,
        "crc": 46,
        "cwmaxp": 100,
        "cwtype": 0,
        "defbright": 100,
        "defcolor": "c",
        "deftemp": 100,
        "dmod": 0,
        "g_lv": 1,
        "g_pin": 24,
        "module": "WB2L",
        "onoffmode": 1,
        "pmemory": 1,
        "prodagain": 0,
        "pwmhz": 1000,
        "r_lv": 1,
        "r_pin": 26,
        "remdmode": 0,
        "rgbt": 10,
        "rstbr": 50,
        "rstcor": "c",
        "rstnum": 3,
        "rsttemp": 100,
        "title20": 0,
        "w_lv": 1,
        "w_pin": 7,
        "wfcfg": "spcl_auto",
        "wfct": 3,
        "wt": 20
      },
      "slug": "tuya-generic-a60-rgbct-bulb-1.1.2"
    }
  • Helpful post
    #11 20726787
    p.kaczmarek2
    Moderator Smart Home
    It looks like your device is using PWMs. Do you have 5 PWM pins set in config?

    Can you do Tuya config extraction?
    https://www.youtube.com/watch?v=WunlqIMAdgw&ab_channel=Elektrodacom

    You can also try enabling this flag (but disable it back if it doesn't help):
    
    Flag  8	[LED] Alternate CW light mode (first PWM for warm/cold slider, second for brightness)
    
    Helpful post? Buy me a coffee.
  • #12 20727289
    DCG
    Level 6  

    p.kaczmarek2 wrote:
    It looks like your device is using PWMs. Do you have 5 PWM pins set in config?

    Can you do Tuya config extraction?
    https://www.youtube.com/watch?v=WunlqIMAdgw&ab_channel=Elektrodacom


    Yes, all 5 PWMs are set, and below is the Tuya config extracted message.

    Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
    No module information found, and the Tuya section starts at UNCOMMON POSITION 0

    Quote:
    You can also try enabling this flag (but disable it back if it doesn't help):
    
    Flag  8	[LED] Alternate CW light mode (first PWM for warm/cold slider, second for brightness)
    


    Ok, so this did the trick, and I am able to see Cool white being turned on. The only thing is Warm & Cool settings have interchanged...
    Any way to fix this?
  • ADVERTISEMENT
  • #13 20727352
    p.kaczmarek2
    Moderator Smart Home
    This may mean that you need to change the pin role of fourth channel from PWM to PWM_n. Try and tell me if it helps. By fourth, I mean, red is first, green is second, blue is third, etc...
    Helpful post? Buy me a coffee.
  • #14 20727595
    DCG
    Level 6  

    p.kaczmarek2 wrote:
    This may mean that you need to change the pin role of the fourth channel from PWM to PWM_n. Try and tell me if it helps. By fourth, I mean, red is first, green is second, blue is third, etc...


    Perfect :) everything working now as expected, thanks a ton for your support.. below are the pin settings
      "pins": {
        "6": "PWM;3",
        "7": "PWM;5",
        "8": "PWM_n;4",
        "24": "PWM;2",
        "26": "PWM;1"


    Now I will troubleshoot the initial issue with the same model bulb which has BP5758D, I will update you on that

    ------------------
    For anyone who is looking for the Bulb model number, it's a brand available in India primarily.

    Syska 12-Watt B-22 Wi-Fi LED Bulb (SSK-SMW-12W-5C)
    https://www.reliancedigital.in/syska-12-watt-...a-google-assistant-ssk-smw-12w-5c/p/492166310
  • #15 20727606
    p.kaczmarek2
    Moderator Smart Home
    Bulb screenshot:
    Colorful Syska LED bulb next to packaging.
    model: 492166310
    I will add this to devices list.
    Helpful post? Buy me a coffee.
  • Helpful post
    #16 21130461
    DCG
    Level 6  
    DCG wrote:
    Now I will troubleshoot the initial issue with the same model bulb which has BP5758D, I will update you on that

    Happy to report that I have got the mapping right for the BP5758D Bulb which had color interchange issue.

    Below is the correct mapping
    BP5758D_Map 4 3 1 0 2

    Below is the template

    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Syska 12-Watt  Wi-Fi LED Bulb",
      "model": "B-22",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "134616320",
      "keywords": [
        "BP5758D",
        "bulb",
        "light"
      ],
      "pins": {
        "7": "BP5758D_DAT;0",
        "8": "BP5758D_CLK;0"
      },
      "command": "BP5758D_Map 4 3 1 0 2",
      "image": "https://obrazki.elektroda.pl/6199312700_1694324268.png",
      "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=21130461#21130461l"
    }


    So the Syska 12-Watt B-22 Wi-Fi LED Bulb has two versions, I have the pin & color mapping settings done the above posts.

    1). PWM drivers
    2). BP5758D drivers
  • #17 21140371
    p.kaczmarek2
    Moderator Smart Home
    Okay, I've added both templates to our list:
    https://github.com/OpenBekenIOT/webapp/commit/289ffa0e1a79c8a0ceb473688e8574cafadc64fd
    They should be soon live at:
    https://openbekeniot.github.io/webapp/devicesList.html
    Just to confirm, both types of bulb (PWM and BP5758) are using CB2L modules?
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around a user who migrated a Syska 12W bulb to OpenBeken firmware to resolve flickering issues. Post-migration, the user encountered a color mapping problem where the RGBCW colors were interchanged. Various suggestions were provided, including remapping colors through a web app and brute-forcing the color order. The user struggled with the mapping, particularly with the red and blue channels, and sought assistance for retaining power status after outages. Eventually, the correct mapping was established, and the user confirmed successful operation of the bulb. Additionally, another bulb of the same model was discussed, which had issues with the Cool white channel not functioning correctly, but this was resolved by adjusting PWM settings.
Summary generated by the language model.
ADVERTISEMENT