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 support for Depauley Ceiling Fan Light #1957

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

scotttimmins
Copy link
Contributor

@scotttimmins scotttimmins commented May 27, 2024

I've added support for this ceiling fan with 1 issue - it does not seem to support the hs colour setting, it instead uses dps 51 (labelled mix_rgbcw).

I've had a look into this but rapidly got out of my depth.

In case you wanted to have a look yourself the data model is below as are some colour change commands from the device logs.

Feel free to disable the RGBW bits if preferred.

{
  "modelId": "enqphc",
  "services": [
    {
      "actions": [],
      "code": "",
      "description": "",
      "events": [],
      "name": "默认服务",
      "properties": [
        {
          "abilityId": 20,
          "accessMode": "rw",
          "code": "switch_led",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_power",
            "attribute": "643"
          },
          "name": "灯开关",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          "abilityId": 21,
          "accessMode": "rw",
          "code": "work_mode",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_mode",
            "attribute": "640"
          },
          "name": "灯模式",
          "typeSpec": {
            "type": "enum",
            "range": [
              "white",
              "colour",
              "scene",
              "music"
            ]
          }
        },
        {
          "abilityId": 22,
          "accessMode": "rw",
          "code": "bright_value",
          "description": "",
          "extensions": {
            "iconName": "icon-liangdu1",
            "attribute": "642"
          },
          "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": "642"
          },
          "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": "640"
          },
          "name": "彩光",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          "abilityId": 25,
          "accessMode": "rw",
          "code": "scene_data",
          "description": "",
          "extensions": {
            "iconName": "icon-shoucang",
            "attribute": "640"
          },
          "name": "场景",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          "abilityId": 26,
          "accessMode": "rw",
          "code": "countdown",
          "description": "",
          "extensions": {
            "iconName": "icon-a_nav_timer",
            "attribute": "642"
          },
          "name": "灯倒计时",
          "typeSpec": {
            "type": "value",
            "max": 86400,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "s"
          }
        },
        {
          "abilityId": 28,
          "accessMode": "wr",
          "code": "control_data",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_box2",
            "attribute": "640"
          },
          "name": "调节",
          "typeSpec": {
            "type": "string",
            "maxlen": 255
          }
        },
        {
          "abilityId": 36,
          "accessMode": "rw",
          "code": "mix_light_scene",
          "description": "支持白光彩光场景混光",
          "extensions": {
            "iconName": "icon-dp_mode",
            "attribute": "128"
          },
          "name": "混光场景",
          "typeSpec": {
            "type": "raw",
            "maxlen": 128
          }
        },
        {
          "abilityId": 51,
          "accessMode": "rw",
          "code": "mix_rgbcw",
          "description": "支持白光彩光混光",
          "extensions": {
            "iconName": "icon-deng",
            "attribute": "640"
          },
          "name": "混光",
          "typeSpec": {
            "type": "raw",
            "maxlen": 128
          }
        },
        {
          "abilityId": 52,
          "accessMode": "rw",
          "code": "fan_mode",
          "description": "",
          "extensions": {
            "iconName": "icon-a_mode_fan",
            "attribute": "640"
          },
          "name": "风扇模式",
          "typeSpec": {
            "type": "enum",
            "range": [
              "nature",
              "sleep",
              "fresh",
              "smart"
            ]
          }
        },
        {
          "abilityId": 53,
          "accessMode": "rw",
          "code": "fan_speed",
          "description": "",
          "extensions": {
            "iconName": "icon-FanSpeed",
            "attribute": "640"
          },
          "name": "风扇档位",
          "typeSpec": {
            "type": "value",
            "max": 100,
            "min": 1,
            "scale": 0,
            "step": 1
          }
        },
        {
          "abilityId": 54,
          "accessMode": "rw",
          "code": "fan_direction",
          "description": "",
          "extensions": {
            "attribute": "640"
          },
          "name": "风扇转向",
          "typeSpec": {
            "type": "enum",
            "range": [
              "forward",
              "reverse"
            ]
          }
        },
        {
          "abilityId": 55,
          "accessMode": "rw",
          "code": "countdown_left_fan",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_time2",
            "attribute": "642"
          },
          "name": "风扇倒计时",
          "typeSpec": {
            "type": "value",
            "max": 540,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "min"
          }
        },
        {
          "abilityId": 56,
          "accessMode": "ro",
          "code": "fault",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_warming",
            "attribute": "640"
          },
          "name": "故障告警",
          "typeSpec": {
            "type": "bitmap",
            "label": [
              "motor_fault"
            ],
            "maxlen": 1
          }
        },
        {
          "abilityId": 57,
          "accessMode": "rw",
          "code": "fan_beep",
          "description": "",
          "extensions": {
            "iconName": "icon-yinliang",
            "attribute": "640"
          },
          "name": "蜂鸣器",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          "abilityId": 58,
          "accessMode": "rw",
          "code": "brightness_min_1",
          "description": "",
          "extensions": {
            "iconName": "icon-liangdu1",
            "attribute": "128"
          },
          "name": "最小亮度",
          "typeSpec": {
            "type": "value",
            "max": 1000,
            "min": 10,
            "scale": 0,
            "step": 1
          }
        },
        {
          "abilityId": 59,
          "accessMode": "rw",
          "code": "led_type_1",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_box2",
            "attribute": "128"
          },
          "name": "光源类型",
          "typeSpec": {
            "type": "enum",
            "range": [
              "led",
              "incandescent",
              "halogen"
            ]
          }
        },
        {
          "abilityId": 60,
          "accessMode": "rw",
          "code": "fan_switch",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_power2",
            "attribute": "1664"
          },
          "name": "风扇开关",
          "typeSpec": {
            "type": "bool"
          }
        },
        {
          "abilityId": 64,
          "accessMode": "rw",
          "code": "fan_countdown_left",
          "description": "",
          "extensions": {
            "iconName": "icon-dp_time3",
            "attribute": "1664"
          },
          "name": "风扇倒计时",
          "typeSpec": {
            "type": "value",
            "max": 540,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "min"
          }
        }
      ]
    }
  ]
}

Device logs:
Publish Mix Rgbcw MAYA5gPoZTgA5gAA app client appName:Smart Life Publish Mix Rgbcw MAYAfAJUZTgA5gAA app client appName:Smart Life Publish Mix Rgbcw MAYyZTAzZTgA5gAA app client appName:Smart Life

@scotttimmins scotttimmins force-pushed the chore/add-devices branch 2 times, most recently from cfc7d9b to bff1668 Compare May 27, 2024 13:40
@scotttimmins
Copy link
Contributor Author

Thanks for your guidance - I've addressed all the issues you raised and decided to leave the mix_rgbcw as it is until I get round to doing a more systematic approach to decipher the codes .

- follow HA naming convention
- add translation_keys where appropriate
@make-all make-all merged commit 7805d46 into make-all:main Jun 13, 2024
4 checks passed
make-all added a commit that referenced this pull request Jun 14, 2024
- Allow use of newer tuya-device-sharing-sdk
0.2.0 appears to have been released (from dev branch), though HA
2024.6.1 is still shipping 0.1.9.  But we do not want this integration
to break when they update it. Discussion #1998
- update docs for recent PRs #1957, #1958, #1968, #2009, #2011
timlaing pushed a commit to timlaing/tuya-local that referenced this pull request Aug 8, 2024
- Allow use of newer tuya-device-sharing-sdk
0.2.0 appears to have been released (from dev branch), though HA
2024.6.1 is still shipping 0.1.9.  But we do not want this integration
to break when they update it. Discussion make-all#1998
- update docs for recent PRs make-all#1957, make-all#1958, make-all#1968, make-all#2009, make-all#2011
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