Blynk Library Lua

Blynk library for Lua. Works with Lua 5.1+, LuaJIT, NodeMCU.
Alternatives To Blynk Library Lua
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Automated Irrigation System558
5 months ago9JavaScript
This is the software of an open source automated irrigation system. The complete setup including hardware can be found in the README.
a year agomitHTML
💖A free IoT (Internet of Things) platform and private cloud. [一个免费的物联网和私有云平台,支持内网穿透]
Awesome Esp402
9 months ago1cc0-1.0
📶 A curated list of awesome ESP8266/32 projects and code
Nodemcu Tool258442 years ago22April 22, 20209mitJavaScript
:wrench: Upload + Manage Lua files on NodeMCU
5 years ago6other
Swifitch is ESP8266 based relay board that could be used to turn any light or any wall socket into smart one!
6 years agoShell
ESP8266 NodeMCU Workshop
Devify Server78
2 years ago1March 10, 20161mitJavaScript
A set of lightweight IoT cloud server boilerplates. The simplest way to build isomorphic JavaScript IoT servers.
Iot Spot74
5 months ago47mpl-2.0C++
💡An amazing spot of 80+ projects to step your foot into this ocean of "Internet Of things". Dive deep and explore the fiesta of electronics. Broaden your vision at a single go.😎✔
Esp32 Eduroam65
13 days ago1mitC++
Examples with connection to eduroam powered university networks around the world and then to IoT services or self-hosted websites..
Blynk Library Lua42
a month ago3mitLua
Blynk library for Lua. Works with Lua 5.1+, LuaJIT, NodeMCU.
Alternatives To Blynk Library Lua
Select To Compare

Alternative Project Comparisons

Lua client for Blynk IoT

Note: The library has been updated for Blynk 2.0

GitHub version GitHub download GitHub stars GitHub issues License

If you like Blynk - give it a star, or fork it and contribute! GitHub stars GitHub forks

What is Blynk?

Blynk provides iOS and Android apps to control any hardware over the Internet or directly using Bluetooth. You can easily build graphic interfaces for all your projects by simply dragging and dropping widgets, right on your smartphone. Blynk is the most popular IoT platform used by design studios, makers, educators, and equipment vendors all over the world.

Blynk Banner


Blynk Mobile App: Google Play | App Store


Social: Webpage / Facebook / Twitter / Kickstarter
Community Forum:
Blynk for Business:

Usage example

local Blynk = require("blynk.socket")

local blynk ="your_auth_token")

-- callback to run when V1 changes
blynk:on("V1", function(param)
  print("V1:", tonumber(param[1]), tonumber(param[2]))

-- callback to run when cloud requests V2 value
blynk:on("readV2", function(param)
  blynk:virtualWrite(2, os.time())

local sock = getSocketConnection() -- omitted

while true do

You can run the full example:

lua ./examples/client.lua <your_auth_token>


  • Lua 5.1, Lua 5.2, Lua 5.3, LuaJIT support
  • Linux, Windows, MacOS support
  • virtualWrite
  • syncVirtual
  • setProperty
  • logEvent
  • events: Vn, readVn, connected, disconnected, redirect
  • TCP and secure TLS/SSL connection support
  • can run on embedded hardware, like NodeMCU or OpenWrt

OpenWrt installation

opkg update
opkg install lua luasocket luasec
# openssl is needed for wget to handle https://
opkg install wget openssl-util libustream-wolfssl

# Get blynk-library-lua from github
cd /root
wget --no-check-certificate -qO- | tar xvz
cd blynk-library-lua-0.2.0

# Run it
lua ./examples/client.lua <your_auth_token>

NodeMCU installation

It is very easy to get it running on NodeMCU (or any other ESP8266/ESP32-based device):

  • Get the latest nodemcu-firmware running on your device.
    You can use their online build service.
    It is recommended to include encoder, TLS/SSL modules.
  • Edit nodemcu.lua example (put your auth token and wifi credentials)
  • Use nodemcu-tool or any other method to transfer lua files to the device.
    Note: the NodeMCU filesystem is "flat" (folders not supported), but it handles the / symbol nicely.
    Be sure to preserve the relative path when copying files:
    nodemcu-tool upload -mck ./blynk.lua ./blynk/pipe.lua ./blynk/nodemcu.lua
    nodemcu-tool upload ./examples/nodemcu.lua -n init.lua
  • Open device terminal and run dofile("init.lua")
  • blynk object is global, so you can call it from the interactive console:
    blynk:virtualWrite(1, tmr.time())

Ubuntu/Linux/Raspberry Pi installation

sudo apt-get install lua5.3 lua-sec lua-socket


The Timer is included for demonstration purposes.
Here are also some handy functions:

local function millis()
  return math.floor(socket.gettime()*1000)

local function delay(msec)
  return socket.sleep(msec/1000)

Implementations for other platforms


This project is released under The MIT License (MIT)

Popular Nodemcu Projects
Popular Internet Of Things Projects
Popular Hardware Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.