Tuya Integration no devices

Hi,
I’m trying to get the Tuya integration working with HA. I’ve ensured that the ‘Device Status Notification’ is added as per Tuya - Home Assistant instructions. My device does not show up as an entity and I get the following error.

2022-05-15 16:27:55 ERROR (Thread-113) [tuya_iot] error while get mqtt config
2022-05-15 16:27:55 ERROR (Thread-113) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/site-packages/tuya_iot/openmq.py", line 161, in run
    time.sleep(self.mq_config.expire_time - 60)
AttributeError: 'NoneType' object has no attribute 'expire_time'

Any ideas?

1 Like

Hi, same problem here

I found this post mentioning the same problem: New tuya intergration. No devices are being listed - #103 by NKZ_13

This gives a potential solution (setup account as individual ) but I tried it and it didn’t work for me.

Here are the relevant log lines:

[2022-05-15 23:19:50,925] [tuya-openmq] error while get mqtt config
2022-05-15 23:19:50 ERROR (Thread-99) [tuya_iot] error while get mqtt config
2022-05-15 23:19:50 ERROR (Thread-99) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/site-packages/tuya_iot/openmq.py", line 161, in run
    time.sleep(self.mq_config.expire_time - 60)
AttributeError: 'NoneType' object has no attribute 'expire_time'

Seems like a known issue: Tuya - Error While Get MQTT Config · Issue #741 · tuya/tuya-home-assistant · GitHub

I found that this resolved itself. Must be some sort of timeout. I went out to dinner and when I returned it worked, however, it doesn’t seem like my device is supported by HA and I’m trying localtuya.