Sonoff Smart WiFi switch integration

Can I suggest asking a techie friend to flash them for you? Performance will be better, security higher, and reliability much improved - when you compare with the original firmware.

It genuinely takes 30s if you know what you are doing.

I got my 8 in the mail tonight. I decided since I had 8 if them to give it a shot in flashing one, it wasn’t too bad. I wish someone would update the directions and make it more clear. It’s a pain trying to read through a crap ton of posts and piece together the newest correct way. Anyways, I’ve decided to go ahead and finish flashing the rest probably this weekend. The fun part is going to be figuring it how to incorporate them into this mess that control my food lights :hushed::slightly_frowning_face:

1 Like

I use it with ifttt with satisfaction, the delay is 1 or 2 seconds.
I created 4 recipes for each switch:
above all I created a simulated smartthings switch
and on ifttt:
1 if switch simulated smartthings on, then eweelink switch 1 on
2 if switch simulated smartthings off, then eweelink switch 1 off
3 if eweelink switch 1 on, then smartthings switch simulated on
4 if eweelink switch 1 off, then smartthings switch simulated off.
In this way when I act on smartthings I command the switch, and if I had to suspend it from the ewelink application I can see the status change to that on smartthings.

2 Likes

Took me a bit to figure this mess out, but I’ve successfully made my flood lights smart, total of 18 bulbs (reg led bulbs) surrounding my house for about 20 bucks. My Arlo cameras can now trigger my flood lights. Loving it!

1 Like

@Scott2ya - nice - did you flash them with ESPEasy? What instructions did you follow in the end?

I did not use ESPeasy, I used nodemcu go to post 1130 and read the next few posts.

This video below has a list in the comments of all the tools and stuff you will need if you plan on soldering, which I would recommend. Along with the link to the sonoff.ino.generic.bin file you will need.

This video below I found to be the best as far as doing the wireing, soldering and putting the sonoff into programming mode.

This was actually a fun project. After I did the first sonoff, I let my 15 yr old son do the rest of the soldering, he was a natural.

4 Likes

Stringify lets you do some cool timer related stuff. For instance:

  1. You can drag the switch to a new flow and use it as the trigger (when the device turns on), followed by a x minute timer followed by the switch again (set to turn off). This way the switch will automatically turn off after x minutes (or seconds, etc) after it is turned on.

  2. You can drag a trigger (motion sensor, etc) to the flow followed by the switch turning on AND a timer (see above) followed by the switch turning off. This makes a timed switch.

HOw you made the Applet ?

Iam having samsung smartthings and it will trigger alert on intrusion when in Armed condition to IFTTT ,then from to eWeLink Sonoff 4 channel switch and it should activate one switch,this is what I needed .How I can make it.

how to do that? which sonoff switch you use?

how to do flashing?

Just been playing with Sonoff Touch and Tasmota firmware and there is a device handler which directly integrates with smartthings. No delay like when using IFTTT.
Works perfectly but is is on the intermediate to advance in building… fiddly as hell!
Works a treat. if you can read the wiki (read carefully for your device as there are potential problems) and are confident with electronics, it’s the cheapest Wi-Fi switch solution I’ve used.

Btw, you can flash sonoff devices without any cabling.
Have a look https://github.com/reloxx13/SonOTA/releases/tag/0.1b

Hi guys,

I have written a standalone device handler for the Sonoff basic if anyone is interested. When adding a new device set the Device Network Id as the device’s IP address.

It does not need a seperate app to update statuses and does not need parent/child handlers

4 Likes

Firstly, I have to say this should not be tucked away at the bottom of a thread but should have its own!! (Tried all the other methods before spotting this) Love the fact there is no parent/child handlers and no app to update status! I have successfully added a couple of sonoff touch units, and they work great so far. I have a few two channel switches and can see in the preference for the device I have to change a setting to “True” for a two relay device but can’t work out how I actually create the second channel? probably being stupid but could you advise please?

Thanks in advance

Hi,

I’m glad you like my handler, I’m not an expert at groovy but wanted something simple, which is what this is. For the 2R device, I realised that without creating a chikd you need 2 devices with the same ip address so the network I’d can not be used for the 2nd switch. I have made a different handler for the 2nd switch but as I wasn’t totally happy with it as a solution I didn’t put it on github.

I’ll dig it out for you when I get home.

Regards,

Mark

Hi Mark,
Glad it wasn’t me being stupid! I would really appreciate it if I could get hold of the handler. Have about 10 sonoff touch unit’s, couple of basics and even a wemos D1 Mini that I have added using your handler today and they work great.

Thanks

Hi

I have added it to my github repository, the 1st relay uses the basic with 2r selected and the 2nd uses this

You need to put the ip address in the preferences and make up something else for network id, doesn’t matter what, smartthings needs a unique id

Hope it helps,

Mark

Hi Mark,
Works great!! thanks for adding the second handler.Really good job mate, exactly the way I was hoping I could get my sonoffs working with Smartthings :slight_smile:

Great,

Glad someone else can make use of it.

Mark

Hello @joelw135, this is great job. Many thanks to you.
Only one question I have .

Could you update source code little bit to make an switch on smarthing as primary source. I mean that after physical device was reboted or power outstage get stage of smarthing switch status. Current implementation grab status of physical device and update switch status in smartthing. Is it possible to make vise versa?
As after power outstage I have to update all switches in correct state in manual or via smart app.
That will be good to have an update from smarthing to physical device (instead current implementation physical device to smartthing) as it primary source of data and control.

Looking forward to your reply.