Sonoff Smart WiFi switch integration

I know these can be integrated by flashing firmware etc. I am not up to doing all this. One my hands aren’t as steady as they once were , so soldering is out. Plus I don’t own a Windows machine. So since these work with Alexa, and IFFFT, I have to come up with a way to get these to work in SmartThings. I was thinking that a simulated switch with IFFT might work.

  1. Create Simulated switch? (Not sure if it needs to be momentary or regular)

  2. Open SmartThings app builder in IFFT

  3. Create (if) In SmartThings IFFT

  4. Crate (This) with eWiz on IFFFT

  5. Now the questions do I need a momentary os standard simulated switch?

  6. Do I need a WebCoRE Piston

2 Likes

Just setting up my own home automation system and I am not sure why you would want to integrate the Sonoff switch into SmartThings. I am using the Google Home and a sonoff switch and IFTT app.
Other than being able to control the switch using the SmartThings app on my phone what is the advantage? Just curious if I am missing something?

I would like to be able to automate it with WebCoRE etc.

2 Likes

Just to be clear…are you talking about this one?

This one.

2 Likes

I was thinking of doing something very similar and it sounds like what you want would work too. Here’s my plan once I buy a few. I could either go with webcore or stringify. As what I want to do isn’t too complicated, I’ll go the stringify route.

  1. Create a virtual on off switch
  2. Add the virtual switch as a thing in Stringify.
  3. Create a flow in Stringify. When my Arlo camera’s detect motion, trigger virtual switch/switches on then when the virtual switch is triggered on, IFTTT will then close the SONOFF(turning lights on) for x amount of time, then turn off virtual switch/switches which will then trigger another IFTTT rule to open the SONOFF turning my lights back off.

I will also create another virtual switch and tie it to another IFTTT rule to just turn on and off these lights without using my camera’s as a trigger.

This should satisfy my outside flood light I hope. I have 6 bases with 3 bulbs each controlled by relays, so I plan on putting these SONOFF’s on the other side of the relays, hopefully I wont need 6 of them, but we shall see, I am going to dig into it this weekend to see what I need to do.

edit: Follow these directions to create the virtual switch.

2 Likes

Because the Sonoff server is completely crappy, and having to route switch commands through China (or whatever) is bad enough when it WORKS. It’s horrible when it doesn’t, which is over half the time for me.

Instead of sending these back, I’m going to flash them to ST and have them controlled LOCALLY and reliably. No more IFTTT.

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