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
857 stars 206 forks source link

Slow response between Homeassitent and Devices #704

Open 4411nash opened 2 years ago

4411nash commented 2 years ago

Describe the bug When clicking a button in HA it takes multiple seconds before a device is responding. Buttons in HA switching by its self to on en off state by it self.

Expected behavior When trigger a button a light goś on direct. The button in in HA stayes on.

Screenshots

Home Assistant Version My normal system:

System Health

version core-2021.11.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.17-v8
arch aarch64
timezone Etc/GMT
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 5000 Installed Version | 1.17.2 Stage | running Available Repositories | 912 Installed Repositories | 10
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | pending
Home Assistant Supervisor host_os | Home Assistant OS 6.6 -- | -- update_channel | stable supervisor_version | supervisor-2021.10.8 docker_version | 20.10.8 disk_total | 58.0 GB disk_used | 6.2 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Duck DNS (1.14.0), File editor (5.3.3), Let's Encrypt (4.11.0), Mosquitto broker (6.0.1), Samba share (9.5.1), Terminal & SSH (9.2.1)
Lovelace dashboards | 5 -- | -- resources | 1 views | 21 mode | storage

And a clean install only with Tuya V2

System Health

version core-2021.11.4
installation_type Home Assistant Core
dev false
hassio false
docker false
user homeassistant
virtualenv true
python_version 3.9.8
os_name FreeBSD
os_version 12.2-RELEASE-p10
arch amd64
timezone Europe/Amsterdam
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Lovelace dashboards | 1 -- | -- resources | 0 mode | auto-gen

Device info (please complete the following information, which can be found in log): like this: 2021-11-18 10:17:49 WARNING (MainThread) [haffmpeg.tools] Timeout reading image.

This is all in the log from the clean system.

Additional context Add any other context or logs about the problem here.

mohsenheravi commented 2 years ago

Can we calm this down please.

Good idea. Sorry, just a bit upset since the misus is looking at me like I am a big fat idiot (well, at least half of that is true...).

steve1011011 commented 2 years ago

You know what you are getting into with Cloud based Home Automation. A company could go bust, they could change an API ( look at what happened with the Nest Dev API when it moved to Google )

That is my whole point! I didn't go after small companies for exactly the same reason. Tuya is a big big, big big big company now. Same for Smartthings, or Apple Home. If you can't trust even these companies, we'd be better off without IoT. I can't buy six cars from six different companies just because five of them might not start in the morning. What's next? 10 TVs, 6 coffee makers, 7 fridges, ...? I would just take the short cut and die in vain personally instead telling my wife that we need 10 different systems in the house to make it work. If they sell a service, directly or indirectly, it MUST work.

My point isn't with the company and how big they are. Its whether their integration with home assistant is supported or not. The good thing here is Tuya are working with HA, so that is good, and gives some degree of confidence in the future proof of devices you buy. Especially good if Local Tuya gets support as well.

As mentioned, dev are engaged and say its being looked into, so hopefully they will fix it. You might want to look into what workarounds you can have at hand for your "mission critical" devices, for the next time this happens, or if you have a catastrophic HA upgrade issue etc.....

I'm always thinking about my cloud based 3rd Party integrations failing ( which they will, one day ) and working ( when I have time ) towards making them less cloud dependant.

aidbish commented 2 years ago

I pay a Nabu Casa subscription.....I would very much support the Home Assistant Dev if they chose to implement a guaranteed service to the Tuya IOT platform for those subscribers . Who knows..... maybe that is the way it is headed? Its is certainly something I would consider if I was in this business as it would be beneficial to Tuya and Nabu Casa.

i pay a nabucasa subscription and i would NOT want any of it going to support the Tuya integration

aidbish commented 2 years ago

You are getting a free service here

I do apologise. I didn't realise Tuya is a charity service. All those good people working in China so that the mankind can flourish and prosper. I on the other hand, am a cheap selfish jerk who has spent just a few hundred dollars on devices that are supposed to be compatible with my system but are useless now, and for some strange reason I expect them to work. I also understand that I am an ungrateful vicious person that expects a system like Home Assitant work just because I have spent a couple of hundreds of hours to learn and implement the system tha has promised to work as a reliable IoT control system. So while people can complain if Instagram (also a free service) goes down for one hour and they can't receive 'likes' on their profile in that one hour, I should just shut up despite the fact that I had to replace the ligths and switches and revert back my garage door to manual in my home since the 'free' system is not working anymore! Nice.

The HA integration is free and nothing to do with you paid for the device and expecting it to work, if it works in their app then your getting what you paid for.

mohsenheravi commented 2 years ago

I do not agree with you. But I agreed to stop this argument, hence let’s leave it at this.

elyobelyob commented 2 years ago

I'm interested to see when the next launch event is, and the number of people constantly asking what is happening and why everyone from both the sides have been so quiet on the subject despite ongoing for weeks.

On Fri, 26 Nov 2021 at 22:19, mohsenheravi @.***> wrote:

I do not agree with you. But I agreed to stop this argument, hence let’s leave it at this.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tuya/tuya-home-assistant/issues/704#issuecomment-980453796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACIYJXJYSPXWSHA7KD4IF3UOABX5ANCNFSM5IJD5AXA .

aidbish commented 2 years ago

I'm interested to see when the next launch event is, and the number of people constantly asking what is happening and why everyone from both the sides have been so quiet on the subject despite ongoing for weeks. On Fri, 26 Nov 2021 at 22:19, mohsenheravi @.***> wrote: I do not agree with you. But I agreed to stop this argument, hence let’s leave it at this. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#704 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACIYJXJYSPXWSHA7KD4IF3UOABX5ANCNFSM5IJD5AXA .

probably because this repo is no longer maintained as mentioned in the readme and not a HA rep

zlinoliver commented 2 years ago

Hi guy, sorry again for the inconvenience!We are working hard on fixing the slow response issue, if everything goes well, it should get back to normal by the end of this week. Appreciate for your understanding.

svante-jacobsen commented 2 years ago

My lights just started working.

svante-jacobsen commented 2 years ago

On/off works now but not brightness (even after integration reload).

74Rog commented 2 years ago

My smart sockets now seem to be working. Status updating immediately from within HA when I press a button. Also state immediately changes in HA if I send request via Alexa.

mohsenheravi commented 2 years ago

Switches and lights work again. Thanks dev team. I know some of us (me included) vented a lot here, but reliability is key. Just imagine being woken at 5 am by your nurse wife because the garage door won't open by morning routine and she can't find remotes, then you'll see our angle. All the best.

steve1011011 commented 2 years ago

Same here....all looking good so far

caitotheonlypotato commented 2 years ago

All good here now as at 29/11/21

willsmarthome commented 2 years ago

Here also looking good so far. Is there a problem found?

willsmarthome commented 2 years ago

Still problems with the Tuya devices, after reload of the Tuya integrator devices are working again. After a while the Tuya devices are not working again. The problems are random over the Tuya Devices.

TheGabeMan commented 2 years ago

I was told by Frenck that they are experiencing issues because of the AWS performance issues.

willsmarthome commented 2 years ago

I have these problems for almost a month. Have there been performance issues with AWS for a month?

TheGabeMan commented 2 years ago

Ah no, I have had them a few weeks back. A lot of other people were also complaining then. Then Tuya reported the issues seemed to be resolved and they were for me as well then. Since about 2 days I have these issues again.

willsmarthome commented 2 years ago

Yes, I have that too. At first it seemed to work again, but since a few days it's been problems again. It also seems to be getting worse.

caitotheonlypotato commented 2 years ago

Same here as for you folk. I'm sure devs are aware. For me works for a few hours then the integration requires reloading or HA restart also works. Might just make an automation to reload the Tuya integration at the top of each hour for now.

elyobelyob commented 2 years ago

Does anyone have a link to the “issue known” page that Frenck referenced late on in the last downtime? Can’t seem to find it.

On Fri, 17 Dec 2021 at 12:13, caitotheonlypotato @.***> wrote:

Same here as for you folk. I'm sure devs are aware. For me works for a few hours then the integration requires reloading or HA restart also works. Might just make an automation to reload the Tuya integration at the top of each hour for now.

— Reply to this email directly, view it on GitHub https://github.com/tuya/tuya-home-assistant/issues/704#issuecomment-996676722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACIYJQACXX5YYGGRUKFORTURMSODANCNFSM5IJD5AXA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

caitotheonlypotato commented 2 years ago

Temp solution for me. Use any switch or sensor from the integration, seems to work.

2021-12-18 11_33_48-Configuration - Home Assistant

svante-jacobsen commented 2 years ago

Does anyone have a link to the “issue known” page that Frenck referenced late on in the last downtime? Can’t seem to find it.

In November there was an "Aware" message at https://www.home-assistant.io/integrations/tuya: aware

There is no such message there now.

elyobelyob commented 2 years ago

Thanks, HA seem to be sticking their head in the sand with this integration. I use the power monitoring to switch off Li-on battery chargers, so having it fail is a potential risk. The MQTT error workaround helps, but this needs to be addressed in the integration not in automation tasks.

Signal-Engineer commented 2 years ago

Has anyone got an update on this issue? I'm still receiving the MQTT error in Home Assistant.

aidbish commented 2 years ago

HA seem to be sticking their head in the sand with this integration. I use the power monitoring to switch off Li-on battery chargers, so having it fail is a potential risk. The MQTT error workaround helps, but this needs to be addressed in the integration not in automation tasks.

Blame Tuya not HA, its their API thats crap. 13days or more of issues and they only just update their sdk to try resolving the issue image

https://github.com/home-assistant/core/pull/62729

Suggest looking at investing in something thats locally controlled for critical items

mohsenheravi commented 2 years ago

I use the power monitoring to switch off Li-on battery chargers, so having it fail is a potential risk. The MQTT error workaround helps, but this needs to be addressed in the integration not in automation tasks.

Have you tried "local Tuya" integration? I am using the local version and the response is almost immediate.

hawkeye100 commented 1 year ago

I have just created a new clean install of HA, and Tuya integration and am now experiencing this issue (lag with button/icon refresh on Tuya devices).

Home Assistant 2022.11.2 Supervisor 2022.10.2 Operating System 9.3 Frontend 20221108.0 - latest

(the old HA Home Assistant 2022.7.7 Supervisor 2022.10.2 Operating System 9.2 Frontend 20220707.1 - latest did not show this issue)

I do not know how to find Tuya version - guessing they are different. Nor do I know how to get 'local' Tuya to try that out. Where is HACS? (I am using Virtualbox VM of HA) [I think my original HA used the old Tuya and having to set up via the Tuya website was a pain but it got done)

This issue is still 'open' so I am guessing it is not resolved yet, though no activity for a while. Am I in the right place? If so, can anyone update me please on best way forward to avoid the refresh/icon lag with Tuya devices - or are we all still waiting for Tuya?

TIA

(related to/same as - Tuya doesn't send state of devices #63052?)

mohsenheravi commented 1 year ago

I do not know how to find Tuya version - guessing they are different. Nor do I know how to get 'local' Tuya to try that out. Where is HACS? (I am using Virtualbox VM of HA) [I think my original HA used the old Tuya and having to set up via the Tuya website was a pain but it got done)

I had this issue but it's all good now. I use local Tuya. The following videos can help you. Not sure if they are still up to date but they surelu will point you to the right direction: https://www.youtube.com/watch?v=vq2L9c5hDfQ&t=743s https://www.youtube.com/watch?v=nIbCkYyZn6o&t=359s I hope you can fix the issue ASAP. Cheers.

hawkeye100 commented 1 year ago

I had this issue but it's all good now. I use local Tuya. The following videos can help you. Not sure if they are still up to date but they surelu will point you to the right direction: https://www.youtube.com/watch?v=vq2L9c5hDfQ&t=743s https://www.youtube.com/watch?v=nIbCkYyZn6o&t=359s I hope you can fix the issue ASAP. Cheers.

Thanks for the pointers. I now have HACS and LocalTuya installed. Bit fiddly, but got there; fortunately could use existing IoT website info.

Most devices are added OK (and responding properly) but a couple are doggedly refusing to come along, thanks to this issue: https://github.com/rospogrigio/localtuya/issues/543 also here https://github.com/rospogrigio/localtuya/issues/1109

Will have to have another go at them in due course, or leave them on the original cloud Tuya integration (assuming it can exist alongside on a permanent basis)

Smartdrive78 commented 1 year ago

I started having this problem a month ago? Maybe since the last HA update to 2022.11 ?

But I doubt this will be looked at - it seems this repo is dead.

spuljko commented 1 year ago

Did anyone took a time to read Important notice in this repo?