[BETA] Tuya Cloud Driver (Limited device support)

Just goes to show how good broadband connectivity has become :slight_smile:

1 Like

Hello, Iโ€™m attempting to setup the Tuya Cloud and when I try to add devices it shows an error of user_exceed_Bind_Capp. I assume this means my account is assigned to more than 2 projects however I have no other projects?? Any help would be great, thank you!

Hello, I set up a Tuya developer account and I just installed this driver and I can not get the Hubitat virtual device to connect with my Smartlife app and retrieve the devices. I have a continuing "Skill ID invalid". I've looked back through the community thread and some others have been able to solve it by selecting a different data center location. I'm in the US/Canada region and have tried all data center combinations. Any idea what else could be causing this and how to resolve it? Any help would be greatly appreciated. Thanks.

Hi @jonathanb

What a great piece of work, thank you! Once I'd worked through the Tuya idiosyncratic "password reset" thing and got authentication working, the integration works seamlessly.

I'm having a problem with scene capture and I wonder if you can help. I have 2 Novastella outdoor floodlights that I'm looking to incorporate in an HE scene. However, if I add them to a new scene, the "Capture Scene" button doesn't seem to do anything and I get the following error in the logs:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'float'. Try 'java.lang.Float' instead on line 860 (method mainPage)

It's possible it's a HE platform problem, but based on my rudimentary understanding of code perhaps one of the properties on the device that's required to capture a scene is a null and that's tripping out the capture scene functionality?

Thanks for your hard work @jonathanb, as a new Hubitat user this was a relief to see all my Tuya wifi devices come over :sweat_smile:

Can you please confirm the best process for adding new Tuya devices once the initial sync has occurred? I'm moving other devices into the Smartlife app and have confirmed they are linked on the Tuya cloud but it seems the only way I can get them to show in the device list is to add a new virtual device and repeat the sync process. Is this the only way?

Well done, just installed, credentials entered and boom - there's my devices. Works flawlessly, well done and thank you!!

Hi @jonathanb . I just bought a Tuya Wifi IR Remote with temperature and humidity. I've added it to my Tuya account, but how come it's not detected on Hubitat. Is it not supported?

1 Like

Hi @jonathanb luckily I stumbled across your driver. I've installed the driver, done att the stuff on Tuya Smart Developer Centre, linked it to the app on my phone, I think I've done it all correct however I get this from the Hubitat log -


In the device the 'state' starts - 'authenticating' then progresses to 'authenticated' for a a second, then changes to 'error'
Any help would be appreciated. In Tuya Smart Developer Centre says 'contains 1 cloud aurthorization'
Each device is set to 'Read, Write & Manage' is that correct??
This is a screen print of the device in Hubitat -
Tuya Device in Hubitat

Hi Jonathan, Thanks very much, this has resolved a lot of problems for me! The only device I couldn't get working was my Ajax roller blind chain driver. It's visible in the Smart Life app, but only got Generic Component Switch as device type through your driver. I got the following log output with that, and I did try the Zemismart driver as well to no avail. Any suggestions?
dev:12382022-04-20 18:36:03.921 debugon()

dev:12382022-04-20 18:36:01.672 debugrefresh()

dev:12382022-04-20 18:32:26.736 errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'int'. Try 'java.lang.Integer' instead on line 175 (method setDirection)

dev:12382022-04-20 18:32:25.721 errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'int'. Try 'java.lang.Integer' instead on line 181 (method setMode)

dev:12382022-04-20 18:32:24.743 errorjava.lang.Exception: Invalid maxClosedPosition "null" should be between 0 and 100 inclusive. on line 161 (method configure)

dev:12382022-04-20 18:32:24.217 errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'int'. Try 'java.lang.Integer' instead on line 181 (method setMode)

dev:12382022-04-20 18:32:23.234 errorjava.lang.Exception: Invalid maxClosedPosition "null" should be between 0 and 100 inclusive. on line 161 (method configure)

dev:12382022-04-20 18:31:41.982 errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'int'. Try 'java.lang.Integer' instead on line 175 (method setDirection)

dev:12382022-04-20 18:31:40.935 errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'int'. Try 'java.lang.Integer' instead on line 181 (method setMode)

dev:12382022-04-20 18:31:39.992 errorjava.lang.Exception: Invalid maxClosedPosition "null" should be between 0 and 100 inclusive. on line 161 (method configure)

Well I was doing real well until I tried to link Tuya app via QR code, When I tried to do the final step, I get these errors.. Any ideas folk?

This is SUPER cool as I just got a ceiling fan/light that is run by Tuya app. I followed the directions and am able to see the fan a child of my virual Tuya device.

  1. I can only issue on or off for the fan, none of the other speed options work.
    2.There is no light as part of the device,nor is there a different child for the light.

Is there a solution for the 2 issues?
Thanks again for some amazing work!

for what its worth here is what the device page says


Stuck on getting light control via Hubitat... but my main goal was to be able to turn on and off the fan and light via Alexa, well it turns out that the Tuya app allow you to create "Tap-to_run" scenes where you can setup actions. Whats really cools is that you can create these...and THEN you can use Alexa to execute them, in addition, they show up on my apple watch!!

1 Like

I have a Weekett kettle which is imported fine but i can't seem to control it. Ive tried generic component button and switch but can't get it to respond.

Under Data i get this:

  • functions: {"start":{"type":"Boolean"},"temp_set":{"unit":"\u2103","min":40,"max":100,"scale":0,"step":1,"type":"Integer"},"temp_set_f":{"unit":"\u2109","min":104,"max":212,"scale":0,"step":1,"type":"Integer"},"temp_unit_convert":{"range":["c","f"],"type":"Enum"},"warm":{"type":"Boolean"},"work_type":{"range":["setting_quick","boiling_quick","temp_setting","temp_boiling"],"type":"Enum"}}
  • local_key: cb80b5de2cc0df8e
  • product_id: n9c9gxaavafz3fii
  • name: WeeKett Kettle
  • online: true
  • label: Kettle
  • id: bf7cafdc344ed71b52v5zf
  • statusSet: {"start":{"type":"Boolean"},"temp_current":{"unit":"\u2103","min":0,"max":100,"scale":0,"step":1,"type":"Integer"},"temp_current_f":{"unit":"\u2109","min":32,"max":212,"scale":0,"step":1,"type":"Integer"},"temp_set":{"unit":"\u2103","min":40,"max":100,"scale":0,"step":1,"type":"Integer"},"temp_set_f":{"unit":"\u2109","min":104,"max":212,"scale":0,"step":1,"type":"Integer"},"temp_unit_convert":{"range":["c","f"],"type":"Enum"},"warm":{"type":"Boolean"},"status":{"range":["standby","heating","cooling","warm","heating_temp","boiling_temp","reserve_1","reserve_2","reserve_3"],"type":"Enum"},"work_type":{"range":["setting_quick","boiling_quick","temp_setting","temp_boiling"],"type":"Enum"}}
  • category: bh

Is it possible to get this working at all?

Many thanks

Problem initializing
Anyone know the meaning of error code 1106 or where I can find error code definitions?

The driver looped every minute or so attempting to reinitialize, disabled the device to stop it.

Stopped the loop by changing code (for now) ~line 1612

private void tuyaAuthenticateResponse(AsyncResponse response, Map data) {
    if (tuyaCheckResponse(response) == false) {
//        runIn(15 + (3 * random.nextInt(3)), initialize)
        return
    }

Changed the "Tuya Application" from Tuya Smart Life to Smart Life, then retried. Authorization Returned: "code":28841101,"msg":"No permissions.

My one device is a Water Valve controller. Tried Refresh command idea suggested in two earlier threads with this error, but no devices found or created.

Does anyone have any ideas?

I also got the CAPP_BINDED_USERID error -- repeatedly. Did you figure out what the issue is ?

Figured it out in the end -- finally came across Cant add Tuya IOT account via QR-Code: CAPP_BINDED_USERID ยท Issue #22470 ยท home-assistant/home-assistant.io ยท GitHub, which suggests this was caused by using the wrong data centre. Did not believe this (am in UK, was set to Western Europe), but it turns out the advice was correct and Central Europe data centre did the trick. One to add to the instructions ?

I was able to get my tuya smartlife switches (wifi) to interact with hubitat. Unfortunately, one of the switches is a dual switch (dimmer type) that controls a fan and light. I have not been able to figure out how to create a device in hubitat that allows for 2 sliders. I also dont know how to get 2 sliders on the dashboard icon.
Only one of these are showing the "child devices". If anyone can help, or has a driver that I can use to control the parents and child devices I would appreciate it.
Thank you

I am having the same issue :frowning: Let me know if you find out how to fix it

Wow, i thought i tried every possible option on the data centre location, but will go again!