Splenssy/Tuya USB Smart Plug Local/Cloud Integration?

I've been looking around, and it's hard for me to determine what is the latest and greatest in Tuya integration.

It seems as if there's an alpha cloud driver, and a partial (?) local driver.

Local would be great. I've read of @jtp10181 working on a dual, local/cloud version.

The device in question is just a simple relay that controls usb power.

Could someone point me in the right direction?

Thanks very much.

I assume you found this already? Discussion of local control of Tuya Smart Wifi devices without flashing firmware

I am still using my hybrid cloud/local setup.

For something simple like a relay it probably only have one or two commands to turn on/off and that's going to be it. You could probably use a custom local only driver for it.

The down side of the local driver seems to be is it only supports one connection, so if you use the Tuya app at all, or possibly even Alexa via Tuya cloud it is unreliable.

I can dig up some further info depending on what you want to try.

Yes, thanks. It was a few months ago...maybe something changed/got better, whatever.

I'd like to keep both cloud (using Tuya app) and local options open, kind of like the Kasa integration.

I'll start from scratch on that link and see what happens.

Thanks.

Let me just sum it up for your quick, with my latest stuff.... please hold.

I made some of my own mods to the cloud driver, I think there have been some further updates to the main code since and I have not updated mine. I think it would work either way. First thing to try would probably just be the main user created cloud driver.

Original: [BETA] Tuya Cloud Driver (Limited device support)
My Mod: TuyaOpenCloudAPI fixes for setting level on RGB light strip · GitHub

Your device will have to be linked to the Tuya or Smart Life app, a white label branded app I do not think will work but you can easily switch the device over to the other apps.

That driver will create a child device for each device on your account.
If your device acts like a normal switch it may work out of the box.

From there, the dev has some child drivers you can swap the child device to and get some local control while still using the cloud as backup. Found here: hubitat-public/Tuya/Local at main · bradsjm/hubitat-public · GitHub You need the driver and library.

The switch one may possibly work for your device. If the "DPS" codes are different, it may take some poking and modifications.

I made some modifications to the RGB local driver to support my LED strip DPS values and I also made it cache the heartbeat to reduce the load on the hub.
Driver: TuyaLocalRgbLight.groovy · GitHub
Library: TuyaLocalRgbLight.groovy · GitHub

2 Likes

This appears to be a WiFi controlled device that would be controlled using a Tuya app on your phone or a voice assistant. While many Tuya Zigbee devices work directly with Hubitat, I do not know if anyone has tried to create a link with the Tuya app.

If you are trying to control the time your cell phone charges, I would suggest you get a Zigbee 3.0 smart plug. The plug can be connected to Hubitat. Then plug a 120 V to 5V USB charger into the outlet of the smart plug. If you are trying to control something other than a charger, this may or may not work.

Thanks very much for the summary.
I'll get on it and see what happens.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.