[Solved] Problem with Tuya integration, MQTT config error strikes again?

Hi all,

I’m new to this forum, but an entousiast HA user for a few years now.
As of yesterday, I sudddenly have an issue with the Tuya integration. It reports the “MQTT config” error. I have read up on a few forums (even on the GitHub page) and tried everything, but nothing seems to solve this problem. Until yesterday the Tuya integration was working fine, but now it throws this error:

2022-11-15 16:24:09.510 ERROR (Thread-3) [tuya_iot] error while get mqtt config 
2022-11-15 16:24:09.585 ERROR (Thread-3) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
File "/usr/local/lib/python3.10/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'

Today I updated the HA core to 2022.11.2 because I thought this might be the issue, but no, it still does not work. I even created a new project on the IoT Tuya site, but no success.
Removed the entire integration and re-added it, still no success.
The integreation keeps throwing this error message.

I don’t know if this is the right place to post this topic, if not, please let me know.

Is there anyone experiencing the same issue? I can provide more info/logs if needed.
Thanks in advance!

Edit: Question: Where can i find the openmq.py file in my installation? (I have OS version)

1 Like

ive noticed an issue today HA cant see any Tuya device but they work via google , when i log on to the tuya iot site they are all on line . Ive also reinstalled the integration in HA but still no joy

Thanks for your reply! Perhaps Tuya did an update on the API or SDK? Google and Tuya app work great with the devices. Even in IoT I see my devices and can use the API calls to call to them. Weird…

Hope we are not the only ones who have issues since yesterday.

as well

Your English is fine (at least just as good as mine :sweat_smile:)
Could you please check your logfile (in Settings - System - Logs - Show Full log) and perhaps post the relevant lines? I am wondering if you have the same “MQTT config” error…
I am still a novice user (read: noob) and can’t figure it out why it is suddenly broeken.

Anyone else seen this problem (recently)?

EDIT: In my 1st post, I forgot to mention I have tried the “Automation” solution from 2021. But has no effect.

I did figure it out. My IoT Core API service account was expired. I aaplied for an extension period of 6 months and within 24 hours it was extended. I hope I can renew the API account again over 6 months…


This was the same problem for me! Thank you for the update. I do wonder if they’ll end up making this chargeable… Will make the home assistant integration basically unworkable as the charges to subscribe are huge!!

Excatly same issue with my HomeAssistant - have been trying to figure this out over a month already! Thansk @sbsoft ! This was very good advice.
Hope there will be some permanent solution for this (not going to pay 50k€) :slight_smile:

Thx for that information. Same Problem here and almost reached the point simply to deinstall tuya integration…

Thank you, that was my case too.
Error occurred after copying the ha installation to another pc, so it had me totally confused as it happened the exact same day (coincidences of life).
In another thread I found a message pointing towards the account service page and there I remembered your answer here. Now solved for the next 6 months.

So the Tuya integration is just for 1-7 months. After that period it will become absolutely useless.
Nasty surprise. That nastier that integration documentation absolutely doesn’t warn about this issue.

How did you do that? Write a ticket? I can’t find a direct way to request an extension…


click Cloud

Click IoTCore (should be first on list)

Then renewing is one of the option near the notice of expiration

1 Like

Extend your Tuya IOT Core account (for API access)


and clicking


Does that mean we have to renew every 6 months?
Has somebody done this (renewed twice)?

Just activated Tuya account but getting the same error. What’s wrong?

UPD/ After two restarts service up

On my side, I had an occurence of this error last night, although my IoT Core API account has been extended and valid for at least four months.

I’m right now in this situation, my tuya integration has been working flawless for months since few minutes ago when I’ve had provoked a power shortage, when my HA came up again, no tuya devices where available.

Checked my iot core status in tuya, it was expired since 2022! I’ve applied for a renewal, let’s see if that solve my problem.

About 9 hours ago seems my Tuya integration broke with same message (not sure what provoked it).
My hot core status was also expired for years. There has to be a better fix?!

The same has just happened to me - mine apparently expired in 2022 but only just started giving me problems :frowning:
I have requested an extension - let’s see what happens… but it might be time to go for a local Tuya server

1 Like