read the tutorial
Blueprint is a pre-configured template on the Blynk IoT platform, that will help you create a fully functional project in a few minutes. It already includes mobile and web dashboard UI, working firmware, and a tutorial to help you connect your device to the Blynk IoT platform and control it from the app!

On this page you can review the blueprint to have an idea of the ready project you are going to get. Sign up for a free account on the Blynk IoT platform to try it out.

Introduction

Blynk is mostly used with boards like Arduino or a Raspberry Pi, but why not run it on other devices? ;)

I've spent a weekend creating an app for my router. System and network charts, stats, notifications, WiFi control, and more! This tutorial explains some basic ideas behind creating such apps, so you could easily adapt it to work with the Raspberry Pi and the like.

Components Used in This Project

You'll need an OpenWrt-compatible router. Alternatively, some IoT development boards come with OpenWrt out-of-the-box, like Onion Omega, VoCore, LinkIt Smart 7688 and others.

Attention! Installing OpenWrt manually can brick your device. But once completed, it unlocks full power and control. I'm not brave enough to provide any instructions here, as they may be different for every router model. But if you already have OpenWrt on your router, you'll be able to start with this tutorial in no time.

On the device side, I'll be using Lua to script the needed functionality. I could also use Python or Node.js, but unfortunately, these options are not always available due to a lack of resources on some routers. Or C/C++, but it's not so convenient to work with (cross-compiling for every change, etc.)

We'll be mostly using pre-installed software (available on any OpenWrt-enabled router). For example, Lua is simple to use and learn, and it's used by the default OpenWrt web interface (LuCI). To access some advanced functionality, I had to install additional software packages.

Skills Required

I assume that you already know:

  • How to open and use an SSH terminal on your OpenWrt router
  • How to upload/edit files on your router (using FileZilla or scp/sftp)
  • How to work with the Linux console

Try it out!

Open an SSH connection to your OpenWrt router and run:

Install required packages

Install the Blynk IoT platform script

Edit the Lua script to include your Blynk credentials

Replace these lines with the information provided by the Blynk platform:

To save the file, hit Ctrl+O, then Enter. Close the editor by hitting Ctrl+X.

Now it's time to run the example:

This means a secure, bi-directional connection to the cloud is established! Your device should appear online in the Blynk Cloud and in the App.

Autorun in the background

The script needs to be manually executed, which is rather inconvenient. I want to make it run in the background automatically when the router is powered up. This is done by creating a system service:

Project Breakdown

The creation process of this project is explained in this tutorial

Next Steps

More pre-built IoT projects

Need an IoT solution for your business?

Contact us for a free consultation with our engineers and IoT business experts
Contact us →