SmartThings Community

[RELEASE] Sonoff, Sonoff TH, S20, Dual, 4CH, POW, & Touch Device Handler & SmartApp ($5 & $10 Smart Switches)



Not sure what else to tell you other than trying Arduino IDE, compile, and flash then check the Serial Monitor to see what the device is doing.

With the exact USB device and switches I’ve checked out about 5 or 6 different firmwares with flashing back and forth with mainly NodeMCU and a bit of Arduino IDE.

(Max Tay) #1320

I’m trying this method on my Sonoff TH_V1.1 switch. I have got both the ESP8266Flasher.exe and the sonoff bin files. After running the exe file with the given config, the log shows that it sort of stopping at “Begin find ESP8266”. Two questions. 1. What are sequence of connections of the pins? 2. Do I have to hold down that button on the Sonoff switch when I start the Flash?

Many thanks.

(Max Tay) #1321

Thank you the post. I have received my 4 x Sonoff TH switches and 1 x Sonoff 4CH switch. Took me sometimes to sort out the firmware flash and got to the step on connecting the switch to my wifi router. Then I add SmartApp (Sonoff Connect) to discover the device. Also able to discover the device on Service Manager SmartApp. But after tapping on the discovered device on screen, Screen 3 showed up blank, i.e. no configuration fields are shown. Also tried to use the “Manually Add Device” function and with the same failure. Both the DH for Sonoff TH and also the Service Manager smartapp are created and published.


Is ST and the Sonoffs on the same subnet? And can traffic pass between them both?


If anyone wants to play with a version of the firmware with MQTT broker support on the Basic let me know and I’ll post up the code & binary. Finally had time last night to finish things and test a couple things. Pretty cool to see it all work between ST and HomeAssistant and a MQTT dashboard with no special bridges and all working controlling it.

(Max Tay) #1324

Yes, they are under the same subnet. How can I test traffic passing between them?

(Max Tay) #1326

happy to try.


Think the easiest way to test is to plug in to same switch as the ST hub and see if you can ping the Sonoff, then vice versa, get on the same WiFi as the Sonoff and ping the ST hub.

(Max Tay) #1328

I have to actually add a dummy device using the custom DH first. Then run the SmartApp and it works. So create and publish the DH itself is not enough. Thanks.

(Alex Hodge) #1329

Well I reflashed a switch this morning using the espeasy 2.0 flasher. Flashed successfully. Unplugged. plugged back in to boot back up. No activity on serial monitor (I think the baud rate is 11520, it is on the other firmwares I’ve tried.). Did the same with Tasmota, completely fresh stock firmware. Watched it trying to connect to the predefined APs on boot up. Did the same with espeasy 2.0 firmware. Watched it boot up and connect to my wifi. So, it looks like this firmware just doesn’t work on my switches. :frowning:


I do know Tasmota is 115200, this firmware is 19200 and mainly only talks while in AP mode. If your switches work with Tasmota it will definitely work with this firmware as it uses the same and less libraries as it is simplified. Have you tried redownloading the bin file?

(Alex Hodge) #1331

I re-downloaded this morning. I initially tried 19200 as you suggested and got nothing. Switched to 115200 because I knew that was what tasmota ran…I assumed it was the same since, like you said they’re so similar. In fact I thought both this firmware and tasmota are based on espeasy. I guess I could be wrong about that. I’ve been bouncing around on various sites and wikis reading various documentation and might be mis-remembering.

(Raymond Bradshaw) #1332

Hi, I had exactly the same problems with 6 new basic sonoffs, but I found this article which uses the expressif own flash software. The link is below and it is post #16. I think the flash mode DOUT is the secret. Just put the erocm1231 firmware where the Esp flasher can see it. I erased the rom first before flashing. Just copy the settings in the article. It works so quick and easy for me.

(Max Tay) #1333

Have a question. There is a setting for [Host Name] for the device on the [Advanced] page. What is that for - the device name? Or the wifi network name? Does it have to be unique between different Sonoff devices?

(steve grout) #1334

As far as i can see (only using one of the 5 basics i have) there is no DNS service running as even though its on my network it doesnt report its name, so my router AC-88u doesnt report it on the network list.

Its the host name or more to the point its the name you see when you directly access its web interface…i think…

Saying that… i tend to ‘fire and forget’ lol. With the smart app being able to detect IP changes it doeant bother me. I’ve not had a single issue with it.

The new smartthings plug however is another matter…only had it 4 days and it constantly drops off… The smartthings multi sensor that sits roughly 3 feet from it never had a problem with drops at all…in months…till i plugged this smart plug in. Grr

(Max Tay) #1335

Found a 2-Gang/3-Gang wall switch that also runs on eWeLink. Is there any firmware and DH built for these switches? Checked with seller and confirmed they use eWeLink app like Sonoff switches.


Never was able to get the momentary or toggle switch to work with my Sonoff Basic’s with this firmware.


Use the EspFlasher instead of command line. It does work.


How do you have the switches wired to your USB adapter? VCC to 3v, Gnd to Gnd, Rx to Tx and Tx to Rx?
Are you 100% sure they are sonoff basics?

(Max Tay) #1339

Got a QNAP NAS that runs QIoT which supports MQTT. Would love to test the MQTT enabled firmware.