core: Tuya Device Problem with Home Assistant Core

The problem

I updated Home Assistant Core from 11.5 to 12.0 and noticed my Tuya devices are now having an issue. If I reload the integration then it fixes the problem for a few hours but later the problem reoccurs. Here is what was in my log file related to Tuya.

2021-12-14 00:06:11 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 02:05:12 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 04:04:12 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 06:03:13 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 10:01:16 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 12:00:17 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 13:59:18 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 15:58:19 ERROR (Thread-5) [tuya_iot] error while get mqtt config 2021-12-14 19:33:56 ERROR (Thread-10) [tuya_iot] error while get mqtt config 2021-12-15 00:53:17 ERROR (Thread-12) [tuya_iot] error while get mqtt config 2021-12-15 04:51:19 ERROR (Thread-12) [tuya_iot] error while get mqtt config 2021-12-15 09:08:19 ERROR (Thread-16) [tuya_iot] error while get mqtt config

Version 11.5 never has a problem and doesn’t generate these errors.

Thanks

What version of Home Assistant Core has the issue?

12.0

What was the last working version of Home Assistant Core?

11.5

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Tuya

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tuya

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2021-12-14 00:06:11 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 02:05:12 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 04:04:12 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 06:03:13 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 10:01:16 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 12:00:17 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 13:59:18 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 15:58:19 ERROR (Thread-5) [tuya_iot] error while get mqtt config
2021-12-14 19:33:56 ERROR (Thread-10) [tuya_iot] error while get mqtt config
2021-12-15 00:53:17 ERROR (Thread-12) [tuya_iot] error while get mqtt config
2021-12-15 04:51:19 ERROR (Thread-12) [tuya_iot] error while get mqtt config
2021-12-15 09:08:19 ERROR (Thread-16) [tuya_iot] error while get mqtt config

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 6
  • Comments: 55 (7 by maintainers)

Most upvoted comments

I know this is only a band-aid for the main issue, but I wrote a simple automation that solves the problem. It automatically reloads the Tuya integration every 60 minutes. Since implementing it, I have not seen any of the tuya_iot errors in the log file. Hopefully someone will figure out the real problem. The only drawback to this fix is that the Logbook will have alot of entries each time the integration reloads but all my devices are working correctly.

Here is the automation I am using. I have a bunch of Tuya devices in an area called “Xmas Lights” which all get reloaded every 60 minutes.

` alias: Tuya Integration Reload (Xmas Lights) description: ‘’ trigger:

  • platform: time_pattern minutes: ‘50’ seconds: ‘00’ condition: [] action:
  • service: homeassistant.reload_config_entry target: area_id: xmas_lights mode: single `

All of the above is not a Home Assistant issue. Upgrading did not cause it; and rolling back will not fix it.

This is an issue with Tuya’s cloud services. Please contact Tuya about it.

@frenck is it feasible to consider work arounds in the Tuya integration? e.g.detect this condition and recreate the underlying Tuya connection? I 100% agree that this is a Tuya cloud issue but, given the very significant impact, perhaps this can be considered?

Writing automations that reload the integration every X minutes doesn’t feel like a good solution.