core icon indicating copy to clipboard operation
core copied to clipboard

[Tuya] DS03 Ceiling Fan Dimmer Not Recognizing Light

Open jnrcorp opened this issue 1 year ago • 13 comments

The problem

I have 4 Treatlife DS03 ceiling fan light dimmer switches. One of them works properly in HA, while the other 3 do not. The one that works is much older than the others. The 3 that do not work only show the fan on/off toggle. It is missing fan speed, light on/off, and light brightness control.

For reference: Working DS03: Main Module: 3.1.4 MCU Module: 3.3.14

No Light Dimmer or Fan Speed in HA: Main Module: 2.1.6 MCU Module: 3.3.19

No Light Dimmer or Fan Speed in HA: Main Module; 2.1.6 MCU Module: 3.3.22

Looking at the diagnostics I see the configuration of the 3 newer ceiling fan dimmers are very different from the older one. It looks like the newer ones are misconfigured as "fskg" instead of "fsd" (based on code, but "fs" based on prior config). I am unsure how to replay the initial load API call. I am happy to provide any additional information to help diagnose this. I have also reached out to Treatlife, but they seem to not understand what I'm asking about.

What version of Home Assistant Core has the issue?

core-2024.4.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tuya

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tuya/

Diagnostics information

Diagnostics from the offending DS03 Ceiling Fan Dimmer Switch (after this will be the an example of an older device that works)

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.4.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "6.6.25-haos",
    "supervisor": "2024.04.0",
    "host_os": "Home Assistant OS 12.2",
    "docker_version": "25.0.5",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "adaptive_lighting": {
      "version": "1.21.1",
      "requirements": [
        "ulid-transform"
      ]
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "dependencies": [
      "ffmpeg"
    ],
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "integration_type": "hub",
    "iot_class": "cloud_push",
    "loggers": [
      "tuya_iot"
    ],
    "requirements": [
      "tuya-device-sharing-sdk==0.1.9"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://apigw.tuyaus.com",
    "terminal_id": "1712358616177OfbdaD",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "id": "eb973b259e8e50a9e0jssn",
    "name": "Fireplace",
    "category": "fskg",
    "product_id": "ea88zei7auxu48s6",
    "product_name": "Fan Dimmer Switch",
    "online": true,
    "sub": false,
    "time_zone": "-04:00",
    "active_time": "2024-04-15T20:58:16+00:00",
    "create_time": "2024-04-15T20:58:16+00:00",
    "update_time": "2024-04-15T20:58:16+00:00",
    "function": {
      "switch_fan": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      },
      "countdown_fan": {
        "type": "Integer",
        "value": {
          "unit": "\u5206\u949f",
          "min": 0,
          "max": 1440,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status_range": {
      "switch_fan": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      },
      "countdown_fan": {
        "type": "Integer",
        "value": {
          "unit": "\u5206\u949f",
          "min": 0,
          "max": 1440,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status": {
      "switch_fan": false,
      "bright_value": 1000,
      "countdown_fan": 0
    },
    "home_assistant": {
      "name": "Fireplace",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": [
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": null,
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "fan.fireplace",
            "state": "off",
            "attributes": {
              "friendly_name": "Fireplace",
              "supported_features": 0
            },
            "last_changed": "2024-04-15T23:41:22.943464+00:00",
            "last_reported": "2024-04-15T23:41:22.943464+00:00",
            "last_updated": "2024-04-15T23:41:22.943464+00:00"
          }
        }
      ]
    },
    "set_up": true,
    "support_local": true
  }
}

Fully functioning ceiling fan dimmer switch (DS03):

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.4.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "6.6.25-haos",
    "supervisor": "2024.04.0",
    "host_os": "Home Assistant OS 12.2",
    "docker_version": "25.0.5",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "adaptive_lighting": {
      "version": "1.21.1",
      "requirements": [
        "ulid-transform"
      ]
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "dependencies": [
      "ffmpeg"
    ],
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "integration_type": "hub",
    "iot_class": "cloud_push",
    "loggers": [
      "tuya_iot"
    ],
    "requirements": [
      "tuya-device-sharing-sdk==0.1.9"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://apigw.tuyaus.com",
    "terminal_id": "1712358616177OfbdaD",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "id": "87031225e09806b32193",
    "name": "Master Ceiling Fan",
    "category": "fs",
    "product_id": "ipyqwvhvzzjezv35",
    "product_name": "Ceiling Fan Dimmer Switch",
    "online": true,
    "sub": false,
    "time_zone": "-05:00",
    "active_time": "2024-04-05T21:44:41+00:00",
    "create_time": "2024-04-05T21:44:41+00:00",
    "update_time": "2024-04-05T21:44:41+00:00",
    "function": {
      "switch": {
        "type": "Boolean",
        "value": {}
      },
      "fan_speed": {
        "type": "Enum",
        "value": {
          "range": [
            "1",
            "2",
            "3",
            "4"
          ]
        }
      },
      "light": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status_range": {
      "switch": {
        "type": "Boolean",
        "value": {}
      },
      "fan_speed": {
        "type": "Enum",
        "value": {
          "range": [
            "1",
            "2",
            "3",
            "4"
          ]
        }
      },
      "light": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status": {
      "switch": false,
      "fan_speed": 2,
      "light": false,
      "bright_value": 1000
    },
    "home_assistant": {
      "name": "Master Ceiling Fan",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": [
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": null,
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "light.master_ceiling_fan",
            "state": "off",
            "attributes": {
              "supported_color_modes": [
                "brightness"
              ],
              "color_mode": null,
              "brightness": null,
              "friendly_name": "Ceiling Fan Light",
              "supported_features": 0
            },
            "last_changed": "2024-04-17T00:39:24.601749+00:00",
            "last_reported": "2024-04-17T00:39:24.601749+00:00",
            "last_updated": "2024-04-17T00:39:24.601749+00:00"
          }
        },
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": null,
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "fan.master_ceiling_fan",
            "state": "off",
            "attributes": {
              "preset_modes": [],
              "percentage": 50,
              "percentage_step": 25.0,
              "preset_mode": null,
              "friendly_name": "Ceiling Fan",
              "supported_features": 1
            },
            "last_changed": "2024-04-16T11:31:28.172237+00:00",
            "last_reported": "2024-04-16T11:31:28.172237+00:00",
            "last_updated": "2024-04-16T11:31:28.172237+00:00"
          }
        }
      ]
    },
    "set_up": true,
    "support_local": true
  }
}

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

jnrcorp avatar Apr 17 '24 01:04 jnrcorp

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tuya can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tuya Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

home-assistant[bot] avatar Apr 17 '24 01:04 home-assistant[bot]

@frenck Please let me know if there's anything else I can provide to help resolve this. Thank you!

jnrcorp avatar Jun 18 '24 16:06 jnrcorp

Tuya debugging page

@frenck I am also having this issue. I have‎ TREATLIFE(ASIN: B08P5D3ZKW) Fan controller. Main Module: V1.1.71 MCU: V1.0.7. ON/OFF works fine. fan speed is represented by 0-100% slider in HA and the status does not change when manipulated. In the Google Home and Tuya app, it is represented by four enums and works well.

koolman27 avatar Jun 27 '24 07:06 koolman27

Exact same issue for me. Is there anything additional I can add to this to help?

ewatts25 avatar Sep 12 '24 19:09 ewatts25

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

This is not fixed.

jnrcorp avatar Dec 11 '24 20:12 jnrcorp

This issue has not been resolved. I’d like to suggest that it is kept open for when the developers have cycles.

On Dec 11, 2024, at 3:10 PM, issue-triage-workflows[bot] @.***> wrote:



There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/115726#issuecomment-2537007866, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGM4XITWSJILHWAMPS56D232FCL2BAVCNFSM6AAAAABGKMGDE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZXGAYDOOBWGY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ewatts25 avatar Dec 11 '24 20:12 ewatts25

Same exact thing here. I have one working one from years ago. I just installed 2 more and the only control option in HA for those is a single On/Off switch. Working: Main Module V3.1.4 MCU Module V3.3.14 Screenshot_20241215-171707_Home Assistant Screenshot_20241215-171836_Smart Life

Not working: Main Module V2.1.6 MCU Module V3.3.22

Not working: Main Module V2.1.17 MCU Module V4.0.4 Screenshot_20241215-171627_Home Assistant Screenshot_20241215-171809_Smart Life

The problem also exists in the Smart Life (Beta) Home Assistant Integration: https://developer.tuya.com/en/docs/iot/Smart_Life_Integration?id=Kd0gk9baikbb7 https://github.com/tuya/tuya-smart-life/tree/main

daveck86 avatar Dec 15 '24 22:12 daveck86

I have the same problem. For me, the switch works in the Tuya android app, and it works with localtuya (though the setup is very manual, had to tell it which dpids to use for everything), but it doesn't work with official integration. And by not work, I mean, it only shows a Fan but not the Light, and the Fan is missing the speed control, etc.

I poked around and I think I've hit on what's going wrong.

There is apparently a "DP Instruction" and a "Standard Instruction" mode, and for this device, the standard instruction mode is broken (the mapping is incomplete/terrible).

Pasted Graphic 16 Pasted Graphic 15

In the API docs, I see some other URLS that might use DP Instruction mode, such as /v2.0/cloud/thing/{device_id}/shadow/properties, but I have not tested that yet. I haven't been able to find the documentation for the /v1.1/m/life/{device_id}/specifications url (or at least not one with /m/life in it) but it seems similar to the ones that use Standard Instruction mode.

Also, it seems like the MQTT connection is returning the full DPids, which results in errors, at least if I turn up logging in the library, when I press buttons on the switch to turn on and off the light that HA thinks doesn't exist (DPID 101 in this case).

For reference, here's how I have localtuya configured for this device:

{
 "data": {
    "device_config": {
      "add_entities": false,
      "device_id": "ebb1ca22936cecaeb3yj7r",
      "dps_strings": [
        "1 (value: True)",
        "3 (value: 1)",
        "6 (value: 1000)",
        "101 (value: False)",
        "105 (value: 100)",
        "106 (value: mode1)",
        "108 (value: 1)"
      ],
      "enable_debug": false,
      "entities": [
        {
          "brightness": 6,
          "brightness_lower": 29,
          "brightness_upper": 1000,
          "color_temp_max_kelvin": 6500,
          "color_temp_min_kelvin": 2700,
          "color_temp_reverse": false,
          "id": 101,
          "music_mode": false,
          "platform": "light"
        },
        {
          "fan_direction_forward": "forward",
          "fan_direction_reverse": "reverse",
          "fan_dps_type": "str",
          "fan_speed_control": 3,
          "fan_speed_max": 4,
          "fan_speed_min": 1,
          "fan_speed_ordered_list": "disabled",
          "id": 1,
          "platform": "fan"
        }
      ],
      "model": "Fan Dimmer Switch",
      "product_key": "ea88zei7auxu48s6",
      "protocol_version": "3.4"
    }

tringenbach avatar Dec 28 '24 03:12 tringenbach

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

This issue is still not resolved.

daveck86 avatar Mar 28 '25 10:03 daveck86

This issue is still not resolved.

kd2tbi avatar May 10 '25 14:05 kd2tbi

It is still not resolved; I am also having this problem and have had it for at least 2 years now.

NillaWafers03 avatar May 12 '25 19:05 NillaWafers03

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still not solved

NillaWafers03 avatar Aug 11 '25 16:08 NillaWafers03

Still not solved

Just Bought a 2 pack of DS03 and they are not working with local tuya or anything, I have old DS03 that are working perfectly.

The New DS03 are running: Main Module: V3.1.17 MCU Module: V4.0.6

For some reason I cant get this to work.

The old ones are working perfectly and are running: Main Module: V2.1.6 MCU Module: V3.3.22

aovr1234 avatar Aug 25 '25 01:08 aovr1234

Try this: dimmer_datapoint: 6 switch_datapoint: 101

Solved the same issue. My DS03 were revision 2023.

cloudguy23 avatar Oct 21 '25 21:10 cloudguy23

If the desired data is not available in function/status_range/status, then there is nothing that Home Assistant can do.

You need to contact Tuya support (or the manufacturer) to have it added

epenet avatar Nov 19 '25 10:11 epenet

If the desired data is not available in function/status_range/status, then there is nothing that Home Assistant can do.

You need to contact Tuya support (or the manufacturer) to have it added

@epenet My understanding is that this integration is maintained by Tuya and that Home Assistant has some sort of relationship with the company. Is that not the case?

Is there any reason to believe that contacting Tuya support, as an individual consimer, would actually be helpful here?

tringenbach avatar Nov 21 '25 00:11 tringenbach

Sadly, no it is not the case. Although it was originally built by Tuya employees, the integration is just like most other Home Assistant integrations and is supported by the community.

The best the community can do it analyse your logs and/or diagnostic dumps to show what the SDK returns - but we cannot in any way influence that on the HA end.

epenet avatar Nov 21 '25 06:11 epenet