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.
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.
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
Great, that works nicely now, thanks ![]()
Hi. I just installed this driver for a Tuya Dehumidifier (I installed the cloud driver from HPM, and manually added the component driver), the cloud driver gets the device, which reports humidity correctly, but when trying to operate it, I get a "Failed" status for the device "Publish by Cloud API" event, in the Tuya console device log ... I have a developer account, with expiration in August 2024, so that is not the problem...any clue why this could be happening? Thanks in advance for you help resolving this.
Checked the logs, and I see this error
2008 command or value not support
The instruction is not supported. Based on the Request Parameters in the API documentation, set a valid instruction.
This happens when I send any command from Hubitat, like Off, On, fan speed or humidity setting
Finally got enough time to try this. I have three Mercator Ikuu fans (fan + light) and they show up fine, but I get these errors (and maybe others):
dev:2112024-02-07 19:23:51.170errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '100' with class 'java.lang.String' to class 'int' on line 1492 (method tuyaGetDeviceSpecificationsResponse)
dev:2112024-02-07 19:23:51.166errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '100' with class 'java.lang.String' to class 'int' on line 1492 (method tuyaGetDeviceSpecificationsResponse)
dev:2112024-02-07 19:23:51.166errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '100' with class 'java.lang.String' to class 'int' on line 1492 (method tuyaGetDeviceSpecificationsResponse)
I don't know groovy enough to know how to check type and cast from the string containing "100" to an int.
Code is latest installable, says at the end of the comments:
* 01/24/23 - 0.3.7 - Support fan_speed_percent level
Ooh... control works, status doesn't, which would match the errors above - and not being able to convert string values ints
Edit 2: When trying the light half of the child device, I get a similar error but for a different part of the code - also not surprising:
dev:2112024-02-07 19:40:55.604errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '100' with class 'java.lang.String' to class 'int' on line 653 (method componentSetLevel)
