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
72.67k stars 30.42k forks source link

Tuya integration doesn't work after end and renewal of tuya iot dev access #79746

Closed kkarolkiewicz closed 2 years ago

kkarolkiewicz commented 2 years ago

The problem

Tuya integration and devices doesn't work after trial period ended and i renwed it.

All devices are unavailable. reloading integration doesn't work.

I have something like this in log: "Logger: tuya_iot Source: /usr/local/lib/python3.10/site-packages/tuya_iot/openmq.py:166 First occurred: 18:41:35 (1 occurrences) Last logged: 18:41:35

error while get mqtt config"

What version of Home Assistant Core has the issue?

Home Assistant 2022.9.7

What was the last working version of Home Assistant Core?

2022.9.7

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

config_entry-tuya-a4b9c06668e1174c83279af90589958f.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: tuya_iot
Source: /usr/local/lib/python3.10/site-packages/tuya_iot/openmq.py:166
First occurred: 18:41:35 (1 occurrences)
Last logged: 18:41:35

error while get mqtt config

Additional information

No response

homeassistant commented 2 years 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! (message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

Sprundel67 commented 2 years ago

I have the same problem, devices are visible in Tuya development on site but not in Home assistant. I use Calex Lights and power sockets via Tuya in Home assistant. I tried to upgrade but doesnt help started in version 2022.9.7 now on 2022.10.1 without tuya devices.

TomSmartThings commented 2 years ago

Same issue for me. All devices fine (Aoycocr wifi plugs) were intergrated fine with HA through the Tuya integration, however they now no longer show under devices/entities in HA. In Tuya Developer I have renewed the IOT Core access and relevant API's are showing as in service. All devices are also showing in Tuya developer and the SmartLife app and are controllable through that.

MartinPalasek commented 2 years ago

I have the same problem after my one month Tuya Iot license expired. After extending the expiry time by 6 months it still does not work. There are no visible devices in HA.

kkarolkiewicz commented 2 years ago

I also posted on tuya support page. Tuya engineer responded today to try again and now everything is working fine. SO it was on Tuya side in my case. If everyone else have the same situation i will close ticket

MartinPalasek commented 2 years ago

Still not working:

Logger: tuya_iot Source: /usr/local/lib/python3.10/site-packages/tuya_iot/openmq.py:166 First occurred: 13:26:12 (1 occurrences) Last logged: 13:26:12 error while get mqtt config

Local Tuya: Failed to retrieve device list. Error 28841002: No permissions. Your subscription to cloud development plan has expired.

kkarolkiewicz commented 2 years ago

Still not working:

Logger: tuya_iot Source: /usr/local/lib/python3.10/site-packages/tuya_iot/openmq.py:166 First occurred: 13:26:12 (1 occurrences) Last logged: 13:26:12 error while get mqtt config

Local Tuya: Failed to retrieve device list. Error 28841002: No permissions. Your subscription to cloud development plan has expired.

Did you restarted ha? Maybe You should post on tuya support page?

MartinPalasek commented 2 years ago

Yes, I have rebooted many times this week. I think the problem is on Tuya IoT side. I can see the device in Tuya IoT but not in HA. I wanted to try Local Tuya but that doesn't work either.

kkarolkiewicz commented 2 years ago

So maybe you should create ticket here as i do: https://service.console.tuya.com/8/3/list?source=support_center

cronos123 commented 2 years ago

I have the same problem, devices are visible in Tuya development on site but not in Home Assistant.

LOG: 2022-10-09 19:26:40.377 ERROR (Thread-2) [tuya_iot] error while get mqtt config 2022-10-09 19:26:40.405 ERROR (Thread-2) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/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'

Home Assistant 2022.10.1 Supervisor 2022.09.1 Operating System 9.0 Frontend 20221006.0 - latest

MartinPalasek commented 2 years ago

The integration started working without any change. I just reloaded the Tuya integration and rebooted.

simon96aic commented 2 years ago

Did HA need the "IoT Core"-API? When I debug (turn on/off) the device on the Tuya IOT page, it also tells me that this is not possible because the IOT core subscription for it has expired. Because since this expired, no device is displayed. The IOT Core API is not free and I can't activate the trial again either.

Any solutions?

m90att commented 2 years ago

Hi, same issue for me although my api authorisation has not expired/been renewed. Everything is configured correctly and all is showing as in service in the tuya platform console. This is the only tuya related log entry.

Logger: tuya_iot
Source: /usr/local/lib/python3.10/site-packages/tuya_iot/openmq.py:166
First occurred: 07:43:44 (1 occurrences)
Last logged: 07:43:44

error while get mqtt config
Bloxy-smb commented 2 years ago

No longer works. Core API expired trial. But you can subscribe for only $25k!!!!

Needs an integration that connects directly to devices without using the dodgy Chinese cloud service.

frenck commented 2 years ago

AttributeError: 'NoneType' object has no attribute 'expire_time'

error while get mqtt config

Those two generally indicate your trails subscription is expired, you need to extend it OR it means Tuya is having an issue with their cloud/API services.

If your trail subscription isn't expired, it probably is the latter (which also makes sense considering the number of reports rolling in all of a sudden).

Core API expired trial.

You can extend your trails for private use in six months increments.

kkarolkiewicz commented 2 years ago

Did HA need the "IoT Core"-API? When I debug (turn on/off) the device on the Tuya IOT page, it also tells me that this is not possible because the IOT core subscription for it has expired. Because since this expired, no device is displayed. The IOT Core API is not free and I can't activate the trial again either.

Any solutions?

There should be button to renew trial. And short form to fill

kkarolkiewicz commented 2 years ago

No longer works. Core API expired trial. But you can subscribe for only $25k!!!!

Needs an integration that connects directly to devices without using the dodgy Chinese cloud service.

You can renew trial for free. Paid model is for companies

dorr14 commented 2 years ago

My IoT sub had expired which I have now resolved but I still don't have any devices or entities on HA, anyone any idea? Everything is correct on the IoT platform as far as I can see.

Sprundel67 commented 2 years ago

Please ask Tuya support for help, I did, and it was solved in 1 day.

dorr14 commented 2 years ago

Please ask Tuya support for help, I did, and it was solved in 1 day.

I have left the ticket with them but they are taking quite a while. Sure it won't be long now. When I debug the device on IoT platform the message says the subscription has expired so I'm assuming they have maybe missed something on the renewal.

Electronlibre2012 commented 2 years ago

Hello,

any news on this problem please?

Yesterday i ask for IOT Core renewal free for 6 month, i ask gently and say that i dont want to paid 5000$ a year for 2 devices and they accepted! i am now good to april 2023 but still no luck it doesnt show the 2 devices in HA...

thanks

Swebi commented 2 years ago

I have the same problem. After my trial ended all my devices are gone in home assistant. I also renewed the trial for 6 months and still no change

itskingjoshy commented 2 years ago

I have the same thing. I also renewed for 6 Months and they are not appearing in my Home Assistant as well. The worse thing is I have 10+ Devices on my tuya account.

dorr14 commented 2 years ago

They have renewed mine but the Core IoT in the renewal section still shows are expired and when you run the debug it shows as expired also so I have contacted them. I assume someone has not ticked the right box on their end.

Vinceman74 commented 2 years ago

Same issue Tuya doesn't work till last updated

fdirson-OpenGateway commented 2 years ago

To renew your IOT Core services: https://developer.tuya.com/en/docs/iot/Home-assistant-tuya-intergration?id=Kb0eqjig0utdd See the section "Will I be billed after the free trial of the API service expires?" You must wait one day for your service to be reactivated

Electronlibre2012 commented 2 years ago

Hello

already do the iot core renewal 2 days ago and nope , it still doesnt work...i mean i wait 2 days and integration in ha give no more entities

dorr14 commented 2 years ago

Hi Guys. Managed to resolve this by raising a ticket with Tuya. They fixed it overnight so issue is on there end with the renewal.

Vinceman74 commented 2 years ago

I fixed this by changing my allowed IP address in Tuya IOT plateform. Because I recently changed of internet provider, my IP address changed

ecentinela commented 2 years ago

Hello

already do the iot core renewal 2 days ago and nope , it still doesnt work...i mean i wait 2 days and integration in ha give no more entities

What you requested them? Mine is renewed but still not working...

Electronlibre2012 commented 2 years ago

same as you lol : still not working : i ask for IOT Core renewal of 6 month. It take more than 1 day to be renewed, then it appear now in green "subscribed" but when i add the Tuya integration i have no more entities.

I even make a new project, link to my Tuya Smart APP on Android and integrate in HA, still no entities.

But as @dorr14 said : issue is on there end with the renewal.

Perhaps we have to wait a few days and they will fix the renewal problem?

ecentinela commented 2 years ago

Could be. I raised a ticket a few minutes ago and they just answered me with a "please check it tomorrow"...

So, let's wait and cross your fingers XD

dorr14 commented 2 years ago

They make the change manually but it does take time to take effect. Sorted now so there is hope!

ghost commented 2 years ago

Hi guys and girls, Same problem with no entities after iOT Core renewal during one day or two. Problem solved after restarting my pi4 following an update...

Swebi commented 2 years ago

Renewed my IOT Core and waited a day. Restarted my VM and all my devices are back now

Electronlibre2012 commented 2 years ago

Restart HA or Supervisor or total reboot doesn work for me, i have open a ticket in Tuya Iot Platform, so perhaps they will have a look if we are a lot that deal with this problem, like @ecentinela @dorr14

EDIT : i try to debug devices and i have this message "This feature requires theIoT Core Serviceto be subscribed and authorized to this project. Go to IoT Core Service" and i cant debug anything...sure there is a problem with the renewal...

ok i found the problem seems to be a renewal bug : Tuya Iot Core

there is no project Authorize there... but under Iot Core when i click "Add" its already ok.... : IoT Core page

IoT Core API AUthorisation page

Electronlibre2012 commented 2 years ago

OK! found the solution : you have to revoke Authorization for IoT Core Service. Then you Authozize again your project in the IoT Core service...LoooL

Devices and Entites are back in HA when redo the Tuya Integration!!!!!!!!!!!!!! 😉

ecentinela commented 2 years ago

OK! found the solution : you have to revoke Authorization for IoT Core Service. Then you Authozize again your project in the IoT Core service...LoooL

Devices and Entites are back in HA when redo the Tuya Integration!!!!!!!!!!!!!! 😉

Works for me too! Thank you!

m90att commented 2 years ago
Yep, me too.  Thank you very much. From: OliSent: 12 October 2022 14:45To: home-assistant/coreCc: m90att; CommentSubject: Re: [home-assistant/core] Tuya integration doesn't work after end and renewal of tuya iot dev access (Issue #79746) Restart HA or Supervisor or total reboot doesn work for me, i have open a ticket in Tuya Iot Platform, so perhaps they will have a look if we are a lot that deal with this problem, like @ecentinela @dorr14—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***> 
superture commented 2 years ago

OK! found the solution : you have to revoke Authorization for IoT Core Service. Then you Authozize again your project in the IoT Core service...LoooL Devices and Entites are back in HA when redo the Tuya Integration!!!!!!!!!!!!!! 😉

Works for me too! Thank you!

Do you have to remove integration in HA and then re-add? YES

Edit: used the wrong passw, tried with password för clouduser but should be passw for app. Works fine now

m90att commented 2 years ago

I did

On Thu, 13 Oct 2022, 09:56 superture, @.***> wrote:

OK! found the solution : you have to revoke Authorization for IoT Core Service. Then you Authozize again your project in the IoT Core service...LoooL Devices and Entites are back in HA when redo the Tuya Integration!!!!!!!!!!!!!! 😉

Works for me too! Thank you!

Do you have to remove integration in HA and then re-add?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/79746#issuecomment-1277270243, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP4WKLUV32MPC7G3HNR4LLWC7FD3ANCNFSM6AAAAAAQ62NKUI . You are receiving this because you commented.Message ID: @.***>

Electronlibre2012 commented 2 years ago

yes me too : like i said already in my solution : Devices and Entites are back in HA when redo the Tuya Integration!!!

arjanhs commented 2 years ago

Tried that to but didn't work for me, getting the following message: Config entry '' for tuya integration not ready yet: {'code': 2406, 'msg': 'skill id invalid', 'success': False, 't': 1665651540124, 'tid': '472e8bbf4ad511edb89dca0f69d78a9e'}; Retrying in background Did a restore to core_2022.10.2 but didn't work either

imist commented 2 years ago

Tried that to but didn't work for me, getting the following message: Config entry '' for tuya integration not ready yet: {'code': 2406, 'msg': 'skill id invalid', 'success': False, 't': 1665651540124, 'tid': '472e8bbf4ad511edb89dca0f69d78a9e'}; Retrying in background Did a restore to core_2022.10.2 but didn't work either

I too got the same code 2406 error at 9:49 Central European Time today causing the Tuya integration to not load and all Tuya devices unavailable in HA. Running HA 2022.10.3. Tuya devices works fine in Tuya Mobile App. Are there problems with Tuya Cloud Services?

superture commented 2 years ago

Dunno if interesting but I have the same tuya integration in two different homeassistant servers and after revoking access and readding and then readd integration in the first ha server the other ha server tuya starting working without readding integration

imist commented 2 years ago

See https://github.com/home-assistant/core/issues/80252#issuecomment-1277637495 for error code 2406 problem.

arjanhs commented 2 years ago

That did the trick indeed, thanks @imist

frenck commented 2 years ago

Alright, closing the issue on this end, as this is not an Home Assistant issue. Please be sure to contact/send Tuya support an message about the problems you are experiencing.

../Frenck