[BETA] Tuya Cloud Driver (Limited device support)

Hi,
I have this error in my log that come multiple times..

its like if API request failed... I would like to know if its normal like a failed attemp among multiple one or something else...
Thanks

I put 3 of these Feit lights in my garage. Initially, I added them to the Feit phone app as directed. Then I added them to the Tuya app, which automatically removed them from the Feit app. Both apps appear to be nearly identical. They added easily. I then followed the Tuya instructions above to add them to HE. They are fairly responsive, generally taking about 1-2 seconds to turn on and 1 second to turn off. I use webcore to control them.

Note : Off topic, but these lights produced RF interference with my remote garage door openers. I could not open my doors most of the time. I would have returned them for a better option, but I already had them installed on 14 foot ceilings. I had to use ferrite cores on my garage door motors to solve that problem. See this solution video for excellent information.

I am concerned that this process seems to require my LAN password in the Tuya app. I changed my LAN password and this process seems to have stopped working.

Hello @jonathanb ,
Thanks for creating this driver.

I did follow all the steps. But when I create a New Virtual Device, I got an error.
Event Details

id: 310734
Date: 2023-03-17 16:58:31.233
Name: state
descriptionText: your ip(XX.XXX.134.236) don't have access to this API
isStateChange: true
physical: false
digital: false
source: DEVICE
value: error
deviceId: 61

When I google this error, someone said:

In my Tuya IoT project, I turned the "Cloud Authorization IP Allowlist" setting to OFF (under Cloud -> Overview) and it worked for me. Hope it helps.
Source: Tuya IoT "your ip(XX.XXX.128.108) don't have access to this API" error 1114 · Issue #635 · tuya/tuya-home-assistant · GitHub

I did turn off "Cloud Authorization IP Allowlist", but the error is still there.

In the "Past Log" is see this error:
dev:612023-03-17 05:02:46.630 PMerrorCloud API request failed: {"code":1114,"msg":"your ip(XX.XXX.134.236) don't have access to this API","success":false,"t":1679068963740,"tid":"26df8639c4dd11edb979b682f9637fbb"}

Is my IP a problem? I'm from The Netherlands.
It is not desirable for me to work with a VPN to get this working.

Do you maybe still have another solution?

Update : my LED shop lights are taking 2-4 seconds to turn on or off. Not an ideal solution.

This app is awesome. You guys rock.

did you ever get the needed data to update the driver? Interested in getting the light in the fan working (the fan itself works great thanks to your driver).

I get the same errors. Have not been able to figure it out as of yet. After a month my Tuya IOT service expired and it wanted me to renew. If that happens every month not sure I will be going this route.

Just a question, because I have trouble making my automation to work properly... Is somebody know if the driver is getting to know when a scene is activated from inside the app ? I try to make Hubatat scene switch to turn on if I trigger a scene from the smart life app, but its not working. So I would like to know if the information is received but not taking in account or if its not received so I try for nothing... Not too familiar with those api integrations...
Thanks!

Hi all

Thanks for the great driver @jonathanb

I’m very new to Hubitat yet I’ve been able to add my Fanco Studio DC smart Fan using this and fan control is excellent.

I cannot however turn the light on or off. I noticed others have had this problem and wondering if there is any solution

The child device is set up as generic component dimmer and when I try and turn on or change brightness I get the following errors:

dev:39

2023-04-06 11:04:11.524 AM error Unable to

determine off function code in [bright_value: [max: 1000, min: 10, scale:O, step:1, type:Integerl dev:39

2023-04-06 11:04:07.992 AM error

org.codehaus.groovy.runtime. typehandling.GroovyCastException:

Cannot cast object '10' with class 'java.lang.String' to class 'int' on line 611 (method componentSetLevel)

dev:39

2023-04-06 11:02:36.271 AM error Unable to

determine off function code in [bright_value:[max: 1000, min: 10, scale:O, step:1, type:Integer|)

dev:39

2023-04-06 11:02:35.242 AM error Unable to

determine off function code in [bright_value: max: 1000, min: 10, scale:0, step:1, type:Integer])

dev:39

2023-04-06 11:02:33.826 AM error Unable to

determine off function code in [bright_value:[max: 1000, min: 10, scale:O, step:1, type:Integer|]

dev:39

2023-04-06 11:02:31.034 AM error Unable to

determine off function code in [bright_value: max:1000, min:10, scale:O, step:1, type: Integerl

Any suggestions would be most appreciated

Hey. So It seems I've done everything according to the tutorial by OP. However I keep getting the permission denied event. When I enter the API keys and the tuya app login details and start the process - i get 'connected' for 1 sec and then the permission deny error. However no devices are added at all.

Is there a way to fix it..?

1 Like

Driver works great! Thank you.

If anyone is having a similar issue my solution was as follows:

I changed the fan dimmer to use @jonathanb ‘s local Tuya driver (see post 82, this discussion)

I then followed the instructions in the link below to get the data point (even though these instructions are for zigbee devices the principle is the same for wifi devices)

So far this has enabled me to get on/off control of light. This was always my primary aim. I may try and sort out the dimmer but that’s for another day.

Just a question if anybody could help! I have a vacuum robot that is installed within smart life app. I can see it and control it from HE and webcore, but I cannot see any capability from webcore. Those capabilities are listed inside the device but dont know how to be able to use it. Here the list inside the HE device. Those are not in the webcore list of the device. Thanks!

I have two HBN RGBCT string lights, Cafe Lights and Cafe Lights 2. And there are two devices that appear automatically and reappear if I delete them, Cafe Lights On and Cafe Lights Off. First I was trying to see if they work but got an error in the log, a cast error on line 414. So I added a toInteger() to it and the error is gone; "Integer homeId = dw.getDataValue('homeId').toInteger()"
But it still doesn't work and I'm wondering why the driver is creating these? I have a group in smart life for them, but I have a group for a pair of RGB led strip lights and there's no on off devices created for those, and I don't see them as devices in the Tuya cloud interface... So just curious what those are for.

Hi, first of all thanks for the drivers!

I've got a question though: I have some (Garza) Tuya Smart Breakers and with this driver they go on and off, but toggling doesn't seem to work. The toggle option will switch them on but not off.

Is there something I'm missing/doing wrong? Or, alternatively, could I achieve this some other way?
Thanks in advance!

Hi @Madalone ,
Toggle is not a standard Hubitat command. However, you can use the Hubitat app 'Button Controllers' to toggle the Tuya Smart Breaker from a physical or virtual button.

Thanks, sorted! :slight_smile:

I'm sorry if this has beeen addressed, but I'm a complete noob with Hubitat. I followed the instructions to create an account on the Tuya IoT Platform page, and that shows all the devices I have in the Home Life app. I copied the driver information linked on github into the Drivers code under Developer tools in Hubitat. I have the new C-8 model. I'm confused when it comes to creating the device. In adding Tesla Powerwall, I also needed to have a file created under Apps Code, did I miss that somewhere? When I go to Device, ad a new device and click on virtual, that's where I get lost with the instructions. Can someone please put it in a more exact step by step process for me please? I have 10 devices under Smart Life, including several fans w light kits and smart outlets. Do I need to create a device for each one, or is there a 'master' with everything else under it?

This integration does not use an app, it just uses a virtual device and then creates the actual devices as children under the main device.

So you add a virtual device and then select this Tuya driver as the "Type", press save. Then you should have the options at the top to log in, etc... Once you log in all the child devices will be created automatically.