[DEPRECATED]TuyaHubitat - (jinvoo, smart life, tuya smart - switches only)

IFTTT works on these but is subject to the normal vagaries of that platform (slow slow quick quick slow)...

In my experience the IFTTT integration with SmartLife is buggy.

The TuyaHubitat driver doesn't work as it is. I've looked at it and it's basically looks abandoned. It can work, I have played with and have made it work but yeah, it will always require a RPi

Indeed. I got rid of all my tuya devices. Last time I tried the driver was working well. However I found the insides of one of my powers trips melted and it continued to work like nothing was wrong. Made me a bit worried having it in my house with my kids.

Anyone know of Zigbee switches less than $15.00 ea? I use the tuya switches because they are $9.99 ea.

If you want a good repeater switch but just on/off control, no energy report, then the Peanut.

1 Like

@razorwing Thanks! I've had ST/HE for more than 2 years and never heard of Peanut. I have bricked 2 switches using Tuya-Convert and spent countless hours fighting IFTTT->SmartlLife.

Oh the HOURS and $$$$ I've lost to Tuya!

I sympathize, I have a bunch of the Tuya bulbs and other devices I used in HS. But I wasn't about to tackle them in HE.

I cant seem to find instructions on hoe to set this up on a Raspberry Pi.. Anyone have a link?

I beleive I was able to obtain the Device ID and key using WireShark on a windows server to sniff the network traffic.

Anyway I wanted to share for others who need this info as it seemed to work.

{"ip":"10.1.10.122","gwId":"4142186484XXXXXXXXX","active":2,"ability":0,"mode":0,"encrypt":true,"productKey":"lHjLKv5BXXXXXXXX","version":"3.1"}N'bñªU

I of course replaced some of of the digits with X's to limit having my information available to all but it was a simple process I started WireShark and then opened the smart app on my phone and turned some of the plugs off and on and then filtered the capture for the specific IP address of my device and looked at the capture and was able to obtain the info above. Can anyone confirm this looks like the proper ID and key? Just wanted to share for others since this seems to be the least painful way to obtain this info.

It may be were I have been searching through all the documentation I can find on this to get it up and working on my end or may be I'm just over looking something but how do I install the node.js server required to control these devices? Am I simply missing something?

If you're willing and able to do a little soldering, there are $5-$7 ea esp8266 based wifi switches on amazon that can be flashed with software developed by another HE user.

Here's a link to the my post on the modification of the outlet to prepare it to be flashed.

Mike

@kuzenkohome thanks for the info soldering has never went good for me.

Hello ALL
A lot of information on this thread but I still not know where to start.
I have some tuya plugs and switches.
As far as I understend I need and tuya api and some drivers. But where to start.

  1. Is here the latest api? GitHub - cwwilson08/tuyapi: An easy-to-use API for devices that use Tuya's cloud services
  2. for runnig this api I need a diffferent machine than my hubitat? If Yes I saw my synology nas can run a node js server. Whad do I need to install there.
  3. How can I test, I install my node js poperly
    4 Where do I find drivers for switches?

If any of you have time and willignes to make a short tutorila for this to work it will be realy appriciated :slight_smile:

Thanks a lot

2 Likes

Any ideas on getting the smart life wifi motion sensors to work?

Just a quick few questions: I've skimmed this stuff and I see there is a fair bit to learn. Before I dig in, I just want to understand if this does what I want. Namely, when you say "local control" do you mean that you are not depending on the manufacturer's cloud server at all? If you disconnected the WAN connection to the router it would still work? That's what I want.

I also wonder if you have found that all the devices work pretty much the same? I have an APC power strip and some Meross smart outlets that I got before I figured out that I really wanted Z-wave/Zigbee.

And finally (and feel free to take this offline or provide a pointer if you wish): Assuming the answer to my first question is yes, how the heck does this work? I would have assumed that these smart outlets had to create an SSH tunnel to their cloud server and the server would command them through it. Do they have a "side channel" that will come in from the local LAN also? Thanks!

OK, help a newbie out here. I've ploughed through all 196 posts on this and ...

  • I have node_js v10.15.2 on my Pi.
  • I have a list of my Tuya switches, their IDs, keys and internal IP addresses.
  • I have added the device driver to my Hub
  • TuyAPI_Server_v1.js is installed in /home/pi/node_modules/tuyapi/ and running
  • Test device set up

But when I send a command to the test device I get this:

IP: 192.168.0.141 sent command deviceCommand
deviceCommand sending to IP: 192.168.0.141 Command: on
(node:802) UnhandledPromiseRejectionWarning: Error: No connection has been made to the device.
at TuyaDevice._send (/home/pi/node_modules/tuyapi/index.js:224:13)
at Promise (/home/pi/node_modules/tuyapi/index.js:113:14)
at new Promise ()
at TuyaDevice.get (/home/pi/node_modules/tuyapi/index.js:110:12)
at processDeviceCommand (/home/pi/node_modules/tuyapi/TuyAPI_Server_v1.js:118:8)
at Server.onRequest (/home/pi/node_modules/tuyapi/TuyAPI_Server_v1.js:53:4)
at Server.emit (events.js:189:13)
at parserOnIncoming (_http_server.js:676:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
(node:802) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 30)

Feels like I'm so close - what am I doing wrong here?

Thanks in advance (and for all the work that's gone into this!)

Would it be possible to port any of this to HE?

1 Like

i have a bunch of plugs on tuya but im clueless on how to get started with this i don't know how to download the files help this looks awesome

Hi there. Thank you for the interest. Unfortunately this project has fallen way behind.

That being said there are some other great options such as flashing the devices to a tasmota or other firmware for a much cleaner/easier installation.

I will dig up some links for you in a bit.

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