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.83k forks source link

Tuya integration is empty #109512

Closed Albrecht1966 closed 7 months ago

Albrecht1966 commented 7 months ago

The problem

Today, all my Tuya devices disappeared. I only see a hub without any entities. What did I do to resolve:

  1. Deleted the Tuya integration.
  2. Restart HA.
  3. On the developers, Tuya page I deleted all the cloud projects.
  4. Created a new cloud project following the instructions from HA.
  5. All my devices are linked, to the new project, in the developer's platform.
  6. In HA added the Tuya integration, filled in the Tuya developer's access id and access secret key and my Tuya login.credentials from the Tuya app.
  7. The integration is added with success, however again no entities.

What version of Home Assistant Core has the issue?

core-2024.1.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tuya

Link to integration documentation on our website

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

Diagnostics information

config_entry-tuya-1863e79a19120a576d311aa9920183e1.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No error message

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)

Princessalbert commented 7 months ago

The problem

Today, all my Tuya devices disappeared. I only see a hub without any entities. What did I do to resolve:

  1. Deleted the Tuya integration.
  2. Restart HA.
  3. On the developers, Tuya page I deleted all the cloud projects.
  4. Created a new cloud project following the instructions from HA.
  5. All my devices are linked, to the new project, in the developer's platform.
  6. In HA added the Tuya integration, filled in the Tuya developer's access id and access secret key and my Tuya login.credentials from the Tuya app.
  7. The integration is added with success, however again no entities.

What version of Home Assistant Core has the issue?

core-2024.1.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tuya

Link to integration documentation on our website

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

Diagnostics information

config_entry-tuya-1863e79a19120a576d311aa9920183e1.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No error message

Additional information

No response

Same problem here. Worked this morning. Now when comming home all tuya devices are gone. Can still see them in tuya app and on tuya iot login.

relighted commented 7 months ago

having exact the same, on ha 2024.01.5; but in Tuya developer console i still have my cloud project. recreation the integration did not resolve. In api log its visible it started failing 2-2-2024 11:45 (CET). (https://eu.iot.tuya.com/cloud/monitor/api)

Log fault entry in HA

`Logger: tuya_iot Source: /usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py:166 First occurred: 4:37:07 PM (1 occurrences) Last logged: 4:37:07 PM

error while get mqtt config`

egbertomonteiro commented 7 months ago

Same problem, probably i'll replace all my Tuya hardware. A ton of problems, i feel like i bought some childs to take care.

B4sicallyF0x commented 7 months ago

Same problem here

ahoogendoorn commented 7 months ago

Same problem here. I suspect after an upgrade of HA Core

Kiphouder commented 7 months ago

Same problem

Autcontrol commented 7 months ago

Exact same problem here! Try everything. It happends since the last update…

dutchsnowden commented 7 months ago

Same issue here.

rewri3 commented 7 months ago

Same problem also for me

grivs82 commented 7 months ago

Same issue for me as well.

hanafytech commented 7 months ago

Also happening to me as well. I've tried to reload the intergration, but had no luck.

egbertomonteiro commented 7 months ago

i'm trying: https://github.com/home-assistant/core/issues/80278

orenk86 commented 7 months ago

Same issue here...

jonathh21 commented 7 months ago

Same as for me:(

lifey commented 7 months ago

same for me :(

EVERYDAYHERO2000 commented 7 months ago

Reload from backups to core version 2024.1.2 and reinstall Tuya integration. All Tuya devices are available now

Ventosinos commented 7 months ago

I also have the same issue. My HomeAssistant in Docker container reboots every morning at 5 AM GMT+1. After several reboots and Tuya account deleting and adding, I had no change. But I saw something weird in the logs:

ERROR (Thread-4) [tuya_iot] error while get mqtt config
ERROR (Thread-4) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py", line 161, in run
    time.sleep(self.mq_config.expire_time - 60)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'expire_time'

I hope that would help to find a solution

rqmartins73 commented 7 months ago

Good-afternoon,

Same here with core 2024.1.6

Logger: root Source: /usr/src/homeassistant/homeassistant/bootstrap.py:406 First occurred: 5:23:52 PM (1 occurrences) Last logged: 5:23:52 PM

Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py", line 161, in run time.sleep(self.mq_config.expire_time - 60) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'expire_time'

sumasage commented 7 months ago

same for me. did the extend trial period from the other post. hopefully we can find a permanent solution.

xmadmike1978 commented 7 months ago

I've got the same problem, after installing mosquitto & MQTT, tuya stopped working: Error unloading entry XMADMIKE for tuya Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 561, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/tuya/init.py", line 131, in async_unload_entry hass_data.device_manager.mq.stop() File "/usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py", line 212, in stop self.client.disconnect() ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'disconnect'

Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py", line 161, in run time.sleep(self.mq_config.expire_time - 60) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'expire_time'

tuya still not working after uninstalling mosquitto/mqtt, guess one of them is installing something replacing the default MQTT commands

rhmhendriks commented 7 months ago

Same issue here in the netherlands. Sll devices are gone since today but still available in the tuya webportal

Ventosinos commented 7 months ago

Seeing all the same missing devices. However, I logged back in to the Tuya Platform console site, looking for the Smartlife App Integration section has been removed and the app integration looks like it's been overhauled. Wondering if they also broke/changed service integration with the app user. image

Hi [armunro] When I log in on my Tuya project, at first I see no devices, but eventually the webpage refresh and I can see my devices. I also wonder if the problem comes from Tuya and not from Home Assistant.

andszabi commented 7 months ago

Same here, I lso tryed to remove tuya platform, reinstall, 0 devices and entitys : (

armunro commented 7 months ago

Seeing all the same missing devices. However, I logged back in to the Tuya Platform console site, looking for the Smartlife App Integration section has been removed and the app integration looks like it's been overhauled. Wondering if they also broke/changed service integration with the app user. image

Hi [armunro] When I log in on my Tuya project, at first I see no devices, but eventually the webpage refresh and I can see my devices. I also wonder if the problem comes from Tuya and not from Home Assistant.

Apologies, this was my error. I was looking under authorization but it's actually under "Devices." I see the my devices as expected so that can be disregarded.

pavlozelinskyi commented 7 months ago

Same problem

Fred68700 commented 7 months ago

+1

armunro commented 7 months ago

It seems that the intent is to fairly quickly eliminate the need for the IoT Account and provide a new integration that uses the SmartLife app credentials instead.

https://www.reddit.com/r/homeassistant/comments/17wus59/is_tuya_working_on_a_new_integration_mechanism/?utm_source=reddit&utm_medium=usertext&utm_name=homeassistant&utm_content=t1_kodwi5l

I highly suspect its related and the ultimate best fix will eventually be to move to this integration but I'm still not positive. Would love any insight. Have a few things I'd like to get working again. ;-)

abelone91 commented 7 months ago

+1

stefan110265 commented 7 months ago

hatte das gleiche Problem. Bin wieder auf 2024.1.3 zurück und Tuya neu installiert und alles ist wieder da... natürlich alles durcheinander.....viel Arbeit

PPocok commented 7 months ago

I have the same issue here in the UK since the 2nd of Feb. All my lights are Tuya - Smart Life... The platform sees all the devices, but Home Assistant says no devices or entities. It's a pain for all of us. I hope they fix this as soon as possible. Fingers crossed

AransDino commented 7 months ago

Same problem here

ItsMeNJC commented 7 months ago

I had this same problem.

My solution was to remove the integration completely and install the new 'SmartLife' version from Tuya. It pulled all my details into HASS without the need to login to 'Tuya IoT Platform' and without having to annually apply for a free account from Tuya.

It also pulled in ZigBee devices that were not supported by the Tuya Integration - like IR remote controls, touch switches and items that are controlled via my Tuya Bluetooth/ Zigbee gateway.

NederWeb commented 7 months ago

Same here, also the beta smartlife is not working either

andszabi commented 7 months ago

I found a website where its explained how to instal the smartlife, worked for me.

https://web.archive.org/web/20231116191355/https://developer.tuya.com/en/docs/iot/Smart_Life_Integration?id=Kd0gk9baikbb7

andreumarti commented 7 months ago

The same problem here.

Loeffelmaster commented 7 months ago

Yes, all was working until I made a restart for some HACS integrations. Now all Tuya devices are gone.

robswan-sonder commented 7 months ago

Yup; broken for me too!

Westerbroek commented 7 months ago

Same problem here, all Tuya devices gone.

FrozenOzone commented 7 months ago

Same problem here as well.

AuroreVgn commented 7 months ago

Same problem here after the last update (2024.1.6)...

grivs82 commented 7 months ago

I found a website where its explained how to instal the smartlife, worked for me.

https://web.archive.org/web/20231116191355/https://developer.tuya.com/en/docs/iot/Smart_Life_Integration?id=Kd0gk9baikbb7

This fixed the issue for me as well

DmytroKorniienko commented 7 months ago

+1

michelkalf commented 7 months ago

Same here with core-2024.1.6

wasyl25 commented 7 months ago

Tuya has changed authentication and integration for HA, its simpler, but it works just on beta version. I have tried, and it's working. It seems that now we do not need iot account to integrate. You have to remove tuya integration, then allowing yor HA to install beta version, and then you have to add tuya integration. Then you can link yor tuya with user code and qr code.

rewri3 commented 7 months ago

Removed tuya and added smart life integration. Everything started working again!

mr-matthew-w-peters commented 7 months ago

Same here, without warning all my Tuya devices have disappeared. The usual restarts/reintegration's do nothing to resolve the issue. Thankfully I use LocalTuya for virtually all of my devices except for the Curtains/Blinds/Covers as LocalTuya sucks for those.

Marki-dev commented 7 months ago

Same here, noticing some errors in logs::

Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py", line 161, in run time.sleep(self.mq_config.expire_time - 60) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'expire_time'

Westerbroek commented 7 months ago

Hi, With the smartlife app, i can add my devices again en this works with HomeAssistant! But, is there an way to migrate my account to the Smart Life App? I have many devices...

michelkalf commented 7 months ago

Working again with smartlife (beta) app