SmartThings and SmartLife

I have set up devices in smartlife, and named each device. I connected SmartThings to these devices but some of the devices did not retain the name I gave them; when the given name is not used SmartThings names them all “outlet1”. I can eventually figured out which is which but why is the given name not used when the device is imported. The devices in question are all W3 gHome switches.

Thank you.

Naming between SmartLife and SmartThings is hit or miss. I just got a Moes (Tuya) ZigBee over Matter Bridge. All the ZigBee switches connected to the bridge show up with the name Matter Things and a Switch icon in SmartThings.

Be happy that your devices work with SmartThings. Many or most Tuya/SmartLife devices don’t integrate with SmartThings.

One thing to check. If you operate the physical switch or operate the switch from the SmartLife app does it’s state change in SmartThings. Many don’t.


@Paul_Oliver, Does only the switches come through to ST or will motion sensors, contact sensors etc. come through as well?

If you are talking about Tuya WiFi devices typically only some on/off devices like bulbs, plugs, switches, etc. will integrate with SmartThings.

Some contact and motion sensors have Alexa integrations, so you can use Alexa routines to link these devices to virtual contact and motion sensors created in SmartThings. But you will likely see some delays in operation.


Thanks @Paul_Oliver . One more question on the Tuya Wifi gas detector GS21 model. I understood from other posts that if I add this in Tuya app or SL app, it may not appear to ST so if I want SL to recognise a gas leak form the SL app and if this does not appear in ST, then how can I achieve this? I know I can create virtual switch in ST but don’t know what to do afterwards.

If they appear in Alexa, then I can use virtual switches to do the job assuming the detected and clear events are availabel in Alexa as triggers in the ‘IF’ condition.

If you create scenes in SmartLife they will show up as devices in Smartthings.

With the help of a virtual switch it almost acts like a real device.

Ok so if the scene runs, then the virtual switch in ST will be set and I can use this trigger in my ST routines?

Scenes only work for on/off devices no sensors, because they are one way. SmartThings can trigger the scene and change something in Tuya, but Tuya will never update the scene in ST.

1 Like

So, is there a way out at all?

I don’t think that will work because gas sensor are not Alexa triggers.

Not without out getting very convoluted and unreliable.

1 Like

Ok, is it possible to create virtual switches in the Tuya app and bring them in ST?

Yes you can. It is very convoluted and the status of Tuya virtual devices typically don’t update in SmartThings. So you would also need a API Rule or SharpTools Rule to refresh these devices every X minutes.



Sample refresh rule.

Thanks Paul. Do we just paste this in the Rules portion in the advanced web app and modify a bit to reference the device? Is that’s what called RulesAPI.

If we do it via sharptools, then it should be easy right as I am currently refreshing curtain motor status this way?

To use the Rules API you only need to paste the Device ID into the sample rule and change the time interval if you want. I use Notepad++ on a Windows computer to edit rules. Notepad++ is free.

To upload a Rule I use the API Browser+. I have tried to use the Advanced Web App, but I always get an error message.

In SharpTools creating rules is easy. The hard part in this case is settings up a reliable loop to run the rule every X minutes.

Noted your point on the refresh. By Rules API, I was referring to this screenshot.

Am I also right in understanding that the virtual device that should be referred in the coding should the one created in Tuya?

Also, if we create a VD in Tuya, will it just have on and off which denotes to gas leak detected or clear?

When I upload a Rule using the method you show I always get an error. I would assume that is because I am doing something wrong. If it works for you great and let me know the secret.

The virtual device you create in Tuya will likely be a switch or plug, so it will only show up as On or Off device in ST. You could link the Tuya virtual switch to a ST virtual gas detector in ST using routines. But every step you add increases the unreliability.

Keep in mind only a few Tuya virtual devices have ST integrations. And the only way to know is by creating the devices and checking. Also you can only create one of each virtual device in Tuya. If you try to create a 2nd one it it overwrite the original one breaking your automations.


I started using the Rules API here this week and it works OK. Have you taken into account that the code you paste cannot include the {name}, as that is entered in the UI?
Just an idea, but as we are accustomed to paste it all in the API Browser, its easy to forget.


Am yet to try that but I am assuming if I create a rule to run every x minutes, it will just run automatically right?