tuya / tuya-home-assistant

Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team.
MIT License
879 stars 207 forks source link

No devices detected when switched to the official integration #530

Closed strasharo closed 3 years ago

strasharo commented 3 years ago

Describe the bug Removed the integration from HACS and unconfigured it and replaced it with the official one. No devices were detected there.

Expected behavior I should be able to use the devices which were present in the HACS version of the integration.

Screenshots image

Home Assistant Version core-2021.10.0

Device info (please complete the following information, which can be found in log): Two mcs door switches.

Additional context Add any other context or logs about the problem here. In the official version there's no choice to pick which app was used to set the devices, I suspect it might be picking Smart life instead of Tuya.

jasonmadigan commented 3 years ago

Seeing the same issue, although I previously didn't use the older HACS addon.

stanogustafik commented 3 years ago

The same issue... after setting up tuya iot cloud.. and installing HACS integration Tuya v2.. and reinstalling Tuya integration... no previously working devices are discovered..

Arakon commented 3 years ago

Same, 6 devices (Tuya socket, zigbee socket, 2 zigbee thermostats, tuya ceiling light and the zigbee hub) are not discovered when switching to this integration. Downgrading to Core 2021.9.7 and reverting to the old addon makes the lights and sockets reappear. All devices are listed in the smart life app and the cloud entries on the tuya site.

strasharo commented 3 years ago

I confirm that reverting to core-2021.9.7 and using the old V2 integration resolved the issue for me the same way as it did for @Arakon : image

Zettaga commented 3 years ago

I'm also suffering from this issue, none of my dimmer switches are listed.

Rayeliint commented 3 years ago

I too have difficulties, have gone from 39 devices down to 33 after upgrading. Also changed all the entities ID

Quato38 commented 3 years ago

no devices discoverd

rkeyzer9 commented 3 years ago

Also having the same problem, not all devices are discovered, i live in the Netherlands, but my integration on IOT tuya shows the devices 7 pieces in Central Europian. My app stands on Netherlands.

In the app i see 7 devices and in HA i see 5 devices both the same devices with id NHWZ-104 通断器双模--二次升级版 won't work.

yannpub commented 3 years ago

I also removed the former Tuya integration before upgrading to 2021.10 and adding the new Tuya Integration. My device is recognised in the Tuya iOT platform, and is attached to Central European Server (I would have supposed it to be attached to Western European, as my current country is France). In HA, no device seems to be detected. There is no log entry which could point out any issue.

jypsie commented 3 years ago

Same here. no devices at all..... deleted and reinstalled Tuya integration..... nothing.... I should stay away from this Tuya stuff.....

djk314 commented 3 years ago

Same here but i can't login into Developpers console, it's busy and my log say :

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/tuya/init.py", line 59, in async_setup_entry success = await _init_tuya_sdk(hass, entry) File "/usr/src/homeassistant/homeassistant/components/tuya/init.py", line 71, in _init_tuya_sdk auth_type = AuthType(entry.data[CONF_AUTH_TYPE]) KeyError: 'auth_type'

djk314 commented 3 years ago

I think it need to remove and reconfigure new Tuya integration like here https://www.home-assistant.io/integrations/tuya/ , i reverted back to 9.7 i will try tomorrow.

Arakon commented 3 years ago

I just found out that just cause the devices are listed on the cloud page does NOT neccessarily mean that the correct region is used for the cloud setup. My devices show under "Central Europe", but Tuya v2 only sees them when I set it to "Western Europe".

strasharo commented 3 years ago

@Arakon did you manage to see them using 2021.10 or only with 2021.9.7 and the HACS version of the integration so far?

jypsie commented 3 years ago

I just found out that just cause the devices are listed on the cloud page does NOT neccessarily mean that the correct region is used for the cloud setup. My devices show under "Central Europe", but Tuya v2 only sees them when I set it to "Western Europe".

Yep! I had selected western Europe (which should have been correct) but they indeed showed up under central europe..... does not give me a secure feeling......

Got the devices in Home assistant now (well part of them), but reaction time is very bad to horribly bad..... Previous version was way better.....

Time to let Tuya go..... Simple Zigbee works WAY better, don't need that chines cloud stuff anymore.

Taylorp913 commented 3 years ago

I am in the US and was using the old integration successfully before switching today. I played with the tuya developer platform a lot and it looks like something is broken in when linking a tuya app to the project. Part of creating the developer project is making a user, but it says the user has no access to any assets unless you add them. I linked my Tuya app and can see a list of devices on the devices tab, but the assets tab is empty. I made a virtual device in my assets tree and it showed up in home assistant. I am convinced that if I could get the devices on the devices tab to appear in the assets tab the link would be made to home assistant, but right now there does not seem to be a way.

Arakon commented 3 years ago

I am in the US and was using the old integration successfully before switching today. I played with the tuya developer platform a lot and it looks like something is broken in when linking a tuya app to the project. Part of creating the developer project is making a user, but it says the user has no access to any assets unless you add them. I linked my Tuya app and can see a list of devices on the devices tab, but the assets tab is empty. I made a virtual device in my assets tree and it showed up in home assistant. I am convinced that if I could get the devices on the devices tab to appear in the assets tab the link would be made to home assistant, but right now there does not seem to be a way.

Don't add a new user, use your app login and pass after linking the tuya app. The login/pass to the website does not work.

gabry1609 commented 3 years ago

Same issue here. Before upgrading to the newer official integration, I used to have the Tuya V2 component running under HACS and it worked pretty well, apart for the big latency of the motion sensors (approx 4 seconds to detect and send back the status to HomeAssistant). Now I have the new Tuya component installed and correctly configured but no devices or entities are being discovered. I tried everything (switching server on the IOT Platform, rebooting many times my HomeAssistant, checking everywhere) but had no luck. Please fix this ASAP because I really need all my devices back :(

saneone commented 3 years ago

Guys you need to add authorizations in IOT Platform... Only then devices will be seen by HA.

gabry1609 commented 3 years ago

Guys you need to add authorizations in IOT Platform... Only then devices will be seen by HA.

Hi :) can you explain a little bit better? Thanks!

Brouwertje commented 3 years ago

I can see my lights, but my alarm system is not showing up. It was before.

stanogustafik commented 3 years ago

Guys you need to add authorizations in IOT Platform... Only then devices will be seen by HA.

Of course I have added authorizations in IOT platform, but integration recognizes only one of my two tuya devices - 1ch switch. The second one - 2ch switch - just not found. :( On Tuya IOT platform there are both devices recognized and both shown as "online".

Brouwertje commented 3 years ago

Guys you need to add authorizations in IOT Platform... Only then devices will be seen by HA.

Of course I have added authorizations in IOT platform, but integration recognizes only one of my two tuya devices - 1ch switch. The second one - 2ch switch - just not found. :( On Tuya IOT platform there are both devices recognized and both shown as "online".

Exactly what I was thinking. Tuya definitely made some changes. Two days ago every scene I created in the Tuya app showed up in HA after a restart. Now zero. Hope they will fix it asap.

gabry1609 commented 3 years ago

Guys you need to add authorizations in IOT Platform... Only then devices will be seen by HA.

Of course I have added authorizations in IOT platform, but integration recognizes only one of my two tuya devices - 1ch switch. The second one - 2ch switch - just not found. :( On Tuya IOT platform there are both devices recognized and both shown as "online".

Same here. My IOT already had that authorization but I still can't see any of my devices. Hope for a quick fix...

tomaszekn commented 3 years ago

Same in my HA. Tuya integration added to Home Assistant but without devices/entities. From the project on iot.tuya.com all devices are visible and active. No errors in log files.

andrewdp69 commented 3 years ago

Mine is the same - it pulls down the Tuya Scenes where i can close ALL blinds but doesn't bring the devices/entities...

tke233 commented 3 years ago

I am in Ohio or Eastern Ohio Data Center but nothing was showing, switched to Western America Data Center and now I see my 4 devices listed on the lot.tuya.com site but I still couldn't get past the Tuya Integration Login Screen. In iot.tuya.com I selected the Western America where I can see my devices and I selected "Users" I created an account and now I can get past the Tuya Integration Setup screen in HA but still no devices listed for this integration.

Resolved in 2021.11 - MANY THANKS for the hard work on making the ecosystem better and better!!

alexebner commented 3 years ago

I have installed Tuya first time but also can't seen any devices.

kintaroju commented 3 years ago

I too have the same similar problem. I have these light switches that was the most recent addition to my Tuya collection and they don't show up in HA using the new Tuya integration.

https://community.home-assistant.io/t/tuya-integration-issue-since-2021-10-new-version/345200

I have 27 devices, light bulbs, switches and dimmer switches. The only 3 that failed to show up in the new integration was my new dimmer light switches. I know for a fact the original integration worked like a charm and showed all 27 devices instead of 24 with the new integration.

I think the new Tuya integration needs a bit more polishing.

tomaszekn commented 3 years ago

Same in my HA. Tuya integration added to Home Assistant but without devices/entities. From the project on iot.tuya.com all devices are visible and active. No errors in log files.

I've just added 4 API's to the project on iot.tuya.com ("Smart Home Devices Management", "Authorization", "General Equipment Management", "Device Log Query") and my integration is working now (with all devices and entities). I don't know which of added API's has fixed the problem but I have no time to check it now :-) If somebody recognizes the proper one - please report.

mkono87 commented 3 years ago

Same in my HA. Tuya integration added to Home Assistant but without devices/entities. From the project on iot.tuya.com all devices are visible and active. No errors in log files.

I've just added 4 API's to the project on iot.tuya.com ("Smart Home Devices Management", "Authorization", "General Equipment Management", "Device Log Query") and my integration is working now (with all devices and entities). I don't know which of added API's has fixed the problem but I have no time to check it now :-) If somebody recognizes the proper one - please report.

The only one I didnt have was Device Log Query but did fix the issue. Do you have any dimmer switches?

Zettaga commented 3 years ago

Same in my HA. Tuya integration added to Home Assistant but without devices/entities. From the project on iot.tuya.com all devices are visible and active. No errors in log files.

I've just added 4 API's to the project on iot.tuya.com ("Smart Home Devices Management", "Authorization", "General Equipment Management", "Device Log Query") and my integration is working now (with all devices and entities). I don't know which of added API's has fixed the problem but I have no time to check it now :-) If somebody recognizes the proper one - please report.

The only one I didnt have was Device Log Query but did fix the issue. Do you have any dimmer switches?

My only tuya devices are dimmer switches, and this API trick did not work for me.

balronu commented 3 years ago

I have created a new project. I've been seeing my devices ever since. I can also switch it on, but Tuya does not reply that the device is switched on. With that I can no longer turn it off. Are all sockets.

kintaroju commented 3 years ago

Same in my HA. Tuya integration added to Home Assistant but without devices/entities. From the project on iot.tuya.com all devices are visible and active. No errors in log files.

I've just added 4 API's to the project on iot.tuya.com ("Smart Home Devices Management", "Authorization", "General Equipment Management", "Device Log Query") and my integration is working now (with all devices and entities). I don't know which of added API's has fixed the problem but I have no time to check it now :-) If somebody recognizes the proper one - please report.

The only one I didnt have was Device Log Query but did fix the issue. Do you have any dimmer switches?

My only tuya devices are dimmer switches, and this API trick did not work for me.

I think we need to seperate the issue with HA with Tuya v2 integration and Tuya IoT Cloud. From Tuya IoT cloud i know all my 27 devices are visible, it's HA with Tuya v2 integration that doesn't see all 27 of my devices, it only shows my 24 devices, 3 of the devices it doesn't detect is all my dimmer switches (3 of them).

So the big question, who's the team that maintains the Tuya v2 integration with HA, cause I remember seeing a mention on the 2021.10.x release notes that Tuya is the one that now maintains it, but no one seems to have taken any ownership of the issue?

If it is Tuya, is someone from Tuya can help us point to how to debug this issue if it is a permissions issue or something silly that would be greatly appreciated.

musicatwrk commented 3 years ago

Seeing this issue as well, 4/5 devices imported, but the newest one in tuya is not imported.

strasharo commented 3 years ago

So according to @zlinoliver the sensor platform is not supported in Tuya integration(core-2021.10.0) yet https://github.com/home-assistant/core/issues/57251#issuecomment-939391002

Guess we'll have to stick with core-2021.9.7 for now.

tomaszekn commented 3 years ago

Same in my HA. Tuya integration added to Home Assistant but without devices/entities. From the project on iot.tuya.com all devices are visible and active. No errors in log files.

I've just added 4 API's to the project on iot.tuya.com ("Smart Home Devices Management", "Authorization", "General Equipment Management", "Device Log Query") and my integration is working now (with all devices and entities). I don't know which of added API's has fixed the problem but I have no time to check it now :-) If somebody recognizes the proper one - please report.

The only one I didnt have was Device Log Query but did fix the issue. Do you have any dimmer switches?

No, I don't.

jypsie commented 3 years ago

After messing around for several days I got 3/4 of the device in HA

It was really messing around, instructions are far from clear and complete and this is certainly too complicated 3/4 is not enough (why going to v2?) and then they do not run reliable (very slow or partially or button that toggles back or .... and what will it be tomorrow?) SO: Not stable and too complicated. This should be rolled back and released if it is mature to be released. I go with localTuya for now..... and will wait for V3

odolphie commented 3 years ago

I finally managed to get this working after having the same issue. I'm UK but devices in Tuya are Central Europe as well. That doesn't seem to be related to the issue.

The way I got mine working was, for each of the services in Services API, I went to View Details and checked the Authorised Projects included the Cloud project I added.

Cloud>Development>Select Project>Service API tab. On each of the services, View Details>Authorized Project>Add Authorization.

Some APIs I had to subscribe too (free). Reloaded the integration in HA and they're all working. Lights, switches and a diffuser.

kintaroju commented 3 years ago

@odolphie I checked my Services API authorizations for account, and all of them are still authorized. So I believe the dimmer switches are still the only things that aren't properly setup by Tuya at the moment (although there are probably other Tuya Devices that aren't working) from what I gather.

kintaroju commented 3 years ago

Just for the sake of things, I've submitted a ticket with the Tuya IoT site and see if they can shed any light on our issue

andrewdp69 commented 3 years ago

So now i have lost the scenes with Tuya, now my blinds don't shut unless i do it via the tuya app...

Any automations based on the entities don't work and after it pulled scenes down originally I managed to change the automations and I could use them in an automation to close them on sunset and open them on sunrise but now that doesn't work as the scenes have also disappeared from Tuya.

How do we get this to work and allow the entities to be shown or do we roll back HA?

Docas09 commented 3 years ago

With TUYA v2 I had all the door sensors and motion sensors, with this official integration everything disappeared, only the switches remain. There are only 32 sensors... All devices are there in the IoT, but they don't pass the sensors to the Home Assistant It's too early to install, I had to go back to TUYA v2

Brouwertje commented 3 years ago

So now i have lost the scenes with Tuya, now my blinds don't shut unless i do it via the tuya app...

Any automations based on the entities don't work and after it pulled scenes down originally I managed to change the automations and I could use them in an automation to close them on sunset and open them on sunrise but now that doesn't work as the scenes have also disappeared from Tuya.

How do we get this to work and allow the entities to be shown or do we roll back HA?

I had the same, but fixed.

Make sure you do step 6 right. You also need to do ''In Configuration Wizard, make sure you add Device Status Notification'' This wasn't necessary for older tuya integration, but for the new one it is! After I setup a new cloud project and added this api in the wizard scenes were back. https://www.home-assistant.io/integrations/tuya/ step 6

kintaroju commented 3 years ago

Hi All,

Surprisingly Tuya support replied to me with an answer about the integration, below is the link for supported devices on the current integration:

https://github.com/tuya/tuya-home-assistant/wiki/Supported-Device-Category?_source=f5f782752be3c4a9157ec47514d6091b

I am now waiting to see if they plan to add more devices in the future.

kintaroju commented 3 years ago

well just got a reply from tuya support, basically SOL for now unfortunately. They said they don't have an ETA when they will bring more stuff on. So the question, how do we get the people that manage HA to revert the integration or give us a 2nd option to choose which integration now? lol

kintaroju commented 3 years ago

Well I've been watching the device release like a hawk, and on the 2021.11 release they plan to add a few more devices:

https://github.com/tuya/tuya-home-assistant/wiki/Supported-Device-Category?_source=f5f782752be3c4a9157ec47514d6091b

Unfortunately dimmer switches are not on that list yet.

frenck commented 3 years ago

Unfortunately dimmer switches are not on that list yet.

Their listing is incomplete. I've added dimmer switches support.

kintaroju commented 3 years ago

Unfortunately dimmer switches are not on that list yet.

Their listing is incomplete. I've added dimmer switches support.

@frenck is dimmer switch support in 2021.11 then? I just refreshed the page and didn't see it in the list

frenck commented 3 years ago

@kintaroju As I said, yes, I've added dimmer switch support myself.