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

What smartapp are you using? link? Had a TH connected but no temp showed

I had an issue today adding standard Sonoff basic switches. The smart app gave this error after they had been discovered: “Error- bad state. unable to complete page configuration.”

Using live logging I tracked the issue down to the device IDs already existing - these sonoffs were already in my account on an old, dead, hub that had been sent back to Samsung and replaced. I had to go into the old hub in the IDE and delete all the previous sonoff devices from there first.

The I could add them successfully using the smart app.
Glad this is still working a few years since I last was here! Cheers Eric.

Great video, was going to try flashing a th16… Anything special for that?

Did you every get an answer to this? I am having the same issue and cannot find an answer.

Did you ever get the Auto Off to work? I am having the same problem and have not found a solution.

I could not get Auto Off to work with the app, but by using the IP Address of the devices, I was able to access the configuration menu. Under Advanced, I could set the Auto Off value, Save and Reboot. All through the web interface. This worked great.

I am working with Sonoff Basic (Sonoff RF R2 Power v1.0). Perhaps the Sonoff.ino.generic.bin is not appropriate for this to with SmartThings, but every other aspect of it does work.

Thanks for all the great work making this available.

1 Like

Hi everyone.
I flashed a Sonoff Dual R2, it connected to wifi, the connect app recognized the device but the relays are not working. I tried to reflash it but can’t connect anymore with esptool.
I’ll apreciate any help.

@erocm1231, I’m guessing you haven’t yet modified the f/w for the POW R2, right? I tried your posted POW f/w on the R2 and it doesn’t seem to report power in the web interface, so I wouldn’t expect the DTH to display power stats.

Hi @erocm1231
thank you for your great work, I have 2 Basic working fine.
I’m having trouble with a Dual R2, everything seems ok, I can swith on/off with the app but tha relays do nothng. Could you take a look at the code?
Yhank you!

First I would like to say hello to everyone on this board, I just became new user of smartthings hope it was good choice.

Second I would like to buy a beer to erocm1231 for this sonoffs DH.
I just changed soft in old sonoff basic and it works perfect, also change soft to old sonoff touch but I dont have N line so cant test it at the moment.

Now Im thinking to buy latest model of sonoff touch with square touch field, anyone tested if it works with erocm1231 soft?

Thanks in advance for any answer!

Work with this:

1 Like

Hi @erocm1231

I have a few sonoff switch and one sonoff touch
they are all configured the same way and connected to my ST hub with similar methods.

I have no issues with switches but my sonoff touch loses the synchronization with Hub sometimes.
I don’t know what triggers the problem (maybe an electricity cut) but when it happens,
Hub can always control it but Hub doesn’t know the state of the device sometimes.
If I turn on/off sonoff touch manually the state of the device does not update on the device tile.

I checked the IP and port (39500) configured on the device, they are correct.
Is there a different firmware for Sonoff touch ?

what else can I check ?

Two days ago my sonoffs disconnected, I noticed they had been assigned to a new ip on my router, but I thought this firmware didn’t need static ip address, but would find the device somehow else?

Anyway, i got a popup in the app saying something like “you need to download something something… sonoff” with a download button. I clicked the download button and the dialog dismissed. When looking at the device UI in the app (the new app) also looks different, before there was a big round power button centered, now instead there is a section with the status “On” and a small power button to the right. I’m not sure if this is because of that download thingy, or if the actual smartthings app had an update that impacted UI, just wanted to mention it.

I have tried to add the devices again since they were no longer working, but the newly added devices also behaves odd, they report online, and “On” at all time, even though the sonoff has the relay switched off, and when i press the power button the loading spinner just spins for like half a minute until it stops and nothing happens. The two previous devices are reporting offline.

Anyone else experiencing anything like this or have an idea what might be going on?

Two days later…

Still no success. I have tried almost everything imaginable to get them back working again. Only thing I didn’t do yet was reflashing the sonoffs…

I have deleted all the smart apps ganerated, I have added a new one and configured it exactly like I did the first time when they was working.

This is what it looks like when i press the power icon button.

Please guys. I need help with this :sob: can someone at least confirm that their devices are still functioning normally? Thx

Thank you for that info!

I successfully flashed the FW, connected the TH16 to SmarThings and can see and operate it as a switch. I also bought the temp/humidity sensor and have that attached, but I cant figure out how to get the temp to display. I installed the erocm123 “Sonoff Wifi Switch” DH, and as I write this, i am guessing I have the wrong one installed?

It appears maybe i downloaded the wrong firmware. I used FW from the latest post, the SonoffDual
and now I see in this 2016_10_14 Update : there is FW and DH for the temp sensor. @erocm1231 Can I flash the correct FW OTA? Or am I better off deleting from ST, and starting over? Maybe I just need the right DH?

EDIT 2/27: I added the TH Device Handler, removed the switch from ST and re-added. The options were now available to select the AM2301 temp sensor, but the Classic App doesnt show any temp or humidity. In the IDE, I dont see any temp or humidity data either. Thoughts? Bad Sensor?

Has there been an update to the DH or Sonoff Connect for the new app? Under settings unable to adjust some parameters.

Eric, did you ever get the firmware for the Sonoff 4CH Pro R2 written/debugged/finalized?

I’m talking about this one: https://www.amazon.com/Sonoff-Interlock-Generator-Self-locking-Wireless/dp/B0793NYYPZ/ref=sr_1_2

I’m trying to reduce the number of wall control panels in our house and am thinking of tackling a HVAC project (heat/cool/fan relays).

Currently I have four Konnected.io temperature/humidity devices (upstairs/main/basement/outside) that post their values to the SmartThings hub (and display on ActiveTiles) but would like to write an adaptive thermostat smartapp/device handler to allow optimal control.

Here’s a shout out to you! I have four of the reflashed single channel Sonoff’s and they work wonderfully with SmartThings!

Anyway just let me know about the 4-channel firmware / groovy driver - thanks!

Recently, I had a power outage, and my basic Sonoff Wifi switch forgot its config. Upon reconnecting to its AP and trying to join it to my network, the device never switches from AP mode to client mode (IOW, it doesn’t even seem to attempt to join my network).

I even tried reflashing with the most recent build of the firmware (since the commit says “fix for settings not saving”), but no luck. I will note that the password does have a special character in it, but that didn’t seem to be an issue before.

Could this power outage have hosed my device somehow, even though it’s taking the firmware?

Edit 1: Looks like it was the password. Once I removed the special character from my AP, both of my Sonoff devices (I also tested an unopened one) were able to connect. This seems like a regression, but I’m not certain.

Edit 2: When entering the password in the box, it’s passed to the /wifisave endpoint urlencoded. Changing the URL manually to my character (! in this case) allowed me to update the password properly. I probably did this before and forgot. That was a fun re-learning experience… :slight_smile:

Check the IP address of the device now. It probably changed after the device rebooted. You need to assign a static ip address in your router.