Sonoff (ESP8266) Part 2 – Control with Blynk App on iOS or Android
Hopefully you already skimmed through part 1 of the Sonoff trilogy (or maybe quadrilogy? ) that tells you all about the Sonoff, what it is, what it can do, how to put the firmware on it and so on, so it’s time to move onto the next step, BLYNK.
Since everybody loves a good mobile app, and the guys over at Blynk have absolutely nailed what a good mobile app for makers and tinkerers should be, it would really be a shame not to pair the Blynk app and Sonoff together.
Well, I’ve already told you, it’s an awesome app and service. It’s also really damn easy to get started with it and it s so flexible you could use it for turning on lights and for flying drones and everything in between.
How does it look/work?
Well, they say a picture is worth a thousands words, so a 13 seconds/24fps movie must be worth at least 300000 words… enjoy
As you can see, you can toggle the relay, in real time from either Android or iOS. As I mentioned, you are not limited to that, with some minor adjustments of the firmware, adding some buttons, you could have a remote for A LOT of devices. They don’t even all need to be based on Sonoff or ESP8266. Check out www.blynk.cc for more info.
How can I control my Sonoff?
Well, the easiest and simplest way is really just to write one of the example sketches that come with Blynk and use it to toggle digital pin 12 to toggle the relay.
If you want the result in the video, you ll have to get and flash the Sonoff Boilerplate I prepared for you. I do hope you checked Sonoff Boilerplate Part 1 and noticed the warning there. I will repeat it just in case:
🔴🔴🔴 WARNING 🔴🔴🔴
Before we get started, BEWARE, NEVER have the module connected to mains while playing with it. YOU WILL FRY.
🔴🔴🔴 WARNING 🔴🔴🔴
And now, a short list of what you must do
– get the boilerplate
– install the blynk app on your mobile device
– create an account
– scan this QR code with the app which will give you the basic functionality
- be sure to get the project auth token and save it somewhere
- start your Sonoff, enter config mode, fill in the token in the respective filed
- remove any buttons/features you don’t need
- break out the champagne and create some kind of automatic bottle opener or chiller that you can control with your Sonoff straight from you mobile phone. WIN.
P.S. this is still a work in progress, still loads more cleanup to do and features to add.