FAQ: Tasmota Integration in 2020 (for Tuya SmartLife devices)

I’ve notice a lot of questions regarding Tuya wifi devices lately and thought I’d throw together this FAQ for Tasmota. Work in progress.

There are many devices using the Tuya Smart Life App that can be flashed with Tasmota.

The easiest way to flash them at the moment is using Tuya-Convert

There are various ways to integrate into SmartThings. A few are listed below. Most of them require that you setup your Tasmota devices with static IP Addresses. Some will require a MQTT broker for sending updates back to SmartThings.

Brett Sheleski
The original as far as I can tell. This one requires static IP addresses and uses a smart app which discovers and creates child devices for each Tasmota device.

Eric M
This one is popular and has been around since 2016. It uses a smart app and has the ability to discover devices.

Davin Dameron
Based off Brett’s work, this one eliminates the Smart App and child devices. Instead the devices are added manually in the SmartThings IDE. In its simplest form, it can use polling and no other software is needed. However, in this arrangement any events that happen at the device can take up to 5 minutes to show up in SmartThings. If you add in the MQTT Broker component, updates become real time and a static IP is not required.

Hongtat Tan
Like Brett’s, this one uses a smart app that creates child devices. It also requires a static IP.

5 Likes

I got one more… MQTT based and the key was to do a rule on each of the Tasmota devices to SUBSCRIBE to topics that the bridge uses/expects. The problem is that a rule subscribing to an MQTT topic will not work unless you compile Tasmota yourself. I simply used the the GitPod method that is documented on the Tasmota webiste and enabled MQTT then downloaded my custom firmware. Downgrading to minimal Tasmota is a key middle step, then I finally got my firmware on the device. After which this command was executed on the console of each device I was setting up:

Backlog Rule3
  ON mqtt#connected DO Subscribe rcvMQTT, smartthings/%topic%/switch ENDON
  ON Event#rcvMQTT=on DO Power1 1 ENDON
  ON Event#rcvMQTT=off DO Power1 0 ENDON
  ON Power1#state=1 DO Publish smartthings/%topic%/switch on ENDON
  ON Power1#state=0 DO Publish smartthings/%topic%/switch off ENDON
; Rule3 1; friendlyname1 Extra_Eco_Plug; devicename Extra_Eco_Plug; hostname Extra_Eco_Plug
; MqttHost 192.168.0.111; MqttUser mqtt; MqttPassword mqtt; Topic Extra_Eco_Plug; SetOption53 1
; template {"NAME":"Eco Plugs RC-028w","GPIO":[0,0,544,0,0,0,0,0,0,32,0,224,0,0],"FLAG":0,"BASE":18}; Module 0
; Restart 1

I used Device Type Handlers in SmartThings as my virtual switches — just re-used my old handlers and the key for them is to RECEIVE messages which is missing in the generic ST templates in the IDE. This Tasmota rig seems to work pretty rock solid. Here’s a link to the Groovy code for ST. I’m only showing how it’s done with a switch per the above Tasmota config.