make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.31k stars 515 forks source link

Request support for TAMPA MAGNETIC LED SYSTEM #686

Closed mariustt closed 1 year ago

mariustt commented 1 year ago

Information about DPS mappings

{
  "result": {
    "category": "dj",
    "functions": [
      {
        "code": "switch_led",
        "desc": "{}",
        "name": "开关",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "work_mode",
        "desc": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}",
        "name": "工作模式",
        "type": "Enum",
        "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"
      },
      {
        "code": "bright_value_v2",
        "desc": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}",
        "name": "亮度",
        "type": "Integer",
        "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "temp_value_v2",
        "desc": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}",
        "name": "色温",
        "type": "Integer",
        "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "scene_data_v2",
        "desc": "{\"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}}}",
        "name": "场景模式值",
        "type": "Json",
        "values": "{\"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}}}"
      },
      {
        "code": "countdown_1",
        "desc": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}",
        "name": "倒计时",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
      },
      {
        "code": "power_memory",
        "desc": "{}",
        "name": "断电记忆",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "do_not_disturb",
        "desc": "{}",
        "name": "勿扰模式",
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "switch_led",
        "name": "开关",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "work_mode",
        "name": "模式",
        "type": "Enum",
        "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"
      },
      {
        "code": "bright_value_v2",
        "name": "亮度",
        "type": "Integer",
        "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "temp_value_v2",
        "name": "冷暖",
        "type": "Integer",
        "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "scene_data_v2",
        "name": "情景模式",
        "type": "Json",
        "values": "{\"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}}}"
      },
      {
        "code": "countdown_1",
        "name": "倒计时",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
      },
      {
        "code": "power_memory",
        "name": "断电记忆",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "do_not_disturb",
        "name": "勿扰模式",
        "type": "Boolean",
        "values": "{}"
      }
    ]
  },
  "success": true,
  "t": 1683480094484,
  "tid": "9da5e6c6ecfb11edb63796ce6b547e6f"
}

Product ID

{
  "result": {
    "category": "dj",
    "category_name": "Light Source",
    "icon": "smart/icon/bay1590111448933PtAb/90c4dba03849963379ba267f46dd0f81.png",
    "ip": "",
    "lat": "0.0000",
    "lon": "0.0000",
    "model": "CD-TY-WY05",
    "name": "Light",
    "online": false,
    "product_id": "ge0bfvco",
    "product_name": "CD",
    "sub": true
  }
}

Information about how the device functions

https://www.topelighting.com/en/products/tampa-magnetic-led-system#home-lighting https://www.topelighting.com/en/products/tampa-magnetic-led-system/7w-black-led-spotlight-with-flood-distribution-tampa#home-lighting

image

DP ids:

ON/OFF: 1
Power Off Memory: 33
Mode: 2
Do not Disturb: 34
Brightness: 3
Color temp: 4
Scene: 6
Timer: 7
mariustt commented 1 year ago

@make-all Hi, I see a full info flag for other new devices reqeust issues. Perhaps I should provide additional information?

make-all commented 1 year ago

Logs are the most important info you can supply, which is why they are at the top of the New Device template. The cloud protocol documentation is useful for limits and possible enum value mappings, but is not always perfectly matched with the local protocol. Also some values are not reported locally, and the logs save a back and forward cycle of trying to figure out why the new config is not working.