Tuya Integration error: code: 2406 | msg: 'skill id invalid'

Same here. Working again this morning. Last night was failing.

you’re the goat!!!

Update: 3 hours later it failed again.

Odd, mine is still failing. Guess I’ll give it some more time before trying to go through the steps of unlinking and recreating a new project

Local Tuya here we come: GitHub - rospogrigio/localtuya: local handling for Tuya devices

P.s. I am not associated with Local Tuya!

Homeassistant has nothing to do with this. Who knows how Tuya’s infrastructure works and what “upgrades” they made to it. That is what happens when we rely on 3rd party services.

This resolved my issue.

While I was at it, i renewed my 6-month trail.

It’s really not worth it. I was so excited when I discovered home assistant and, really, the concept is awesome- I did some pretty cool custom things with it. But if your not constantly babying it and working on it, it’s just not reliable at all. Like dude above said, that’s what happens when you rely on 3rd party services. I’ve gotten to the point that my Tuya lights are really the only thing I use HA for anymore because I just don’t have the time to keep other stuff running (which defeats the principle of home automation anyhow since I’ve put in more hours making stuff work than I will ever save in 100 lifetimes) and this is the 3rd or 4th Tuya HA failure in a year. I think this is my cue to move my automations back to the Tuya app and shut my server down for good.

Worked for me also!!!

All previous points made under the “HA is a hassle” are true.

HA depends on 3rd parties to work and people doing voluntary work (open-source), many times depending on reverse engineering, which is prone to failures by default when the original service gets updated.

HA is really a hassle to maintain in the long run, since you need to be always checking in, updating stuff, then getting afraid of the update breaking something else. Not to mention when stuff randomly breaks like this and you’re like “OMG, again? What should I do this time?”. For instance, I’m googling this issue for a few days, until I found this post. It’s tiresome to be always reporting issues at random spots.

Again, this is HA main nature, since it depends on 3rd party services and voluntary work, but it’s tiresome nonetheless. It’s worthy if you take this as a hobby or if you have lots of smart devices. For a couple of stuff… Just keep your vendor apps :man_shrugging:

That all said, thanks for all the developers for the kiloliters of sweat put onto this huge pile of code, and thanks to @onkytonk for the solution (and @Henrik1986 for the guide). Those should be marked as solutions, @hAtul.

Wow that was annoying, but it worked.

I noticed that my IOT Core cloud service was ‘Alerting’ about being expired. I applied for a 6 month extension.
Before that I removed and relinked the phone app which was not effective.
So I built a new project. The instuctions from @Henrik1986 say after removing the app to link to the new project, but doesn;t actually say to make a new cloud project. So the new project was linked and did nothing.
Now nether project show as being link to the app in teh phone app settings, but that app can’t link any more projects as scanning the QR code and going to the next page in the IOT website says are already 2. I can’t remove them from the phone app as the Cloud Develpment Project section isn’t there any more after I unliked the first project. And they don’t exist to be unlinked in the Cloud Projects part of teh webpage.
So I tried to manually revoke at permissions on the new project which was possible in Cloud - Cloud Services - but I still have 2 ghost projects link to my app preventing me from moving forward.
It’s not possible to delete projects.
It’s a bit of a disaster. I’ll wait it out for 24 hours to see if something tunes up on the phone app to remove again. Otherwise I don’t see me getting any Tuya activity back without deleteing the entre tuya home and starting again. That woud be very unfortunate.
If anyone has an idea, I’d love to hear it - but I’m pretty much popping in for a ‘Me Too’. I’m not feeling very positive about a fix that doesn’t involve a total Tuya rebuild.

This also worked for me. I did not have to create a new project at all.

Yup… just unlinked and re-linked.
Worked within seconds.


1 Like

When you say unlinked and relinked, do you mean removing the integration in HA? My trial extended was accepted but it’s still not connecting and giving the same error.

Refer to these steps (by @Henrik1986, a bit above) to unlink from the Tuya Cloud Platform and then link again your account: Tuya Integration error: code: 2406 | msg: 'skill id invalid' - #13 by Henrik1986

Here’s the steps I performed that got it working:

  1. Login to the Tuya IoT platform.
  2. One the left side menu, click “Cloud”
  3. Click on your “My Cloud Project” you used to setup Home Assistant. (Don’t click Edit)
  4. Click “Devices”
  5. Click the “Link Tuya App Acccount” tab.
  6. Under the “Operation” column, Click “Unlink” and when prompted in the popup click “Unlink” again.
  7. Now click the blue “Add App Account” button. A popup will appear with a QR code.
  8. Open the Tuya app in your phone.
  9. Click the orange plus symbol in the upper right. (This is in Android, not sure for IOS)
  10. Click “Add Device” from the menu that appears.
  11. Click the [-] symbol in the upper right corner of the “Add Device” screen
  12. Scan the QR code displayed above.
  13. Click “Confirm Login”
  14. Return to the IoT platform, and click to select “Automatic Link” and “Read, Write, and Manage”
  15. Click “Ok”

Your Tuya devices should all start working in Home Assistant again in seconds.


This worked perfectly!

(One note, if you set up your devices on your phone with the SmartLife App rather than Tuya, you’ll want to scan the QR code using SmartLife.)


I am led here to this forum as well after this same error in the last hour.

For those of you asking, this appears to be on the Tuya side of things so no need to do anything in HA, assuming you previously had it set up.

@cap60552 nailed the steps down for me.

For you iOS users, after step 8, click the “Me” symbol in the bottom right. Then click the barcode icon in the top right corner to scan the barcode in the previous steps.

Everything re-synced up.

1 Like

Was working fine - probably up to 2022.10.2 (and appeared after 2022.10.4) - Getting this same Tuya issue now as well… But also noted this error in the logs! - thoughts?

2022-10-16 07:59:21.024 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration tuya: cannot import name 'AuthType' from 'tuya_iot' (/usr/local/lib/python3.10/site-packages/tuya_iot/__init__.py)
2022-10-16 07:59:21.027 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 807, in async_create_flow
File "/usr/src/homeassistant/homeassistant/loader.py", line 722, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 739, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 7, in <module>
from tuya_iot import (
ImportError: cannot import name 'AuthType' from 'tuya_iot' (/usr/local/lib/python3.10/site-packages/tuya_iot/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 225, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 243, in _async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 814, in async_create_flow
raise data_entry_flow.UnknownHandler

Thank you very much your tips help me fix the error after I upgraded HA to the following version …

Home Assistant 2022.10.4
Supervisor 2022.10.0
Operating System 9.2
Frontend 20221010.0 - latest

Cheers :wink:

1 Like