core icon indicating copy to clipboard operation
core copied to clipboard

Tuya integreation don't update sensor, need to be reloaded...

Open Z4RR0 opened this issue 1 year ago • 36 comments

The problem

Sometime, i need to go in device click on tuya and need to reload integration to update the sensor value. "the device work but the sensor are not update.

What version of Home Assistant Core has the issue?

2023.4.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

tuya integration

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Z4RR0 avatar Apr 23 '23 12:04 Z4RR0

Please download the diagnostics from the device card in Home Assistant and attach it in a comment.

thecode avatar Apr 23 '23 17:04 thecode

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!

Code owner commands

Code owners of tuya can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tuya Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

home-assistant[bot] avatar Apr 23 '23 17:04 home-assistant[bot]

I've been having the same issue since a couple of weeks but I can't say since when or what version it was still working on without issues. For me it's 3 spots and 1 lightbulb that sometimes take a lot of time to update their status or I have to force it by reloading the Tuya integration.

One thing I can say is that the issue remains after re-installing HA OS running on a Unraid VM, I loaded a backup which dates from December 2022. I had it re-installed since a few days ago after a power surge damaged the drive running HA OS.

Home Assistant 2023.4.6 Supervisor 2023.04.0 Operating System 10.0 Frontend 20230411.1 - latest

Diagnostic file

Voltbeat avatar Apr 23 '23 18:04 Voltbeat

Having issues similar.

iotinkognito avatar Apr 24 '23 14:04 iotinkognito

Да да тоже самое, приходится перезагружать интеграцию tuya

Vjfrrbfubbvurbvr avatar Apr 25 '23 18:04 Vjfrrbfubbvurbvr

I'm having the same issue, which seems to have started after installing 2023.4 (or at least around the time that was released). I've attached the diags from the Tuya plug socket which loses its status most frequently. This socket is on a calendar schedule which worked (turned on), however the last updated attribute didn't change for the socket and neither did the status. Reloading the Tuya integration updated the status. (I've also had the same issue with two bulbs)

tuya-c0939cbe28eda8f62ea3d1fd669b7483-SkyQ Socket-1ebf91c90adc2796b0498c9a828093a6.json.txt

21Development avatar Apr 25 '23 19:04 21Development

Same issue, if I change from false to positive within a few seconds it switches back to false ! was running 2023.3... was running fine a few weeks ago

leeboy22001 avatar Apr 25 '23 20:04 leeboy22001

Same here, have to reload tuya integration 3 time daily :(

jkitney avatar Apr 26 '23 07:04 jkitney

Experiencing the same. I only have one Tuya temp/humd (wifi) sensor, and in the last weeks it often becomes unavailable or simply doesn't update. Usually (but not always) simply reloading integration helps for some period of time. Occasionally its not even available on the Tuya development site! I've really had enough with Tuya, and don't really think its worth the bother at all! It would appear of late that Tuya have stopped active involvement in the HA integration, something that's surprising following all the hype some time ago about the close work with HA.

gfn256 avatar Apr 26 '23 11:04 gfn256

Same thing, bought some sensors and found that they stop updating. The most interesting thing is that they are updating in the tuya app and my wired tuya sensor also is updating fine, but wireless (3AAA powered) not. Any chances that it will be fixed?

Monk11th avatar Apr 26 '23 13:04 Monk11th

Same issue, my water heater is reporting ok to tuya app but I cant see any updates in HA. No logs with any interest in home assistant log. Reloading allow the integration to work some days but suddenly stops updating. I updated HA yesterday to last version (docker 2023.4.6): but same result. ¿Can we set debug "on" for tuya integration?

lagartujas avatar Apr 26 '23 15:04 lagartujas

Hello. I've been having the same issue for a couple of days now. My Tuya sensors stop updating from time to time... no log information... The only workaround is to reload the integration. While the Tuya/Smart Life app shows the correct state... HA do not show the same.

escobarin3 avatar Apr 26 '23 19:04 escobarin3

I fixed my issue by extending my Tuya trial, it had expired after a month. Now have an extra 6 months :)

leeboy22001 avatar Apr 26 '23 21:04 leeboy22001

Same problem here tuya does not reconize any device. Reloading does not help and a new install either

jaccos avatar Apr 27 '23 06:04 jaccos

Same problem here tuya does not reconize any device. Reloading does not help and a new install either

This is a different issue, please create a new issue

thecode avatar Apr 27 '23 07:04 thecode

Hello. I've been having the same issue for a couple of days now. My Tuya sensors stop updating from time to time... no log information... The only workaround is to reload the integration. While the Tuya/Smart Life shows the correct state... HA do not show the same.

+1

brunokelo avatar Apr 27 '23 14:04 brunokelo

After few day's i try to delete the integration...delete device etc etc but nothing change...sometime the integration stop responding in update the value so....i need to reload from the menu and starting working again...

the work time are varius....many days or few hour's i don't understand why

Z4RR0 avatar Apr 27 '23 14:04 Z4RR0

Same problem. Have extended IoT Core for 6m, removed IPV6, removed unnsessasry API (from tuya platform), and still have a problem with update sensors.

Is workaound, to do in NODERED - autoreload tuya service ~1h delay, but... its still workaround.

ADD; Even when sensors is not working correct, my automatizations works OK (for example: motion sensor (Xiaomi Auara) detect motion -> lights on (tuya) -> delay 1m -> check motions status -> turn off light (tuya)

benyres avatar Apr 28 '23 05:04 benyres

Same problem. My Tuya sensors stop updating from time to time. The only workaround is to reload the integration.

Jabberwoky58 avatar Apr 28 '23 06:04 Jabberwoky58

Hi all. I thik I have a workaround while we discover real problem origin. I have set an automation to restart tuya integration daily. Perhaps it helps you too. I'm testing it but first impresion are good. Check sintax before paste to HA, due to markdown visualization:

alias: 00Tuya reload description: '' trigger: - platform: time_pattern hours: '23' condition: [] action: - service: homeassistant.reload_config_entry data: {} target: entity_id: climate.dt_ewh

mode: single

lagartujas avatar Apr 28 '23 07:04 lagartujas

Explicit +1 on this, happy to provide any information that could help.

Similarly to @benyres my automations also keep working (and toggling from the UI also works) but the status displayed is completely off.

henrik-muehe avatar Apr 28 '23 09:04 henrik-muehe

Hi all. I thik I have a workaround while we discover real problem origin. I have set an automation to restart tuya integration daily. Perhaps it helps you too. I'm testing it but first impresion are good. Check sintax before paste to HA, due to markdown visualization:

alias: 00Tuya reload description: '' trigger: - platform: time_pattern hours: '23' condition: [] action: - service: homeassistant.reload_config_entry data: {} target: entity_id: climate.dt_ewh

mode: single

so the entity you have chosen is explicity from a tuya device?

Huxinator avatar Apr 28 '23 17:04 Huxinator

iv got the same issue as everyone above.. except mine stops updating every few hours, and not just once a day.

im running HA core 2022.9.1 so i dont think this is an issue because of updates.

melton2 avatar Apr 29 '23 09:04 melton2

Hi all. I thik I have a workaround while we discover real problem origin. I have set an automation to restart tuya integration daily. Perhaps it helps you too. I'm testing it but first impresion are good. Check sintax before paste to HA, due to markdown visualization: alias: 00Tuya reload description: '' trigger: - platform: time_pattern hours: '23' condition: [] action: - service: homeassistant.reload_config_entry data: {} target: entity_id: climate.dt_ewh mode: single

so the entity you have chosen is explicity from a tuya device?

Yes, is the device that stops updating. I only have one device afected. I have already flashed with open belken or esphome cheap devices, but I dont want to Risk the warranty of mu Walter heater.

lagartujas avatar Apr 29 '23 14:04 lagartujas

Same problem here, 2x Tuya devices. Reverting to 2023.3.6 fixed it for one device, the other is still acting oddly but I just added it to the network, it could have been added incorrectly. I'll try removing it and adding it again.

dahamsta avatar Apr 29 '23 16:04 dahamsta

I fixed my issue by extending my Tuya trial, it had expired after a month. Now have an extra 6 months :)

As "obvious" as it may sound... This was the issue. I just forgot that extending the "trial period" in Tuya was a thing. All is working as it should now.

escobarin3 avatar Apr 29 '23 16:04 escobarin3

I have 11 Tuya devices connected currently, in troubleshooting this I have added another 6months to my Tuya Dev account (it had expired 12 months ago but continued working in HA) and also added a automation which runs the reload_config_entry service each morning (I only specify one device but all briefly show as unavailable then back to their status in HA history when automation runs. Not sure if this is the same as reloading the integration manually though!?)

Despite the above changes, this morning most of my Tuya devices are not showing their correct status in HA 2023.4.4 - they are still accepting commands to operate e.g. I can turn on a bulb in HA via a switch but it stays ‘grey’ as if off in HA. A curtain automation operates the motor but the curtain position is not updated and the last updated time on neither device updates. Looking at the devices in SmartLife, I can both operate and see their correct status. Two temp/humidity sensors (which only connect after set changes happen) continued to update in HA.

In case it helps with further troubleshooting, my 11 devices are a mixture of bulbs, sockets and a curtain motor all on different Tuya f/w and connected on a separate UniFi VLAN network (which is also connected to HA). Reloading the HA Tuya integration manually temporarily fixes the issue and shows the correct status… until the next time.

EDIT: Without me making any changes, reloading HA or the Tuya integration, the status's are now back in HA for 10 out of 11 devices. Looking at the entities history in HA, no status changes were recorded for the bulbs / sockets until they suddenly started working again. Two things happened around that time; a Tuya bulb which was previously powered off overnight was turned on and a HA automation fully opened the curtain.

In summary

  • Devices (Sensors/Bulbs) which are not permently connected, continued to update correctly when energized
  • Devices which were powered but turned off stopped updating their status in HA
  • Devices continued to turn on/off/operate but didn't update their status in HA
  • Suddenly all but one device started working correctly again without making any changes.

21Development avatar Apr 30 '23 08:04 21Development

Dont think that just "extending the trial" is the main solution for this problem. My trial isnt expired and i have the same issues

Huxinator avatar Apr 30 '23 16:04 Huxinator

+1 , I have similar problems with device status updates, after reloading the integration, for a while, everything works.

motogon avatar Apr 30 '23 19:04 motogon

I have 11 Tuya devices connected currently, in troubleshooting this I have added another 6months to my Tuya Dev account (it had expired 12 months ago but continued working in HA) and also added a automation which runs the reload_config_entry service each morning (I only specify one device but all briefly show as unavailable then back to their status in HA history when automation runs. Not sure if this is the same as reloading the integration manually though!?)

Despite the above changes, this morning most of my Tuya devices are not showing their correct status in HA 2023.4.4 - they are still accepting commands to operate e.g. I can turn on a bulb in HA via a switch but it stays ‘grey’ as if off in HA. A curtain automation operates the motor but the curtain position is not updated and the last updated time on neither device updates. Looking at the devices in SmartLife, I can both operate and see their correct status. Two temp/humidity sensors (which only connect after set changes happen) continued to update in HA.

In case it helps with further troubleshooting, my 11 devices are a mixture of bulbs, sockets and a curtain motor all on different Tuya f/w and connected on a separate UniFi VLAN network (which is also connected to HA). Reloading the HA Tuya integration manually temporarily fixes the issue and shows the correct status… until the next time.

EDIT: Without me making any changes, reloading HA or the Tuya integration, the status's are now back in HA for 10 out of 11 devices. Looking at the entities history in HA, no status changes were recorded for the bulbs / sockets until they suddenly started working again. Two things happened around that time; a Tuya bulb which was previously powered off overnight was turned on and a HA automation fully opened the curtain.

In summary

  • Devices (Sensors/Bulbs) which are not permently connected, continued to update correctly when energized
  • Devices which were powered but turned off stopped updating their status in HA
  • Devices continued to turn on/off/operate but didn't update their status in HA
  • Suddenly all but one device started working correctly again without making any changes.

I think that there ara a lote of advantages of flashing tuya de ices with other firmware. So I prefer this radical solution to avoid depending a company to manager my gadgets. Only un special situations I would not do It, as for an device with an integrantes tuya controller like my Walter heater. This is not a cheap smart switch to Risk the warranty, but once the warranty expires... 👿

lagartujas avatar Apr 30 '23 19:04 lagartujas