Tuya "core" really slow to respond..HA 77.3 on RPI3 / HASSOS - Any Pointers?

I have the same exactly problem. Did you have the chance to fix it? I also can’t change the color of the bulbs if I call the group that I have created in HA but I can do it if I call the group created in Alexa or SmartLife app.

Nah, sorry. :frowning:

I could never figure out what the issue was. It’s certainly some combination of the HASSOS version and the new TUYA plugin. If I use the purpose-built apps to control my appliances (Tuya Smart or We Link) then the response is instant. When going via the HASSOS, it is like there is some “processing” time and then it works.

I can only assume that the Plugin is authenticating to the API each time and that is the delay between systems.

I only assume this as the delay varies and this would make sense on days that the API is slow to repsond.

Just my 2 cents anyway. :slight_smile:

Thanks for answering!!! Also, if you don’t mind, I would like to ask you something else. When I try to change my tuya’s bulbs to White, using Hass, the bulb does not change to white. I need to select another similar color (pic attached), to make it work. The same happen with Alexa, when i say White, the color it takes is different.
Now, If I change it to white using Smart Life or tuya app, the white color is perfect, but HASS, for that bulb, shows “Unavailable” - I have attached the log error.

Here below is the color I have to select to make my bulbs to work with white. The option in the middle does not work.

This error is being shown when HASS try to update the bulbs that were changed to white using Smart Life or Tuya apps.

Do you have any clue about why is that?

Thank’s a bunch!

I found the issue. I will share it in a new post. I didn’t find anyone that posted it.

Thanks. I was just typing a response that I don’t have experience with these lights. My Tuya devices are the “in wall” light switches. No hue or mood bulbs. Interested to see what the cause of your issue was generally though. Thanks for the update.

I posted the issue here: Tuya Color Issue when using Smart Life or Tuya App

Hi, I have the exact same problem.

I have 14 Smart-life lights and I have to control them together, so I put them in a group. When I control them from the smart-life app, it is very fast, no delay at all. When I use HA (Hass.io v.0.80), the lights go on/off one after the other, takin some seconds to complete. But, even worst, HA takes much more to update the lights status after they went on/off. If I toggle the group before all the lights status have been updated, lights will set on/off randomly.

Could anyone help on this?

2 Likes

Same here. Home Assistant takes up to 30 seconds to detect state change. Too slow to use as a trigger for animations.

1 Like

Okay, so I tell Alexa to turn off the living room light when I get ready to retire.
a voice command is picked up and sent via internet to amazon cloud
where it is interpreted and sent back
where HA picks it up and relays the command via internet again to a tuya cloud
where it is interpreted and sent back
where HA again picks it up and relays the command via my wifi network
where it is interpreted by a light bulb and turns off
where the off status of the bulb is relayed via my wifi network
where HA picks it up and changes the status of the light to off
where HA relays that update via my wifi
where my laptop interprets it and updates the UI page

normally in about 2 seconds… not bad considering.

That’s excellent! I must have mine setup wrong. This is what I have:

tuya:
  platform: smart_life
  username: [email protected]
  password: mypassword
  country_code: 1

Can you help?

Do you get any notification that tuya registration failed? My experience with smart-life is the username: is usually the phone number you registered with (just the 10 digits).

There are no notifications in HA that registration failed. It does work. Just very slow to detect the change of state.
Perhaps they use a new way to register. I don’t think that phone number was an option. You put in your email and they send you a code to complete registration.
I’m using a Smart Life switch. If I turn it on/off using the Smart Life App it is instantaneous. If I turn it on/off using the icon on my HA UI it is less than a second. However, if I physically press the switch, the switch changes immediately of course but HA doesn’t detect it for a time ranging anywhere from 2 to 30 seconds.
It’s as if HA only checks the Tuya cloud every 30 seconds to see if the state has changed.

I never found a solution to this, but to improve it I did the following.

Install the TuyaSmart App. Create an account that matches the same mobile number password
as smartlife.

Went into Smartlife and removed one device at a time by going into the device and choosing “Restore Factory Defaults”
Then opened up the TuyaSmart App and added the “new” device to TuyaSmart.

Repeated this process until I had migrated all devices from Smartlife to TuyaSmart.

In HassIO, updated the component to be ‘tuya’ instead of ‘smartlife’, and restarted hassIO.

The delay (While still there) does not seem as bad. I’m getting my lights on and off within a second ot two now. Before it could be up to 10 seconds!

Worth a try… YMMV.

Thanks for your help. Unfortunately it didn’t work. Whether I toggle the Smartlife switch manually or using the Tuya app it takes HA up to 30 seconds to detect the change.

One question. The entity id for this switch appears as a 20 digit long hex number under “Developer Tools/states” instead of using the “friendly name”. Is that the same for you? Thanks.

1 Like

I have just installed over 10 Tuya supported switches and got the same slow response issue while using hass to control.

However, when I link tuya directly to google home and control it via voice command, eg turn off everything, all switches were turned off in a second. Nevertheless, the status were reflected slow in the hass interface.

I have also read the python package tuyapy, the update function actually got a time.wait of 0.5 seconds. Is this the reason why hass got a huge delay on controlling tuya product ?

@Studebaker - Yes - I too have the 20 digit hex number under identifier. The good thing though (thankfully) is that if you remove a device and re-add it, the HASS does not care. Before Tuya was “core”, you had to update the ID that the device generated from the Cloud (random each time) - so being core is much better now, but the pesky delay means I rarely use my HASS anymore for automation. I’m looking at alternatives to control my lights / Tuya devices. :frowning:

@hktomy - My understanding is that the update just pulls down your device configuration from the cloud to populate the HA. I don’t think that “call” is part of the process to control the Tuya devices.

As I posted to @Studebaker , it’s too slow to use now. I’m looking for alternatives, which is a shame as HA still works great with my sonoffs, but I have more Tuya devices…

I gave up and converted it to MQTT: https://www.youtube.com/watch?v=4nX90vhAniQ
Works great! Easy to do!

Hi how did you convert the tuya bulbs to mqtt? The tuya groups in hassio are unworkable.

I didn’t do bulbs. Only a switch.