Tuya IoT Platform - MQTT Config Problem

Hi all, I’ve upgraded to the 10.x core and upgraded Tuya to the IoT Platform, exactly as described in the instructions. This all worked OK and my 13 devices were successfully added to HA. However the integration doesn’t work properly. A device (smart life switch) can be switched ‘on’ from the dashboard, but the ‘switch’ reverts back to the ‘off’ state even though the device remains on. The device can still be controlled correctly from the Smart Life app.

It seems there is a problem with the MQTT configuration when Tuya is installed, this is the Core Log:

[tuya-openmq] error while get mqtt config
ERROR (Thread-4) [tuya iot] error while get mqtt config
ERROR (Thread-4) [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 174, in run
    time.sleep(self.mq_config.expire_time - 60)
AttributeError: 'NoneType' object has no attribute 'expire_time'

Does anyone have any suggestions what the problem might be and is there anything that I can do to fix it, or to work around it?

Thanks!

3 Likes

Frenck resolved this - thanks! - Device Status Notifications service had not been enabled in Step 6 of the Tuya Integration instructions. Enabling this allows MQTT to work properly within the Tuya Intgegration.

4 Likes

I had that same issue and solved with the same solution. It was selected during setup however.
Unfortunately The integration does not show any devices. (Only one connected in the app)
Tuya_NoDevices
And in the Tuya IoT dashboard it visible (the outdoor lamp).

Restart server without result. Any suggestions what can cause this?

Thanks, been struggling with this issue for a while I also missed step 6 on tuya-home-assistant/platform_configuration.md at 1d7da1ee43a2ebfc9ad47eccff453828ffe529f9 · tuya/tuya-home-assistant · GitHub, once I configured it and rebooted everything started working as expected

1 Like