Making the Sonoff Easy to Program
The release of the ESP8266 has generated a lot of interest in the microcontroller community. Nodemcu and other cheap MCU's with built in wifi have really opened the door for consumers/makers to create cost effective IoT solutions. One significant reason ESP8266 based devices are taking off is due to the fact that Arduino libraries have been created and are well maintained.
Sonoff Wifi Switches, which are based on the ESP8266, are getting a lot of attention and for good reason. They are cheap and very hackable. I should mention that Sonoff has its own cloud service for controlling these wireless switches.
Here is my take on hacking the Sonoff.
Go to Part 2 Go to Part 3
I have been playing around with a small DIY aquaponics system in my home office. So far its a success, but I would like to have more control. Currently, I have 2 Sonoff wireless switches (both with custom code) controlling grow lights and aquarium lights. I would like to con…
Controlling Sonoff with Alexa
This post will build our previous work with the Sonoff Wifi Switch. We'll focus on using an Arduino library called fauxmo to allow Alexa to interact with the Sonoff. Go to Part 1Go to Part 2
I have been controlling appliances such as lights and aquaponics equipment using MQTT with Node-RED and also Blynk. Both work well. When I recieved an Echo Plus as a gift for Christmas I quickly understood the potential that the Alexa service had. It is simple to use and for those of us that like getting under the hood, functional short comings can be overcome with the creation of Alexa Skills and some type of internet accessible service to handle logic and automation (AWS Lambda, Node-RED, etc).
Echo Dot can be had a reasonable price currently. You can also keep tabs on the Alexa development pages. They have been giving out Echo Dot's to Skill creators that meet certain criteria.
This guide will use the FauxmoESP library to expose the Sonoff to Alex…
Programming the Sonoff Wifi Switch
In my last post, I showed how to mod the Sonoff Wifi Switch for easy programming using Arduino (or any other ESP8266 programming utility). In this post, I'll show how I setup my physical programming hardware and get custom code onto the Sonoff using the Arduino IDE.
Go to Part 1Go to Part 3
Programming the ESP8266 based Sonoff is relatively simple. It will require a connection between the Sonoff and the programmer, which in this case is a PC, Raspberry PI, or Mac. A simple, cheap USB to Serial UART adapter will connect the computer to the Sonoff for programming.
A WORD OF CAUTION: These devices are designed to work on your home mains power. You should understand the implications of connecting a device you altered to mains power. Do not ever work on a device that is connect to a mains power source. Do not attempt to program the Sonoff while it is connected to a mains power source.
Goals Make an easy method to connect each Sonoff to the prog…