Home automation - cheap wifi switch

Soldato
Joined
16 Oct 2007
Posts
7,418
Location
UK
If any of you are into home automation, I've just discovered the 'Sonoff wifi switch'. Costs $5.

wubhfrJ.jpg

Really simple to wire in - took a couple of minutes. The setup was a breeze - use the app to input your home wifi details, update the firmware automatically, and it's done. It works using the app, and also with Alexa. I intend to flash the firmware to get it working with smartthings - for $5, this is finally at a price point I can automate all of my plugs.

(Bought it from Aliexpress, took a few weeks to get here)
 
Soldato
OP
Joined
16 Oct 2007
Posts
7,418
Location
UK
That's a great idea.
It goes in line between plug and device, not socket. So i wired it in to a lamp. Most UK plugs are 13amp so nothing that would push it. Most uses seem fine.
 
Soldato
OP
Joined
16 Oct 2007
Posts
7,418
Location
UK
Mine have been flawless so far, working well with Alexa. Also has state feedback so it knows if the switch is on or off
 
Soldato
OP
Joined
16 Oct 2007
Posts
7,418
Location
UK
Any chance of writing up a guide on how to get these working with alexa etc?

Just wire in the device to your power cable. Use the app to discover the switch, input your home wifi details, then it's done. Alexa picks it up natively.

That looks like its only got 2 wires, so live and neutral only? Or is there an earth at all?

Hard to tell from the picture, how large is it? 5cm or so long?

Yes, about 5cm.
Two wires - live and neutral. I've only used them on lamps so far that also have live & neutral. For earth wire, just feed that through passively in the case without cutting
 
Soldato
OP
Joined
16 Oct 2007
Posts
7,418
Location
UK
Had a reply from Big Clive

"Hi tres, I have a Sonoff switch here, but have never got round to making a video on it. The one I have looks like a reasonable design."
 
Soldato
OP
Joined
16 Oct 2007
Posts
7,418
Location
UK
Well i've got half a dozen wired up around the place now. They work brilliantly.

This weekends job - flashing firmware with a SmartThings compatible firmware, so they work on Alexa like standard ("Alexa, turn the lamp off") devices rather than asking a 3rd party plugin to do it.
 
Joined
4 Aug 2007
Posts
21,386
Location
Wilds of suffolk
Well i've got half a dozen wired up around the place now. They work brilliantly.

This weekends job - flashing firmware with a SmartThings compatible firmware, so they work on Alexa like standard ("Alexa, turn the lamp off") devices rather than asking a 3rd party plugin to do it.

Sounds good, please update once thats done.
How do you control each one, as in I assume you can name them or something so that you know what is what?
 
Soldato
OP
Joined
16 Oct 2007
Posts
7,418
Location
UK
Finally got around to trying to flash the firmware on these little things
I needed a £1 FTDI adapter from Aliexpress which allows you to connect a USB cable, and then 4 wires to the Sonoff
Then flash the firmware, add a Smart Handler in the SmartThings setup

First one took about 30 minutes of trial and error. All subsequent ones took a minute. They are working perfectly - all lamps in the house are now Smart Things connected, and therefore Alexa connected (without having to use a plug in - now it's just "Alexa, turn on the bedroom lamp")

(So in answer to your question MKW, yes, each device can be named as per normal)

Highly recommended things. The £4 ESP8266 chip they are based on seems to be tinkerers dream. My next project is to try and make an Alexa/SmartThings connected device that opens and closes the blinds on command, and based on ambient light levels. Max budget - £10
 
Soldato
Joined
9 Mar 2010
Posts
2,838
@tres - For this to work with the SmartThings app (specifically I want the native "turn on bedroom lamp" type functionality) do you need the SmartThings hub?

Oh also, do you have a link to FTDI cable you got and info on flashing?
 
Soldato
OP
Joined
16 Oct 2007
Posts
7,418
Location
UK
@tres - For this to work with the SmartThings app (specifically I want the native "turn on bedroom lamp" type functionality) do you need the SmartThings hub?

Oh also, do you have a link to FTDI cable you got and info on flashing?

https://community.smartthings.com/t...handler-smartapp-5-10-smart-switches/45957/28

Really simple instructions once you get over some of the confusing looking steps. The first one is the challenge, subsequent ones take seconds.
I used the cheapest FTDI thing I could find, $2 delivered!
https://www.aliexpress.com/item/Fre...32648254875.html?spm=2114.13010608.0.0.eP2Drk

I feel the other half would kill me for chopping the wires on everything electrical.

I've now got around that issue by using cheap extension leads (1m), putting the sonoff in the cable, and cutting the slack, so you just have a male plug > sonoff > female plug. Works well!
 
Associate
Joined
20 Feb 2009
Posts
2,033
Location
Rugby
These look great.

I've been thinking of making a similar thing myself from scratch, so I can automate more stuff with my Harmony remote. My initial plan was to use an Auduino for the brains, connected to a bank of relays, which would switch each device I wanted, and the Auduino would have an IR receiver to receive the commands form the Harmony.

With this being Wifi enabled, and only $5, it looks like it may be better & cheaper to use these!
 
Back
Top Bottom