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

Tuya integration fails to initialise #141506

Open
JonboyP opened this issue Mar 26, 2025 · 23 comments
Open

Tuya integration fails to initialise #141506

JonboyP opened this issue Mar 26, 2025 · 23 comments

Comments

@JonboyP
Copy link

JonboyP commented Mar 26, 2025

The problem

A few days ago the Tuya integration showed it was 'initialising' and I couldn't get any further. I've used the integration for several months prior with no issues. After several minutes it changes to display "Failed to set up. Check the logs."

I have rolled back a few days and restored and backup but the issue persists.

All of the devices still function correctly in the SmartLife app. Deleting the integration and starting again I get as far as scanning the QR code using the SmartLife app, then when I click submit it just sits on the spinning blue circle.

I'm now stuck.

What version of Home Assistant Core has the issue?

2025.3.4

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

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:753
First occurred: 17:15:59 (1 occurrences)
Last logged: 17:15:59

Error setting up entry [redacted]@googlemail.com for tuya
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 753, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 138, in async_setup_entry
    await hass.async_add_executor_job(manager.update_device_cache)
asyncio.exceptions.CancelledError: Global task timeout

Additional information

No response

@home-assistant
Copy link

Hey there @tuya, @zlinoliver, 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)

@roncold
Copy link

roncold commented Mar 26, 2025

Same here

@PV-Joe
Copy link

PV-Joe commented Mar 27, 2025

Tuya Integration suddenly doesn't initialize anymore.

Please fix.

EDIT:
The TUYA Integration initialized again and is working now. The LOCAL TUYA worked while the official was not initializing.
The official TUYA App was working while the HA integration was faulty.

Core
2025.3.4

Supervisor
2025.03.3

Operating System
15.0

Frontend
20250306.0

@MongSergo
Copy link

Same here

@notalotofexperience
Copy link

Same same

1 similar comment
@Hypopheralcus
Copy link

Same same

@tusetuse
Copy link

Same here

@notalotofexperience
Copy link

After reloading it works again.

@tusetuse
Copy link

After reloading it works again.

What did u reload ? I reloaded the hub and nothing happened matter of fact i cant even reload that now.

@JonboyP
Copy link
Author

JonboyP commented Mar 29, 2025

Today I have tried again to get this working. After reloading the hub entry all of my devices showed up again, however they still do not work properly. The reload took about 10 minutes.

After The reload, although I can see the controls for my smart-plugs, I cannot actually control them. If I try to turn on a plug the control slider moves to the ON position and turns blue, but the device does not switch on. After about 15 seconds the slider goes grey again and returns itself to the OFF position.

Strangely, if I turn the plug on manually by pressing the physical button, Home Assistant reports this instantly and displays the slider in the ON position. I can also control the device properly and instantly in the Smart Life app.

Having turned a device on manually using its physical button, even though Home Assistant reports the device's ON/OFF status correctly I still cannot control the device using Home Assistant.

@PV-Joe
Copy link

PV-Joe commented Mar 29, 2025

The problem occured again after 3 days without problems of initialising.

The restart of Home Assistant is very slow as the Tuya integration just hangs for ages.

@PV-Joe
Copy link

PV-Joe commented Apr 1, 2025

Deactivating IP6 in Settings > Network fixed the problem for Tuya not initialising in Home Assistant.

@alexpi01
Copy link

alexpi01 commented Apr 1, 2025

Deactivating IP6 in Settings > Network fixed the problem for Tuya not initialising in Home Assistant.

You really took me out of my misery. Man! Thanks!

@JonboyP
Copy link
Author

JonboyP commented Apr 1, 2025

Deactivating IP6 in Settings > Network fixed the problem for Tuya not initialising in Home Assistant.

This has worked for me also. Well done that man!

Should I close this thread, or leave it open as there is still clearly an issue related to the use of IPv6?

@knorke132
Copy link

Deactivating IP6 in Settings > Network fixed the problem for Tuya not initialising in Home Assistant.

This has worked for me also. Well done that man!

Should I close this thread, or leave it open as there is still clearly an issue related to the use of IPv6?

i suggest to leave it open.
Disabling IPv6 is merely a workaround and not suitable for everyone.
This problem should be fixed in the integration itself

@JonboyP
Copy link
Author

JonboyP commented Apr 1, 2025

i suggest to leave it open. Disabling IPv6 is merely a workaround and not suitable for everyone. This problem should be fixed in the integration itself

Those were my thoughts too, so I shall leave it open.

@sergey-rd
Copy link

Tuya integration is not initialized. Deactivating IPv6 did not help

@tok1satsu1
Copy link

Deactivating IP6 in Settings > Network fixed the problem for Tuya not initialising in Home Assistant.

Works for me. Thanks!

@pirsasha
Copy link

pirsasha commented Apr 1, 2025

Disabling IP6 didn't help me, it doesn't work! Something is broken)

@ia1gerebec
Copy link

То же самое, то же самое

@coldburn89
Copy link

Disabling ipv6 and reloading the integration worked! But is it integration or HA related?

@kvi77
Copy link

kvi77 commented Apr 1, 2025

Disabling IP6 didn't help me, it doesn't work!

@ia1gerebec
Copy link

Отключение IP6 мне не помогло, это не работает!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests