Because of security concerns with the Tuya App that normally runs these plugs, I wanted to flash them and see if I could get them to work directly in SmartThings without IFTTT integration.
This is based off work from lots of others.
First you need to reflash the device. I used this method.
There’s a Youtube Video with instructions
I then used this video to help me figure out the IO assignments
My device handlers are based off
I chose to make seperate device handlers instead of using child devices. Just preference.
TMRLifeFull.groovy - This combines both the plug control and control of the RGB ring light in one device.
TMRLifePlug.groovy - This controls just the plug
TMRLifeRingLIght - This controls just the RGB ring lights
You can have more than one device in SmartThings for each plug. When adding the device in the SmartThings IDE, simply edit the preferences to the IP address assigned to the device.
With slight changes, I’m sure this could be used for many other devices flashed the same way. See the tuya-convert wiki regarding which devices have been successfully flashed.
I got this working, but updates from device on/off via: Tasmota UI, or device Button take a long time to update. Even when I use ST App for on/off it dosn’t update, but maybe does 1-5m later.
Edit
So I noticed that your TMRlife-plug.scr had all the stuff in it for the red and blue led, which mine outlet didn’t have, I commented out that stuff which helped. There’s still is times where it doesn’t get the update via St app, and updates through the device always take some time.
Not sure if that’s just the way it’s going to be or there’s anything that can be done to help that.
The delay you’re talking about is mentioned in post 3. The way to make it real time is by using a Mqtt broker. I’ve not done that at this time. I only poll every 5 minutes.
FYI, I’ve started updating the device handlers to work through the SmartThings REST API and MQTT messages. On the MQTT side I wrote a Windows Service as I’ve been a Windows developer for so long and not really into Linux stuff. When used together the devices are updated real time.
If anyone’s interested I’ll put it on my GitHub page.
I have a question regarding your DHT :“tasmota-rgbw-bulb” .
I’ve managed to flash one ESP8285 chip for use of a led rgbw strip with latest tasmota firmware.I can control the colour from the local website of my Arilux RGBW controller.
Can you tell me if your DHT would work with my setup?
Yes it would work, but you should understand the limitations.
If you just use the device handler alone, you can Control the device from Smartthings. However if you control the device using Tasmota or other interface, it can take a few minutes to update Smartthings with the status.
If you want it all to work real time, you would also have to use my Windows MQTT service.