This is a wifi relay that can be found for as low as $5. I have had a few of these up and running for a little while now and they are working great. They can even support instant status updates (notify SmartThings on state change) when the switch is toggled by pressing the button, and are really quite simple to setup.
**Warning**: Do all of the flashing before connecting the switch to mains electricity. Be safe when working with electrical devices. I take no responsibility if you do something that damages yourself or your property. 😉
This step is extremely easy, so don’t let it intimidate you. I have built an image of ESPEasy that supports rules which are needed for some of the logic on the switch. First, download the ESPEasy firmware flashing tool. Next download the firmware image that I have built here, and place it in the same directory that you extracted the ESPEasy flash.cmd tool in. Now, with an FTDI Adapter (SET AT 3.3V) connected to the switch (square pin = VCC, then TX , RX, GROUND – that order), plug the FTDI adapter into the USB port of your computer while holding down the button on the switch. This puts it into programming mode. Run the flash.cmd script that came in the ESPEasy zip download and enter the following settings (COM Port: specific to your computer, Flash Size: 1024, Build: 100). Wait for it to finish and the hardest part is done.
Connect to Your Home Wifi
Now, plug the switch into power and wait for a moment. It should create an access point named ESP_00. Connect to that access point with the password: configesp and it should redirect you to the page where you can connect it to your access point. If it doesn’t redirect you the IP address is 192.168.4.1. Put in your network access point information and hit connect. Waiting at this page will usually give you the IP address of the switch before it kicks you off of it’s ESP_00 access point.
The switch should then connect to your Wifi access point. I recommend setting a DHCP reservation for the switch or giving it a static IP address at this point. If the splash page that shows you the switches IP address (mentioned above) did not appear, use whatever technique you usually use on your network to find a newly attached devices ip address. Your DHCP server / router is a good place to start.
Add the device handler to your SmartThings account.
Create a new device in the IDE and choose the Sonoff Wifi Switch device handler. In the SmartThings App, find the switch and edit it’s preferences with the IP address. Hit “Done” and the device handler should configure the switch with the devices and rules that it needs to function. The status portion of the handler should notify you that the configuration was successful. If it doesn’t change after a few seconds try hitting the “configure” button.
Configure Switch for Instant Status Updates (optional)
If you want SmartThings to get notified when you press the button on the switch, connect to the switch via http://ipaddress/config and put the IP address of your SmartThings hub and port 39500 in the config as seen below.
Where to Buy
It just so happens that Itead is having a promotional sale on their products. Click through to this link to get some great smart home gear at up to 20 – 30 % off!