Tasmota Firmware on Sonoff using Brett Sheleski integration

Hi all, I am trying to get a Sonoff basic working with Smarthings, I have spent many hours on it with very little success, and I am about ready to through the smarthings controller away and build something else (just kidding…sort of).

Anyway, I have managed to flash the Sonoff using Tasmota and that all works exactly as I want it too. I have also followed to the letter the instructions found on this page https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/BrettSheleski/tasmota.src, and i cant get it to work correctly. I think there must be some information missing because I can’t work out how to build a relationship between the Tasmota Device Handler and the Tasmota-Power Device Handler

The instructions seem to end after you have added a Device (which appears to relate only to the Tasmota Device Handler). Anyway, I wonder if you can help with what appears to be the missing piece of information.
In case there is no missing information, and it just works via magic, then can you have a look at the screenshots below because nothing appears to be working. The first screenshot is of the Device Handler in the app on my phone. The information is not being populated with anything

tasmota device handler

The second screenshot is of the Tasmota-Power Device Handler. This doesn’t do anything at all. It just shows as constantly being on.

tasmota-power device handler

I would greatly appreciate you assistance with this.

1 Like

I didn’t use that firmware for my Sonoff basics. That seems over complicated with the whole parent/child device handler. I used these instructions here:

I had to use the alternate flash method (ESPFlasher) rather than the command line one, but other than that, they worked like a charm. Might want to give up on that firmware. It doesn’t look like it’s in high use. Otherwise, I would post on the GitHub page for the developer and see what he has to say there.

thanks Ryan, but if I may ask did you flash a Sonoff that has the latest stock firmware on it? I have tried the method described before but because I have the latest stock firmware on my Sonoff it dosnt work (No SSID created) I have seen in the thread a number of people have the same issue but I don’t see a solution.

other question. with this firmware can you still utilize the GPIOs on the device (GPIO 4, GPIO 14) this is one of the big attractions to the Tasmota Firmware they guy realy has thought of everything. Except integration with Smarthings.

Yes, with the firmware I posted you can. However, what most people don’t mention, you have to supply a pull-up resistor for the GPIO pin. So, a 10Kohm resistor between one of the 3V pins (there are a couple different options) and GPIO 14 is required. Otherwise, how can you tell if the button is pressed or not. Took me a LONG time to figure that one out. It shouldn’t matter what stock firmware is on your sonoff…you’re reflashing the firmware. So, if you’ve flashed anything to it, the stock is gone.

Thanks Ryan, I will give it a try

I flashed my Sonoff Bridge yesterday and am also trying to get Brett Sheleski’s Smartthings integration working. I managed to get my switches to work. Now I want to have the on/off buttons in Smartthings.

Figured it out: Had the ESPURNA 1.12 firmware loaded. Needed the TASMOTA firmware. Flashed the bridge with tasmota.bin, configured it as 25. Sonoff Bridge. And now it is working in SmartThings.


1 Like

I have been talking to Brett Sheleski, I now have a Sonoff working with Tasmota firmware, it works great, but the instructions need some work.

Anything you want to share so that others could benefit from your experience? I am going to be getting a couple more soon and I’d love to hear what you’ve learned.

No I thought I would keep it a secret :blush:

Yes of cause. But I need to write it up first because its a little bit of black magic at this stage so I need to get it clear in my head how it works and then I will provide instructions. I will let you know

Hey…i’ve seen people do that. You help them out for days and then they figure it out themselves and poof…gone.

yep so have I. its very annoying, I personally think the Tasmota Firmware is vastly Superior to anything else out there. so Im committed to getting it working properly and then letting everyone know how to utilise it. otherwise whats the point of putting all the effort in.

I have managed to get the Tasmota firmware on the Sonoff Bridge. Also integrated the Bridge in Smartthings and now I have indeed 16 devices in my list. I used a Kaku (Klik Aan Klik Uit) YCT-102 remote to ‘learn’ all Kaku power plugs. But all devices have 'button" as suffix, and not ‘switch’ as mentioned by Brett. The devices also act as a button which I can ‘Push’. So I have a seperate ‘push’ button for light on and a ‘push’ button for light off. That’s not what I want. I’d rather have a switch on/off.
I also can’t see these devices in the ‘Automation’ list. What did I wrong and what can I do about it?

By the way Brett: many Thanks for this!

Hi all. As promised here are my findings regarding the Brett Sheleski Sonoff handler using the Tasmota firmware. I have been discussing this with Brett over the last few days. Basically here is what you have to do.
Follow the implementation instructions as described here https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/BrettSheleski/tasmota.src
But something which is not clear is that you only need to add one Device that being for the Tasmota Device Handler, you don’t need to add a device for the Tasmota-Power Device Handler because once the handler starts working it will spawn the children buttons.
But here is where it gets a bit screwy. When I first installed it, the Tasmota Device turned up in my Smartthings app with all null values. I pressed refresh 6 or 7 times, but there was no change. It didn’t even show up in the log window which was unusual. After chatting to Brett, he suggested that I only use the IP address in the properties without any header or trailing slashes (http://) I also used the username admin and password that I configured in the configure other option of the Tasmota Firmware.
Once you have values appearing in the app the next thing you have to do it go back into the “My Device Handlers” and then I select the Tasmota handler to enter into the code window. I then select the Simulator option in the top right-hand corner of the IDE. Set my Home location, Selected the device as virtual and hit install. This will cause the Tasmota handler to spawn its children (it should not be this way but it is. Brett is looking into it).
But I am pretty unimpressed at the performance. It’s very slow and Brett told me that if the device has a state change triggered by something else other than Smarthings then Smarthings won’t know about it. He is working on a Node-Red implementation with an app to solve this. But this got me thinking, perhaps we are going about this in an overly complicated manner.
The Tasmotta Firmware is very highly geared towards MQTT so why fight that. I have Node-Red running in my environment and I can pretty esily install an MQTT broker to integrate Node-Red to the Tasmota. Then what I am going to attempt to do it is get SmartThings to talk to Node-Red via Webservices to triger an MQTT event. This solution should also work with Home Assitant as well given that a lot of HA users also use Node red because the Automation is pretty clunky in HA. If it works I will share with the world. If it dosnt I will disappear into obscurity.
I will let you know how it goes.

I thought you said that the Tasmotta firmware was far superior? @erocm1231 firmware is a lot better than this, especially for the sonoff basic. If you trigger with GPIO14, it show the update in ST. Works a lot better IMHO. Here it is if you want to try it:

1 Like

Thanks Ryan, appreciate your opinion. The trouble is with this firmware if you have a freshly minted Sonoff that has the latest factory firmware the @erocm1231 firmware wont work. At least I haven’t had any success getting it to load. After loading the SSID that is supposed to show up doesn’t so you cant finish the job. I have never had any difficulty at all with Tasmota, it just works straight away and the device performs as it should. The Tasmotta firmware is also a far more complete framework and caters for pretty much every scenario not just Smartthings, so if you want to do some really special things like for example use a Sonoff as a proximity sensor you can. So I don’t think that the gap here is Tasmotta, its more likely that the Handler is still buggy.

Yeah…but we are using SmartThings…that’s why we’re on the SmartThings forum. This isn’t the Sonoff forum. LOL The Tasmota firmware sounds like it works great with MQTT but unfortunately that’s not supported natively in ST yet. So, I’ll stick with what I got for now.

Brand new sonoff devices will flash fine, you just need to use the ESP download tool, ensure it is set to 8mbit and dout as the flash interface.

@Ryan780 I’ve already modified Sonoff Basic with wired magnetic sensor connected to GPIO14 + GND and resistor 4,7k between 3,3v and DATA
I would like to be able to use it as momentary switch with door open/close status, something similar like Mimolite

Is it possible to achieve it with ESP firmware and following this instruction: [RELEASE] Sonoff, Sonoff TH, S20, Dual, 4CH, POW, & Touch Device Handler & SmartApp ($5 & $10 Smart Switches)

Where I can configure GPIO14 to give me back status Open/Close ?

Device Handler for Mimolite is here: https://github.com/fortrezz/smartthings
Documentation: http://www.homecontrols.com/homecontrols/products/pdfs/FZ-FortrezZ/FZMIMO2US-Guide-with-SmartThings.pdf


or even to controll two garage doors

In the case of the Open close sensor, to control a garage door, you wouldn’t want the contact sensor to control the door opening. If reports if the door is open. Also, I don’t think the Sonoff will work for your use. The Sonoff is a 120v AC device and your garage door control circuit is 12v DC.

The build is similar to this instructable


I’m using my GPIO14 with wired magnetic sensor connected.
With Tasmota firmware I was able to successfully use it with Home Assistance, where I was able to see Open/Close status.
This modification is very popular in many platform OpenHAB, Domoticz, Supla.
The problem here is only with the Device Handler. Will be great if someone can help with modification of current code, and use something similar to “Mimolite” which is basically working on similar statuses.
I would like to have this in configured in SmartThings :slight_smile: