[BETA] Tuya Cloud Driver (Limited device support)

Hey, did you find any solution for the camera? @Angus_M @jonathanb ?

Hi Guys, i'm completely new to this thread and its a very long one. i'm just beginning to set things up from post 1, point number 3. It's a brilliant piece of kit and thank you!

2 questions, where do i find these settings below? Secondly, it appears that groups of lights set up in Tuya don't appear in HE. If I set a group up in HE by using the Tuya devices, what would be the best driver to use. NB these are RGBW wall lights branded as Atomi but are actually Tuya https://www.costco.co.uk/Garden-Sheds-Patio/Garden-Decor/Outdoor-Lighting/Atomi-Smart-WiFi-Wall-Light-Pack-of-2/p/413762. Many thanks and appreciated... Stu

Is there anything I can do that will enable someone to help me add functionality to this driver for the Oil Diffusers that are commonly used?

They have the following functions:

LED - Switch On / Off
Spray - Switch On / Off
Spray Mode - Switch Large / Small

As it stands this driver will switch on/off the LED - is there a way the other functions can be added?

Device Status shown if it helps.

Thanks.

Hi,
I used this for a while with tuya app and smartlife app. But now my smartlife do not work anymore. I click initialize but it tell me: Cloud API request failed: {"code":1106,"msg":"permission deny","success":false,"t":2423525252,"tid":"235243gfd25252wer"}
The tuya still working... anybody with the same issue or an idea on how to solve it? My tuya account is up to date with all autorization that I renew each time!
Thanks!

Ok, I found out that if I create a new device from the start, it discover child devices and seems to work fine... So I turn the question like this: Why my parent device stopped working? And is there a way to replace old child devices with new one where its used, like webcore? One by one is a little too long and they have the same name so hard to choose the right one and I m not sure if I remove one device and allow the other if it would keep the name or if I wont be able to know wich device it was within pistons...

little question, I would like to add healthcheck capability to child device and I just dont know where to start, can you tell me what you think about it? Is it a possibility ?
thanks!

My Tuya devices had been working fine, but they now periodically fail with the Tuya virtual device status showing as "error." After I hit "initialize," things start working again.

I'm trying to make a rule that says when the Tuya virtual device shows error, trigger initialize. However, while the Tuya virtual device shows up under possible triggers, I can't figure out how to choose it as an action. I select "run custom action" and then look under "select capability of action device" for Tuya virtual device, but it's not listed. I had thought every device is listed under "actuators," but it isn't there, nor can I find it in any other category. Any advice?

EDIT:
Well, it hasn't shown an error for a few days, so maybe the issue was something transient on the server side. I still haven't found a way to have a rule trigger initialization of the Tuya virtual device, but I can at least have it send me a notification if there is a persistent error state.

You are trying to run the Initialize on the main integration driver I assume?
Edit the code for the integration on the hub. Near the top of the code in the metadata section, add the Actuator capability right by the Refresh and Initialize ones so it looks like this:

        capability 'Actuator'
        capability 'Initialize'
        capability 'Refresh'

Then you should be able to use RM to run a custom action.

1 Like

Mine doesn't show as an actuator either (or any other type). I use refresh instead of initialize and it works for mine.

jtp10181--thanks for this! Adding "capability 'Actuator'" worked great.

And also thanks to CaptWoody for your solution--it's apparent that this occasional Tuya error doesn't just happen with me. You also taught me that there is a "refresh" command in the drop-down list, which I hadn't noticed before.

1 Like

Hello - thank you for this amazing driver!

I set it up with a Tuya IoT API account, and I am able to see wifi sockets and I can control them. It even discovered a scene that I had in the Tuya app to turn a switch off and back on (to ring a doorbell). However, when I call the scene from Hubitat, nothing happens.

In the log, I see this when I push "On":
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '183055106' with class 'java.lang.String' to class 'java.lang.Integer' on line 432 (method componentOn)

And this when I push "Off":
Unable to determine off function code in [:]

Are Tuya scenes supported? I am really not sure where to find that bug - line number 432 of what file? (I'm new to Hubitat... and smart homes in general).

I do understand that I can create the same scene in rules engine in Hubitat, but it would be great of Tuya scenes worked properly as the auto-discovery is super handy.

Thanks!

Well, it looks like I half-solved the problem. I noticed the "homeId" value was really large - 9 digits long - so I figured it probably couldn't fit in an integer. However, instead of changing to BigInt or similar, I simply changed it to String since it is only used in the scene URL anyway. And now... the On button works! It runs my Tuya scene!

Change from:
Int homeId
Change to (everywhere):
String HomeId

Also change it in the triggerTuyaScene function.

Now, and this is more subtle, what do I do with the Off button? It doesn't work, and it probably shouldn't since it makes no sense to turn "off" a scene in Tuya, which is really just a routine. So what driver should I use instead that only provides a push button instead of on/off? And would that require changes in the Tuya IoT driver code?

Thanks!

any word if cameras are supported?
have 2 cameras that for some reason the native tuya/smart life skill in alexa can only pick up one, so looking for backdoor route.

No cameras are supported in this driver.
What can you do with a camera in the Smart Life app or in Alexa? (other than viewing the video stream)?

I want to be able to stream them

Hubitat dashboards do not support video streaming.

Don’t want it on my dashboard. Just want to be able to expose it to my echo show so I can see what’s going on. Similar to asking it to show your doorbell

I have my Ring doorbell integrated this way to Echo Show 5, but Ring and Alexa have a good internal integration... I am not sure if the Tuya Skill in the Alexa app is capable of doing the same.
In all cases, this driver will not be a part of this integration, it doesn't handle video cameras.

I was able to view cameras up until recently. There must have been an update because all the negative reviews for the skill are recent now.

Would love if cameras can be exposed. Is it complicated?

I get this in my log "DryFy Connect driver not found, try downloading from https://raw.githubusercontent.com/bradsjm/hubitat-drivers/main/Component/Generic Component DeHumidifer Device" But that link gives a 404 error. I am a manual installer I don't use HPM if that makes a difference.

When a child device is set up, do they appear as collapsible entries under the parent? Just to make sure I look in the right place for their successful creation

Hi Inge,

You need to manually install the component driver from here :
https://raw.githubusercontent.com/bradsjm/hubitat-public/main/Component/ComponentDehumidifier.groovy

1 Like