Having trouble configurating the Tuya integration

In my attempt to integrate with Tuya on Gladys, I have followed the guide at

using both Tuya Smart App & SmartLife app but endind up with the following:

I notice that on Gladys services, Tuya is not started labelled with Error. Is there a way I can get more info to troubleshoot the issue further.

In the Tuya cloud I can see the WiFi plugs I have on the Android app, and I also set each device to Controllable (not read-only).

Thanks in advance.

Hey @gociii :slight_smile:

I’ve move your message to a separate topic for clarity.

Did you check Gladys logs ?

You can do a:

docker logs gladys

To see what’s wrong

With docker logs gladys | grep -i tuya

I can see this is quite an occurence…

2024-06-17T07:19:06-0100 <error> tuya.discoverDevices.js:38 (TuyaHandler.discoverDevices) Unable to load Tuya devices TypeError: Cannot destructure property 'list' of 'result' as it is undefined.
    at TuyaHandler.loadDevices (/src/server/services/tuya/lib/tuya.loadDevices.js:25:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TuyaHandler.discoverDevices (/src/server/services/tuya/lib/tuya.discoverDevices.js:35:15)
    at discover (/src/server/services/tuya/api/tuya.controller.js:10:21)
2024-06-17T07:53:33-0100 <warn> service.start.js:44 (Service.start) Unable to start service tuya TypeError: Cannot destructure property 'list' of 'result' as it is undefined.
    at TuyaHandler.loadDevices (/src/server/services/tuya/lib/tuya.loadDevices.js:25:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.start (/src/server/services/tuya/index.js:19:5)
    at Service.start (/src/server/lib/service/service.start.js:33:7)
    at start (/src/server/api/controllers/service.controller.js:22:21)

Currenlty on Gladys v4.43.0

Thanks for checking! Seems the call to the Tuya get devices API is not successful in your case.

When you created the Cloud project, did you select the correct data center where your tuya data is ?

If you want, would you mind sending me your Tuya credentials in private so I can test on my side and tell you what’s wrong ? :slight_smile:

I ve set both the tuya cloud and the tuya service in Gladys to central Europe.

Do you mind sending me your Tuya credentials in private so I can test ?

(You can change your password later)

Hi Pierre,

Can send the credentials to you on any channel:

github / telegram / discord or whatever.

Thanks for your assistance.

Can you send me a private message on the forum? I’ve increased your user level so you should be able to message me

I’m also having an issue getting tuya integration to work… i have the correct data center selected (western US) and the tuya app alows the connection… I’ve copied and pasted all of the credentials from everywhere the gladyss guide (“Tuya | Gladys Assistant”) says to but when i clicksave configuration, it processes fomr 1/2 a second and goes back the the data input screen with all of the codes there i just put in… so im guessing that means its saved… when i go to “integrations… tuya discover” it specifically says " Devices detected on your Tuya cloud account" at the top while saying " Tuya devices are automatically discovered. Your Tuya devices need to be added to your Tuya cloud account before." and “No Tuya device discovered.” below that in the table. The devices are associated with the tuya cloud account i just input the credentials for, but when i click scan i get the same message (that there are devices in my tuya cloud account), but “No Tuya device discovered”… am im missing a step somewhere??

Hi @murffyp!

Tuya can sometimes be quite tricky to work with :sweat_smile:

Have you checked our FAQ at the bottom of the tutorial? It might help:

:point_right: FAQ