Tuya/SmartLife Plugin

Posted on
Sat Feb 18, 2023 7:04 am
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Tuya/SmartLife Plugin

I just uploaded a plugin for monitoring and control of Tuya/SmartLife wifi devices. It currently supports wifi temperature/humidity sensors and wifi smart plugs.

You'll need the Tuya app on your phone (with your devices added) and a Tuya developer account to use this. The Tuya developer environment is huge and a bit scary, but I found a video which should help. Follow the instructions in the video to link your Tuya phone app to your developer account so that the plugin can see your devices in the cloud.

https://www.youtube.com/watch?v=qVZJyHJsF9A

Devices must be manually created in Indigo; you'll need the virtual ID for each device (available on the app or in your developer account).

Posted on
Sat Feb 18, 2023 11:04 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Tuya/SmartLife Plugin

Great, thanks for another plugin contribution!

Image

Posted on
Mon Feb 20, 2023 8:40 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Tuya/SmartLife Plugin

Which is the temp Sensor?
This one? GUUTOP 3 Stück Tuya Smart Wireless Temperatur, Hygrometer Indoor WiFi Room Temperatur-Luftfeuchtigkeitssensor mit App-Aufzeichnung, funktioniert Alexa, Google Home https://amzn.eu/d/c5SPC63

Thanks

Posted on
Mon Feb 20, 2023 9:53 am
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Tuya/SmartLife Plugin

Any wifi temp/humidity sensor compatible with Tuya/SmartLife should work.

Posted on
Tue Feb 21, 2023 5:08 am
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Tuya/SmartLife Plugin

New version now in plugin store. Supports Tuya/SmartLife bulb on/off and brightness adjustments. Colour settings coming soon.

Posted on
Wed Mar 08, 2023 11:29 am
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Tuya/SmartLife Plugin

New release supports mm wave presence detectors, smart IR transmitters and bulb colour settings.

Posted on
Wed Sep 20, 2023 7:25 pm
freshwuzhere offline
Posts: 105
Joined: Apr 05, 2012

Re: Tuya/SmartLife Plugin

Hi,

I had started writing a tuya plugin when I saw yours! Thanks! It appears to work OK for what I need ( turning on and off on a schedule).

I am running version 2022.8.1 with indigo 2022.2.2 on a Mac mini. NOTE just upgraded to your plugin 2022.9.0 and still getting same error although info message string has more data like lat and long. {'code': 'colour_data', 'value': '{"h":328.0,"s":178.0,"v":255.0}'}.

Device I am running are rgby string lights I bought from Costco (don't have the name). They work fine on the tuya app - except the wifi reception seems a bit weak - but it generally is effective when driven from tuya,

I keep getting these error messages on both string lights - which seem to fetch up the color settings.
___________________________________________________
Tuya Device states for Bulb String Lights 10.0.0.22
Tuya {'result': [{'code': 'switch_led', 'value': True}, {'code': 'work_mode', 'value': 'scene2'}, {'code': 'bright_value', 'value': 255}, {'code': 'temp_value', 'value': 32}, {'code': 'colour_data', 'value': '{"h":328.0,"s":178.0,"v":255.0}'}], 'success': True, 't': 123456789123456, 'tid': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}
Error updateStateOnServer() caught exception: LowLevelBadParameterError -- device value type for state key brightnessLevel must be integer
___________________________________________________
I obfuscated the ID etc.

Seems the HSV values as floats isn't as expected? Anyway - no problem at my end because on and off work fine and that is all I need - if I need colors - I'll use the tuya app.

Thanks for saving me the trouble of writing!

Ian

Posted on
Wed Sep 20, 2023 11:25 pm
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Tuya/SmartLife Plugin

The string lights seemingly don’t return quite the same data as the colour bulbs which the plugin supports. Ideally the string lights should be given their own device type.

If you could use the Tuya developer website to query the device properties and the instruction set and PM me the details I could add a new device type. (Unfortunately there’s no way I can access that information without either buying the same lights or accessing your account. )

Posted on
Mon Mar 18, 2024 11:12 pm
freshwuzhere offline
Posts: 105
Joined: Apr 05, 2012

Re: Tuya/SmartLife Plugin

Did you get this information? I have the same error clogging up my logs - I can get the data for you or I have the Tinytuya package running on my Mac and run anything you like there too.

Posted on
Mon Mar 18, 2024 11:25 pm
freshwuzhere offline
Posts: 105
Joined: Apr 05, 2012

Re: Tuya/SmartLife Plugin

Ohh and error says

updateStateOnServer() caught exception: LowLevelBadParameterError -- device value type for state key brightnessLevel must be integer

Version 2022.10.0

Indigo 2023.2

Thanks

Posted on
Mon Mar 18, 2024 11:36 pm
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Tuya/SmartLife Plugin

Same Problem here

Posted on
Tue Mar 19, 2024 12:14 am
racarter offline
User avatar
Posts: 477
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Tuya/SmartLife Plugin

I just got your DM. Are you doing anything to the device when you get the error message? If not, try the update in the Plugin Store.

Posted on
Tue Mar 19, 2024 10:57 pm
freshwuzhere offline
Posts: 105
Joined: Apr 05, 2012

Re: Tuya/SmartLife Plugin

I get one of those error messages every 20 seconds for each string light device……

It’s in the log so it can be ignored fairly easily……..

Posted on
Thu Mar 21, 2024 12:38 pm
freshwuzhere offline
Posts: 105
Joined: Apr 05, 2012

Re: Tuya/SmartLife Plugin

MarcoGT wrote:
Same Problem here



HI Marco,

My errors have disappeared - have yours? I went to the developer website and looked at a couple of devices - I don't know if that had anything to do with it?

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests