If you don’t want to Make an Oil Heater “Smart” With ESP8266 how about this small ceramic space heater instead? The magic is in that little white box at the bottom of the photo. The little box is called the Sonoff and this one is capable of switching almost anything up to 10A. Sonoff also offers some other, more powerful models up to 16A. The heart of this is little guy is an ESP8266 that you may have already seen in one of my other projects. As you can tell it can bring even this ugly ceramic space heater that is a couple decades old right into the future. The Sonoff provides a safe and consumer friendly way to switch an AC or mains power supply which can be quite dangerous otherwise.
The Sonoff is for those makers that maybe don’t have a 3D printer since right out of the box it provides a sturdy case that securely clamps the power cord of the device you are controlling. You can use it with it’s own proprietary app but where is the fun in that? We are going to reprogram the ESP8266 inside for integration with your Siri Controlled Apple Home, or other smart home setups.
I used the Arduino IDE and a USB FTDI Programmer to install the new firmware although I have seen others use Atom to accomplish the same, but I think more are familiar with the Arduino IDE and seems easier to get going.
In the Arduino IDE under the “Tools” menu change the board to, “ESP8266 Generic” and make sure you match the following settings:
Upload Using: Serial
Flash Mode: DOUT
Flash Frequency: 40MHz
CPU Frequency: 80MHz
Flash Size: 1M (64K SPIFFS) *5.x.x -> Flash Size: 1M (no SPIFFS)
Debug Port: Disabled
Debug Level: None
Reset Method: ck
Upload Speed: 115200
Port: Your COM port connected to Sonoff
Connect the USB FTDI Programmer to the board as follows:
|3.3V – ⚠️️ Some are 5V||3.3V / VCC|
|TX goes to ->||<- goes to RX|
|RX goes to ->||<- goes to TX|
|GND goes to ->||<- goes to GND|
The trick to get the Sonoff into programming mode is to hold down the button while you plug in the USB FTDI Programmer for two seconds, then let go. Once you have it in programming mode just upload your sketch setting up your WiFi and MQTT topic details, add a script to your MQTT Broker. Done!
If you would like to see links to my Arduino Sketch or my Script running on my MQTT Broker please drop a comment below, email me directly using firstname.lastname@example.org or hit me up at any of my social links.