Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add device yaml for RGBCW bulb Xinled XLD-CL002 #2179

Merged
merged 4 commits into from
Aug 25, 2024
Merged

Conversation

baksogen
Copy link

@baksogen baksogen commented Aug 4, 2024

The device is a white colored lamp with variable temperature and brightness. There is a color ring around the circle, which can be changed in color.

Purchased on the website:
https://www.temu.com/goods_snapshot.html?goods_id=601099518673110&title=%D0%94%D0%B5%D1%82%D0%B0%D0%BB%D0%B8&_x_sessn_id=b3scwxrijy&refer_page_name=goods&refer_page_id=10032_1722759995357_g5p6n9rti4&refer_page_sn=10032

Connects via WiFi to SmartLife (Tuya). The settings page displays separate controls for the main lamp and the color wheel.

photo_2024-08-04_11-30-24

Activation of the main lamp and color wheel modes together or separately is done via DPID. The meaning was partially decoded:

# AAU A7APo A+g D6A AA
# on/off base64(0006) - all OFF, rgb ON
# base64(0007) - all ON
# base64(0005) - white ON
# ???
# rgb brig base64(000a - 03e8)
# white brig base64(0028 - 0fa0)
# white temp base64(00-62)

In the proposed config, mode switching is done through scene switching.
Examples of scene names
"WW 100%" - WhiteWarm brightness 100%
"WN 100%" - WhiteNeutral brightnes 100%
"RGB RED 100%" - color wheel red only
"WW+RED 100%" - main lamp + color wheel

After calling the scene, you can adjust the lamp parameters. If the scene includes the color wheel, the color adjustment in HomeAssistant will only change the color of the color ring
If you activate the scene for the main color, the light temperature and brightness adjustment will only affect the main white light.

Tuya Cloud properties query:

{
  "modelId": "dvrp60",
  "services": [
    {
      "actions": [],
      "code": "",
      "description": "",
      "events": [],
      "name": "默认服务",
      "properties": [
        {
          "abilityId": 20,
          "accessMode": "rw",
          "code": "switch_led",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_power",
            "attribute": "1667"
          },
          "name": "开关",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          "abilityId": 21,
          "accessMode": "rw",
          "code": "work_mode",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_mode",
            "attribute": "1664"
          },
          "name": "模式",
          "typeSpec": {
            "type": "enum",
            "range": [
              "white",
              "colour",
              "scene",
              "music"
            ]
          }
        },
        {
          "abilityId": 22,
          "accessMode": "rw",
          "code": "bright_value",
          "description": "",
          "extensions": {
            "iconName": "icon-liangdu1",
            "attribute": "1666"
          },
          "name": "亮度值",
          "typeSpec": {
            "type": "value",
            "max": 1000,
            "min": 10,
            "scale": 0,
            "step": 1
          }
        },
        {
          "abilityId": 23,
          "accessMode": "rw",
          "code": "temp_value",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_half",
            "attribute": "1666"
          },
          "name": "冷暖值",
          "typeSpec": {
            "type": "value",
            "max": 1000,
            "min": 0,
            "scale": 0,
            "step": 1
          }
        },
        {
          "abilityId": 24,
          "accessMode": "rw",
          "code": "colour_data",
          "description": "",
          "extensions": {
            "iconName": "icon-yanse",
            "attribute": "1664"
          },
          "name": "彩光",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          "abilityId": 25,
          "accessMode": "rw",
          "code": "scene_data",
          "description": "用于与光源一致的普通场景",
          "extensions": {
            "iconName": "icon-shoucang",
            "attribute": "1664"
          },
          "name": "场景",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          "abilityId": 26,
          "accessMode": "rw",
          "code": "countdown",
          "description": "",
          "extensions": {
            "iconName": "icon-a_nav_timer",
            "attribute": "1666"
          },
          "name": "倒计时",
          "typeSpec": {
            "type": "value",
            "max": 86400,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "s"
          }
        },
        {
          "abilityId": 27,
          "accessMode": "wr",
          "code": "music_data",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_mic",
            "attribute": "1664"
          },
          "name": "音乐律动",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          "abilityId": 28,
          "accessMode": "wr",
          "code": "control_data",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_box2",
            "attribute": "1664"
          },
          "name": "调节",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          "abilityId": 51,
          "accessMode": "rw",
          "code": "mix_rgbcw",
          "description": "用于4路,5路白光彩光全开的混光dp",
          "extensions": {
            "iconName": "icon-dp_taiyang",
            "attribute": "1664"
          },
          "name": "混光",
          "typeSpec": {
            "type": "raw",
            "maxlen": 255
          }
        }
      ]
    }
  ]
}

@baksogen
Copy link
Author

baksogen commented Aug 4, 2024

DPID 51 is used to control the lamp mode.

BiOM and others added 3 commits August 4, 2024 18:21
@make-all
Copy link
Owner

Related to #2107 for future improvement

@make-all make-all merged commit b94ef83 into make-all:main Aug 25, 2024
4 checks passed
make-all added a commit that referenced this pull request Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants