home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.16k stars 29.85k forks source link

Tuya smoke detectors stopped working with 2024.2 #109923

Open SmartHomeFanatic opened 7 months ago

SmartHomeFanatic commented 7 months ago

The problem

The old Tuya integration supported smoke detectors. With the update they know only show their battery state, the smoke state is unavailable.

What version of Home Assistant Core has the issue?

core-2024.2.0

What was the last working version of Home Assistant Core?

core-2024.1.6

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

tuya-bda7d95256d2027f5f90c07f906873eb-Rauchwarnmelder-ae17b3f40220236b063ea161e77a80d7.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 7 months ago

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)

frenck commented 7 months ago

Can you attach a diagnostic download of your device to this issue?

Thanks! 👍

../Frenck

SmartHomeFanatic commented 7 months ago

Hey frenck, what an honor :)

Attached the diagnostic file

frenck commented 7 months ago

Looking at your diagnostics, this the raw data what Tuya (their servers) provide us for your device right now:

    "function": {},
    "status_range": {
      "battery_state": {
        "type": "Enum",
        "value": {
          "range": [
            "low",
            "middle",
            "high"
          ]
        }
      }
    },
    "status": {
      "battery_state": "high"
    },

As you can see, it only contains a description of the possible states a battery can have, and finally the status with the current batter state (which is high).

Unfortunately, this is not something we can do anything about. We can't make up data or magically make information appear.

This is something you need to contact Tuya about.

Sorry, I wish I had a better message for you.

../Frenck

SmartHomeFanatic commented 7 months ago

Understood but why did this work before the update with the developer account? I mean it's more comfortable to just authenticate HA by using the Tuya app and the QR code but if we lose functionality is this really the best option?

frenck commented 7 months ago

Understood but why did this work before the update with the developer account?

I don't know. Maybe Tuya does something different based on authentication? I can't tell. The only part that changed was the authentication.

hjaltij commented 7 months ago

Same here. I remember configuring something specific under my dev account to enable the smoke detector state.

SmartHomeFanatic commented 7 months ago

Yeah, good point. You had to enable the "DP instruction" mode in the device details at http://iot.tuya.com to make it work.

grafik

BigFoot2020 commented 7 months ago

@SmartHomeFanatic I think this issue for Smart Life (Beta) integration has same root cause as commented by Tuya developer:

_HA does not support all functions here, only the standard instruction set of the device is supported. This device only support batterystate.

Not sure if this is actually HA issue, more likely new underlying library (tuya-device-sharing-sdk==0.1.9) does not support "DP Instruction" set, while previously used "tuya-iot-py-sdk==0.6.6" did support it.

SmartHomeFanatic commented 7 months ago

That may be the case. But why are we going for another SDK then and force users to lose functionality? I am totally fine that the IoT account wasn't the best solution. I hated it myself for the need of extending the account but at least it worked. What now? Throwing the smoke detector in the bin and buy something else?

Why are there smoke detectors and other devices available that have the Tuya logo on their packaging that aren't 100% supported by their own SDK? I know that this might be one downside of buying cheap stuff (this is why I only have a hand full of Tuya devices) and this is no rant against HA (I have too much love for that) but why going for a solution that's not ready? There are so many new posted issues for the Tuya integration since the update.

shihuimiao commented 7 months ago

Yeah, good point. You had to enable the "DP instruction" mode in the device details at http://iot.tuya.com to make it work.

grafik

the tuya-device-sharing-sdk has removed the Tuya cloud development workflow, allowing users to simply scan and log in using the app, The "DP instruction" mode depends on cloud projects, so Not supported for app users to use, In the next version, We will launch custom DP point development that supports non-standard DP points.

SmartHomeFanatic commented 6 months ago

The device has a Tuya logo on its packaging and works perfectly fine within the Tuya app. Why are we talking about "non-standards"? This is something that had to be in the SDK right away.

hjaltij commented 6 months ago

One of my Tuya smoke detectors woke me up last night for absolutely no reason. I kinda expected it to be interconnected to the other ones I have but they were all silent.

Needless to say I'm probably going to replace them all for Zigbee or Z-wave ones.

shihuimiao commented 6 months ago

DP instruction

This is because the product manufacturer did not define certain DP instructions as standard instruction sets, which is beyond our control.

issue-triage-workflows[bot] commented 3 weeks ago

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.

ArnolddeBolster commented 3 weeks ago

for me it was solved by contacting Tuya and for as far as I know they made DP instructions for this device categorie public and the problem was solved.