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

Damn Brexit!

Aye rofl

Managed to fix it. Not sure if the EU issues were at play but setting a static IP on the sonoff via webinterface and grabbing itā€™s macaddress which I then set manually on the device ID via Samsungā€™s website backend it (forgot the name itā€™s late) hit save and presto all works like a charm.

Canā€™t thank you enough Eric for the release of this. Had these sonoffs for a while wondering how to integrate them. MQTT etc. So much simpler this way now my active subwoofer (behind the sofa) turns on and off automatically with the tplink switch for the media center, TV and amp.

looks like they fixed the issues around the same time as i can now login to the smartthings app. lol.

Glad to see you resolved it.

Bravo erocm1231! Well done and much appreciated. Iā€™m sure a few of us will add in some things and give back to this thread.

2 Likes

Hi all, i am facing status of sonoff basic and 4Ch not updating to Smartthings when status is changed by physical switch or Sonoff web control.
I am connected to the EU server.
Is anyone having the same issues?

I wouldnt worry about it atmā€¦ at least until smartthings have resolved the EU issues.

I dont think youā€™ll have any issues once they resolve them.

1 Like

I was able to get the firmware to compile. I only had 3 errors, 2 of them were the same command:

// httpUpdater.setProjectName(projectName);

Quick glancing it looks like that was part of the OTA update process, not sure if it needs that project name as I havenā€™t tried to OTA update yet. The other error was

if (Settings.hostName[0] != 0) {
wifiManager.setHostName(Settings.hostName);
}

A bit of googling and a few posts on Git, I changed it to

wifi_station_set_hostname(Settings.hostName);

I was able to add it into ST and all without issue. Time to throw in some MQTT and see what happens.

3 Likes

Has anyone been having issues with the TH16 reporting temperature and humidity. I have had two of them working pretty consistently and updating a few time a day but now neither has reported for 2 days.

Getting them started initially was a trick as they are finicky but this is different. The switch side still works flawlessly.

Anyone ported these over to Hubitat yet?

Does Hubitat have MQTT abilities? If notā€¦ouch!! If so, then just use the Tasmota firmware.

If anyone is interested in a fork of this firmware with MQTT added let me know and Iā€™ll see about posting it once I get things ironed out. I was able to go through and follow the same logic design of adding in the additional variables, web screens and eeprom values along with succesfully connecting to MQTT pub and sub topics. I didnā€™t have time to finish the callback section to process the messages received and then messages sent. Iā€™m hoping to have it finished soon but I wonā€™t be able to test it on anything but some Sonoff Basics though.

1 Like

Iā€™ve had no luck with this firmware. After flashing the devices (Sonoff Basics) are basically dead. No lights, no reaction to button presses. They arenā€™t bricked, they just donā€™t do anything.

Iā€™m only able to flash this firmware successfully on my Sonoff Basics if I use the original method. NodeMCU flash method always times out at some point during writing flash.

These are all brand new just purchased from Amazon last week and have the newer branding on the boxes. I can flash the tasmota firmware using the esptool method as well. That firmware is moderately more successful in that the LED and relay function via button press, but no Wifi is presented.

The one firmware that works 100% for me is the new 2.x version of ESPEasy. The new flash tool they released also seems better than the older version used in this thread. The only problem with using the ESPEasy 2.0 is getting it to work with SmartThings. The device handler from this thread doesnā€™t seem to like it.

And now seeing that further development of this firmware has been abandoned, Iā€™m concerned that I wonā€™t be able to find a solution. Clearly something has changed with these switches, the devs of ESPEasy took it into account for their latest version. Maybe I should change my focus to the device handler and seeing if I can modify it to work directly with switches running ESPEasy?

Frustrated.

Hello, I have changed my wireless network and I need to integrate more sonoff touch equipment into the new network. Can you please help me with the information how to reset the network in order to set the new wifi credentials.

Thank you.

Guys, have some tried to Update erocm1231 firmare to Tasmota under the Firmware Update utility Homepage of the Device?

Any Luck?

Sounds like you need to use the NodeMCU flash method with DOUT. Also once it flashes and powers up hold the button for 10 seconds or so and let it factory default.

Development isnā€™t dead. The original author released the source code for others to carry on the torch. I am adding on MQTT support right now but any changes or fixes I can only test on the Basics. I donā€™t have the others to work on those. If someone wants to send me some for developmentā€¦ Well.

Yeah, like I said though the NodeMCU flash method fails every time while writing. It times out. Yes, using DOUT. It will begin writing, get success, success, success, etc. but at some point before it completes, it times out. I know itā€™s communicating with the sonoff because it succeeds in displaying the MAC addresses on the main screen. I canā€™t explain the time out while writing. Iā€™ve attempted it probably 20 times and double checked the settings probably 10 times.

Also, like I said the original flash method completes successfully for me. But the device is useless afterward. and I can successfully flash this firmware via the new flash utility from espeasy as well. But again, the device is useless afterward via that method as well. And yes, I tried the 10 seconds button hold down.

I canā€™t explain why this firmware doesnā€™t work at all, the tasmota firmware works a bit and the espeasy 2.0 firmware works fully. But thatā€™s where I ended up. I WISH this firmware would function properly because I bought 6 of these damn switches! :slight_smile:

Definitely something with your setup or switches. Have you tried flashing at a slower baud rate?

Thatā€™s what I thought too. I tried slower at some point. Iā€™m using the FTDI adapter that is linked to as the recommended part.


Tried a couple different USB cables including a fatty I have with a ferrite choke. No different. I downloaded the firmware a couple times to make sure it wasnā€™t an incomplete download. I definitely think there is something different about these switches. These are the ones I bought from Amazon.

They look just like theyā€™re supposed to inside and out. They have the new packaging styleā€¦Looks like the ones on the itead site:
https://www.itead.cc/sonoff-wifi-wireless-switch-1.html

Looks like exactly what I got except I have a 2 and 6 pack. Iā€™ve done both soldering in a header and just putting in a little piece of a header into 4 header wires and put in the 4 holes and let it flash. Not sure what else to try except, have you tried to fire up Arduino and turn on the serial monitor on the port while the Sonoff boots? I believe the baud rate for this firmware is 19200.

Maybe try this method? https://www.youtube.com/watch?v=MOEmVYn4I8A

Yes. That video covers the 2.0 espeasy flasher I have referred to. Works every time. Using the firmware from this thread I still end up with a non-functioning device. But I can flash various firmwares onto the sonoff using this new flasher with 100% success rate. The only firmware that actually functions 100% on my switches is the espeasy 2.x firmware.
Can you elaborate on the serial monitoring you mentioned? Do you mean using the arduino IDE?