Интеграция tuya в home assistant ошибка

Туя Сделали новую интеграцию, а старую удалили из стандартных интеграций Home Assistant. Теперь, чтоб установить новую интеграцию, помимо ввода региона, логина и пароля от аккаунта tuya, нам понадобится еще ввести Tuya iot Access Secret и Tuya iot Access id. Их можно найти на сайте iot.tuya.com/cloud/ 

В этой статье я Вам какраз и покажу как настроить новую интеграцию tuya. Итак переходим на сайт iot.tuya.com/cloud/  Далее авторизируемся.

После этого переходим во вкладку Cloud-> Development и делаем подписку “TRIAL EDITION”

На следующей вкладке выбираем:

Ну и потом:

Далее опять возвращаемся в CLOUD-> Development  и создадим новый проект нажав на кнопку Create Cloud Project. И там собственно заполним Project name, Industry, Development method и Availability Zone.

Следующее окно которое появится это Configuration Wizard. Здесь нам нужно выбрать пункт Device status Notification.

Это нужно для того, чтоб у Вас корректно работали устройства. Например, без этой функции у Вас при включении выключателя из Home Assistant ползунок включения будет обратно отскакивать показывая что устройство выключено, хотя оно включено. Это наглядно показываю во втором видео.

После этого у Нас создастся проект и выглядеть он будет примерно следующим образом:

Собственно здесь мы и берем Access ID и Access Secret – которые нам нужно ввести в окно авторизации в Home Assistant. Но перед этим нам нужно сделать еще одно. А именно перейти во вкладку Devices и там Link Tuya App Account и на кнопку Add APP Account.

И появится QR код который нужно отсканировать мобильным приложением Tuya Smart.

Сканнер QR кодов в мобильном приложении tuya smart выбирется в Профиль и нажимается на самый верхний значек:

Все, этим действием мы разрешаем зайти в аккаунт tuya нашему новому проекту. Тем самым разрешая зайти в наш аккаунт новой интеграции tuya которую мы сейчас настраиваем. Без этого действия нам не даст авторизироваться.

Ну и собственно теперь возвращаемся в Home Assistant и вводим всю недостающую информацию:

Все, если вы все поля ввели правильно, теперь интеграция подтянет все устройства которые у Вас были добавлены в Tuya Smart и они будут работать в Home Assistant.

Ниже я оставлю видео в котором эти все шаги выполняются, с небольшим отличием, когда я снимал видео, интеграция эта устанавливалась еще через HACS. А сейчас она устанавливается напрямую из стандартных интеграций. И пункт с Device status Notification. был еще опущен и не требовался. Но  к сожаления постоянно все меняется и актуализировать информацию очень сложно. По этому в конце статьи в итоге будет 2 видео которые если объеденить получится полная информация.

Первая часть:

Вторая часть:

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

Open

thecode opened this issue

Oct 13, 2022

· 124 comments

Open

ℹ️ Tuya integration not working

#80278

thecode opened this issue

Oct 13, 2022

· 124 comments

Assignees

@frenck

Comments

@thecode

frenck, macabrismix, pironic, Aerya, mdkendall, rvermill, gawdzilla-dev, snowypineapple, melbnz, WeldFire, and 43 more reacted with thumbs up emoji
handiman0 and jamieweavis reacted with laugh emoji
mzavaletavargas, ccozkan, muscaiu, yanayhollander, and jamieweavis reacted with hooray emoji
bdrewery, JeremyKennedy, rickycatto, chrisdothtml, jymbob, djjul, mattyteds, rolandas-valantinas, dahamsta, lillknurra, and 3 more reacted with heart emoji
ShadowJonathan reacted with eyes emoji

@home-assistant

@frenck
frenck

changed the title
Tuya integration not working

ℹ️ Tuya integration not working

Oct 13, 2022

@macabrismix

@scruysberghs

Just noticed my tuya iot subscription actually expired somewhere last april but everything worked fine. So the upgrade to 2022.10.3 somehow triggered the problem?
Getting the ‘code’: 2406, ‘msg’: ‘skill id invalid’ without changing anything today. Even added a device yesterday without problems…
Anyway, requested the 6 months extra trial…

@craigsad77

Yep upgrade broke my integration as well. Same error 2406. Iot subscription still valid.

@frenck

So the upgrade to 2022.10.3 somehow triggered the problem?

It is more likely the restart of Home Assistant during the upgrade triggered it (as you disconnect from the Tuya IoT cloud momentarily at that point).

@frenck

Yep upgrade broke my integration as well. Same error 2406. Iot subscription still valid.

Please contact Tuya IoT support in that case, by logging in to your Tuya IoT cloud account and submitting a request.

@luca-angemi

Yep upgrade broke my integration as well. Same error 2406. Iot subscription still valid.

Please contact Tuya IoT support in that case, by logging in to your Tuya IoT cloud account and submitting a request.

Do you know if switching to Local Tuya work around this issue?

@frontendbuddy

@luca-angemi I have one heater added to localtuya integration and I can see that it does work through it while the Tuya Cloud based integration does not.

@frontendbuddy

Guys, can you go to the API Explorer and try to use General Device Capabilities -> General Device Status -> Get the status of a single device with your device ID? The device ID itself you get from the list of the Devices in your project.

I am getting this message: "msg": "No permissions. Your subscription to cloud development plan has expired.",

I got the IoT Core and Cloud Develop Base Resource Trial extended to April 2023 few days ago. So this message above means that they do have an issue with extending these trials.

Does it look the same for you after applying for the trial period extension?

@thecode

Guys, can you go to the API Explorer and try to use General Device Capabilities -> General Device Status -> Get the status of a single device with your device ID? The device ID itself you get from the list of the Devices in your project.

I am getting this message: "msg": "No permissions. Your subscription to cloud development plan has expired.",

I got the IoT Core and Cloud Develop Base Resource Trial extended to April 2023 few days ago. So this message above means that they do have an issue with extending these trials.

Does it look the same for you after applying for the trial period extension?

Yes, they have a problem with the trial extension, contact support and they will fix it

@craigsad77

My API tests were successful. I’ll try delete the integration and re add.

@frenck

I’ll try delete the integration and re add.

That is unneeded. Just reload the integration (or restart HA).

@CrottyFr

@frenck

@applegeeks, I’ve hidden your comment. The reasoning is: No-one should even manually edit the registries. It can cause some serious issues, and therefore telling people to do that is harmful.

Anybody reading that, please take that into account.

@applegeeks

@frenck ack.
yes ofcourse. it definitely comes with disclaimer for advanced users only and making sure to take a backup prior (I always take a a ha backup + vm backup before any major changes).

Regardless, I have removed it for now to be safe :)

@meetheed

I’ve had this today. Turns out my trial expired 11 months ago so I’ve requested an extension. It’s been running that long with an expired trial no problem. This week I’ve been redoing a lot in home assistant and making a few changes such as adding ZigBee. It’s been rebooted 20 or more times in the last few days, Including being powered off for hours at a time while I moved it around and replaced my home router / network. It was fine last night and this morning. It is only after I installed the latest HA update this morning that the error started. something about that update caused the integration to realise the trial was over. It’s not linked to rebooting.

@thecode

I’ve had this today. Turns out my trial expired 11 months ago so I’ve requested an extension. It’s been running that long with an expired trial no problem. This week I’ve been redoing a lot in home assistant and making a few changes such as adding ZigBee. It’s been rebooted 20 or more times in the last few days, Including being powered off for hours at a time while I moved it around and replaced my home router / network. It was fine last night and this morning. It is only after I installed the latest HA update this morning that the error started. something about that update caused the integration to realise the trial was over. It’s not linked to rebooting.

I assume when people started contacting Tuya they found a bug in their account trial system and fixed it. I have looked at the code changes for the Tuya integration and it is very unlikely that they caused it to stop working.

You can downgrade your version from a backup and check that

@atv2016

Yeah i’m getting this since today.
config entry for tuya integration not ready yet: {‘code’: 2406, ‘msg’: ‘skill id invalid’, ‘success’: False, ‘t’: 1665698571055, ‘tid’: ‘c7cb98aa4b4211eda7a6d2b5cc5248de’}; Retrying in background

My authorisation was expired a long time ago, i renewed it now, let’s see if it works in the morning.

@Atako30

@thecode

@atv2016

Just tried, that fixed it.

@scruysberghs

as another datapoint.
This morning here everything Tuya works again in HA. The 2406 message on the tuya integration screen in Home assistant disappeared. My «IoT Core» subscription renewal status still is «Your application for extension is being reviewed.»
Did not unlink/re-link. Looks to me like it was a temp problem on Tuya’s end…

I did play around a little with Tuya’s API explorer last night and was able to control my devices that way at the time HA still had the error message. Maybe that triggered something?

@frenck

I did play around a little with Tuya’s API explorer last night and was able to control my devices that way at the time HA still had the error message.

You can always control via the API explorer, that is unrelated.

@ZeusFFWD

This worked for me instantly! Thank you!!

Happy to hear!! 🙌

@hendrikuit

Nothing of the above solutions worked for me so had to open a ticket. It got resolved within 2 days. Not sure what they did, they asked for a screenprint of the IoT Core subscription that was extended. After that they asked to check again and after a restart of HA the devices where back.

@DmitriyEsaulov

This comment was marked as off-topic.

@alex8654

My trial on tuya has been extended to 6 months, restarted HA and it is all back now.

@Ybalrid

Asking for an extended trial also fixed my devices/entities disappearing from my HA instance. It would be wonderful if there were a way to integrate with that service without creating a «trial» application on their IoT developer platform. But I understand the problem here.

Thankfully they do not seem to ask any questions about extending the trial, at least for now.

(Quite a bit ago, I bought several Wi-Fi devices that «just worked with Alexa,» and since they are still working, I have no pressing reason to replace them with non-cloud-based ones now that I know better and started building a ZigBee mesh)

@army92ita

La mia prova su tuya è stata estesa a 6 mesi, HA riavviato e ora è tutto tornato.
ok, but after 6 months? how do we do it??

@army92ita

ok, but after 6 months? how do we do it??
i really have so many devices, i don’t like to lose tuya.
I can’t even pay 25k dollars

@Ybalrid

ok, but after 6 months? how do we do it?? i really have so many devices, i don’t like to lose tuya. I can’t even pay 25k dollars

As far as I know, you just ask again. You say you only use it for Home Assistant, and they keep renewing it for free… (hopefully?)

The 25K fee is designed for their actual customers, which are big companies like Schneider or Philips that may integrate their IOT platform into their products…

@kevinmckeown

I’m a relatively new user to tuya / IoT Core. I signed up last month when I bought some bulbs and plugs, and have had them happily working in HA for the last month. Yesterday things started to go wrong, a plug didn’t turn on in one of the family runs when it should have. Bulbs and plugs still worked ok in Smart Life app, so I just got the usual eyes about dad automation.

Today following the advice above (thank you), I see an Expiration Date against IoT Core on the Tuya website (Cloud / IoT Core / My Subscriptions). That date is exactly one month after the Effective Date. I’ve applied for an extension.

For what its worth, no email from Tuya re: expiry.

From the HA point of view, could / should HA tuya integration raise an alert that all previously known devices have disappeared? (Maybe this is something that all integrations should be encouraged to do?)

Anything to avoid silent fails…?

@Gerrardoe

Anything to avoid silent fails…?

A month ago (2022-11-22), I was very excited to breath new life into some old wifi sockets (knightsbridge, efamily) by integrating them into HA through Smart Life (SL) android app, and the Tuya IOT cloud, where they have worked seamlessly in automations. Until yesterday, when I got an SL app upgrade through the play store and this seemed to have broken the integration somewhere. I could see the devices online on SL and IOT but they disappeared from HA. I deleted and reinstalled the Tuya integration but still not there.

So after a bit of googling I decided that maybe there might be some sort of month trial going on – although there is no obvious indication of this in the IOT platform. This Github link seemed to have a current solution. Tried unlinking and relinking the SL account first and — on scanning the QR code offered by IOT – I got a pop-up saying: “You are trying to link the “智能生活” App Account and subordinate devices with this project. Please select the device linking method and device permission to continue”.

智能生活 translates as “Smart Life”. So I decided it was safe even though its not my account name, accepted it and clicked through as per the link. Relinking didn’t work though, so I followed the github instructions fully and a few hours later got approved. As noted elsewhere, no notifications anywhere that this was about to happen or had happened, either in HA, or Tuya SL or IOT.

I have set a calendar for the next solstice to request an extension before it disappears. I will be wary of further SL app updates.

This was referenced

Dec 27, 2022

This was referenced

Jan 2, 2023

@issue-triage-workflows

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.

@ShadowJonathan

This has not been resolved

@Smartdrive78

As this integration does not get any attention from the dev and things are not getting fixed I started the process of moving everything to localtuya

The need to re-load the integration over the Easter weekend is in the high 50s

@applegeeks

Updated to the latest version Home Assistant 2023.4.5 and the issue still remains.

@mikegodin23

Hi.
I solved it with Unlink / Link procedure.
I also extended the trial period.

@army92ita

sort of solved.
you extended for then only 1 month only.
now I can change devices as soon as I can because tuya is too complicated

@jymbob

just requested another 6 month extension. Seems like a lot of hassle to go through just because I want to switch my heaters on and off based on presence. I’ve moved the devices to localtuya/tuyalocal but when I get any new ones my understanding is I’ll need to reauth to get their keys

Get the Reddit app

Scan this QR code to download the app now

Or check it out in the app stores

home assistant tuya not working
home assistant tuya not working

Sometimes, developing your own smart setup can be a bit confusing, and you will struggle to get a response from the devices as you go on adding more units.

This is especially true for owners that are not using any hubs or smart assistants to centralize the ecosystem.

If you’re in the same boat with the local system, we suggest that you reach out to local contractors.

They have comprehensive knowledge of how you can go about adding more devices and upgrading the lighting system.

The Tuya integration might be one of the most effective upgrades to your smart system, but it can be pretty hard to manage.

There is no deficiency of bugs and performance-related issues when it comes to this application, and you will deal with several situations where Home Assistant Tuya will not be working.

There are many issues that can cause this situation, and your best bet is to go through basic troubleshooting methods to get the device working again.

So, here are some methods that can help you better manage the smart system.

  1. Re-Authorize Device Status Notification

One of the main reasons behind Home Assistant Tuya not working is the device status notification features.

configure

Most users skip over this configuration, and you need to authorize the device status notification to get the Home Assistant Tuya working again.

It won’t take much of your time, and you just have to update status notifications accompanied by every action. When this feature is turned off, the smart controls will keep malfunctioning.

Even when all other features are working perfectly, the smart switches will immediately turn off after you try to engage them through the Tuya integration.

  1. Power Cycle Connected Plugs & Switches

power on

Sometimes, the issue is linked to the smart device and not the Tuya integration.

So, if you’re sure that you’ve installed the integration perfectly and there were no issues with the configurations, then simply power cycle the smart device.

It won’t reset any stored settings, and you will get the ideal performance from the smart system after power cycling the devices.

All you have to do is to remove the power from the device for around 30 seconds and connect it back after a few seconds.

  1. Restart Home Assistant

restart 1

Restarting the Home Assistant is another great method of eliminating the minor bugs with the devices not responding to your input.

If you’re sure that the status notifications are enabled, then proceed with restarting the Home Assistant service.

This won’t wipe any stored data, and once the Home Assistant is active, your integration will start working without further complications. 

  1. Check Router Connection

The router connection also has a huge role to play in this situation with Home Assistant Tuya not working.

restart router

From managing signal strength to verifying the channel bandwidth, you need to go over several configurations and refresh the network connection to get the Home Assistant Tuya working again.

Most owners pointed out that restarting the router and moving it closer to the smart devices is enough to get everything working again.

Similarly, you will also have to look at the interferences to further isolate the issue with the Home Assistant Tuya not working.

If there are just too many wireless units in your house, then purchasing an extension or removing some devices will serve you well.

All that you’re trying to do here is make sure that the wireless devices and accessories are able to communicate with the network and that there are no major issues with the system.

That should be more than enough to help you address the minor complications with the Home Assistant not working properly. So, find a better spot for your router and refresh the network connection.

Make sure to avoid resetting the router, as that will remove the network from all the smart devices, and you will have to set up the network connection in all devices from scratch.

  1. Update Tuya Integration

Usually, when owners run into issues with the Tuya integration, they are using an outdated version that has not been updated in a while.

Updates

So, you should put some focus on updating the Tuya integration to the latest version and then test out the response from the smart devices again.

The chances are that you won’t have to bother with the same errors, and the integration will start working without any issues.

Make sure to also seek guidance from the experts at the community forums. Asking others to help with the smart system will make it a lot easier to narrow down the problem.

Moreover, you won’t have to spend as much time finding a solution once the problem has been identified.

So, if you’re not sure about the actual issue behind Tuya not working, open up a support thread on the community forums.

  1. Reset Tuya Integration

reset

Lastly, resetting the Tuya integration should be your last move, as you will have to go through setup from the start.

So, if the issue is not fixed even after trying out all of the basic troubleshooting methods mentioned here, just reset the Tuya integration.

Make sure that you’re on the updated version before resetting the system, as that can save you a fair bit of time.

However, if you’re already on the updated version, then resetting the integration might be your best solution.

  1. Check Timing Configurations

One of the main things that might seem confusing to owners while working with the Tuya assistant is the timing configurations.

While it can feel pretty convenient to add more and more tasks to the day, the home assistant won’t work when the timing is overlapping for different devices. 

Creating more complex routines and adjustments for the smart system will only lead to more issues down the road.

So, instead of trying to further complicate the situation, you need to figure out the issue with the timing.

It will barely take a bit of effort on your end, and all that you’re trying to do here is to limit the errors to a few sections.

There is simply no point in trying to extend the routine, and clearing up the clutter maintained by the home assistant will do you much better in the long run. 

It all comes down to figuring out the best routine with overlap or time zone issues.

From there, you can test out the routine throughout the week and tweak it accordingly. Hopefully, you will not have to deal with more errors down the road.

  1. Seek Help From Other Owners

The community forums for the Tuya system are one of the best, and you will find countless owners support each other through minor configuration errors.

If you’re a first-time user, be sure to access the different threads left by other users as you try to set up your first unit.

It can be a while before you get an understanding of how to fix the system on your own.

You shouldn’t waste any more time guessing the issue, and opening up a support thread on the official forums will help you get specialized support in no time 

You will not have to pay a penny here, and these experts are always ready and willing to help new users.

Managing a Tuya smart assistant is not the easiest, and you will run into a lot more issues if you keep going on it on your own.

expert advice

All that you need to do is to type up a detailed description of the issue and then post that on the home assistant thread to get a response.

It will take a few hours at max, and several owners will help you figure out the situation. 

Once you’re sure about the exact issue, figuring out the fix is not that hard. So, your main focus should be on finding the cause of the errors.

That will save you from a lot of hassle in the long run as you try to adjust the home assistant installed in your house. 

Wrapping Up

Getting the Home Assistant Tuya system to work is not always easy, and you will have to struggle with a few features here and there as you try to adjust the system.

ask an expert

We suggest that you be a bit more proactive and avoid all of these issues by hiring an expert.

He will cost you a bit, but this minimal investment will save you a ton of hassle and hard work in the future.

So, try and avoid this time commitment by setting aside a few bucks for the purchase. You will surely thank arousal for this decision.

However, if you’re not that thrilled about hiring an expert, then you have the option of going through the basic troubleshooting methods and fixes mentioned here.

It all comes down to how you’re planning on addressing the situation.

Usually, the troubleshooting process will be fairly simple, and you can use the reset routine to address the major programming errors with the system.

From there, you will have to set up the integration from scratch, and that will be it when you’re struggling with the Tuya system. 

Понравилась статья? Поделить с друзьями:
  • Интернет выдает ошибку 651 что это такое
  • Интеграл вероятности и функция ошибок
  • Интернет выдает ошибку 403 что это
  • Инструменты человеческого фактора для предотвращения ошибок
  • Интернет включен а выдает ошибку