All Projects → vshymanskyy → blynk-library-lua

vshymanskyy / blynk-library-lua

Licence: MIT license
Blynk library for Lua. Works with Lua 5.1+, LuaJIT, NodeMCU.

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to blynk-library-lua

Gateway Go
🎁GateWay Client for OpenIoTHub[云易连访问内网端口和设备的网关]
Stars: ✭ 127 (+262.86%)
Mutual labels:  openwrt, esp32
Blynk Server
Blynk is an Internet of Things Platform aimed to simplify building mobile and web applications for the Internet of Things. Easily connect 400+ hardware models like Arduino, ESP8266, ESP32, Raspberry Pi and similar MCUs and drag-n-drop IOT mobile apps for iOS and Android in 5 minutes
Stars: ✭ 8 (-77.14%)
Mutual labels:  esp32, blynk
Wordclock
Diy Wordclock with an esp32 and ws2812b Leds
Stars: ✭ 19 (-45.71%)
Mutual labels:  esp32
openblock-desktop
Graphic programming software for hardware like: arduino, microbit, esp32, esp8266...
Stars: ✭ 161 (+360%)
Mutual labels:  esp32
esp32-i2s-mems
Using an I2S MEMS microphone on an ESP32
Stars: ✭ 103 (+194.29%)
Mutual labels:  esp32
Low power TTGO T-beam
Low power consumption for TTGO t-beam
Stars: ✭ 45 (+28.57%)
Mutual labels:  esp32
OpenWrt-Autobuild
OpenWrt action builds
Stars: ✭ 24 (-31.43%)
Mutual labels:  openwrt
potd
A high scalable low to medium interactive SSH/TCP honeypot using Linux Namespaces, capabilities, seccomp, cgroups designed for OpenWrt and IoT devices.
Stars: ✭ 28 (-20%)
Mutual labels:  openwrt
stewart-platform-esp32
https://ouilogique.com/plateforme-de-stewart-esp32/
Stars: ✭ 17 (-51.43%)
Mutual labels:  esp32
source
Onion's fork of OpenWRT's source build system. The firmware for the Omega2, Omega2+, and Omega2 Pro is based on the openwrt-18.06 branch.
Stars: ✭ 73 (+108.57%)
Mutual labels:  openwrt
LMIC-node
LMIC-node | One example to rule them all. LMIC-node is an example LoRaWAN application for a node that can be used with The Things Network. It demonstrates how to send uplink messages, how to receive downlink messages, how to implement a downlink command and it provides useful status information. With LMIC-node it is easy to get a working node qu…
Stars: ✭ 108 (+208.57%)
Mutual labels:  esp32
SMLReader
ESP8266 based smart meter (SML) to MQTT gateway
Stars: ✭ 170 (+385.71%)
Mutual labels:  esp32
Autosteer ESP
Advanced Autosteer Sketch for ESP32 - WiFi Version
Stars: ✭ 34 (-2.86%)
Mutual labels:  esp32
esp32-iot-uno
ESP32 iot uno board
Stars: ✭ 47 (+34.29%)
Mutual labels:  esp32
esp-idf-parallel-tft
8bit parallel TFT & 4-line resistance touch screen Driver for esp-idf using i2s paralell mode
Stars: ✭ 45 (+28.57%)
Mutual labels:  esp32
linksys-wrt54g
Exploiting Linksys WRT54G using a vulnerability I found.
Stars: ✭ 31 (-11.43%)
Mutual labels:  openwrt
lispmob
LISP and LISP-MN Implementation
Stars: ✭ 44 (+25.71%)
Mutual labels:  openwrt
openwrt-configuration-ansible
OpenWrt configuration for router + dumb access points with Ansible playbook for centralised management
Stars: ✭ 31 (-11.43%)
Mutual labels:  openwrt
gfx demo
GFX Demo for Arduino and the ESP-IDF
Stars: ✭ 63 (+80%)
Mutual labels:  esp32
esp32-e-paper-weatherdisplay
An ESP32 and 4.2" ePaper Display reads Dark Sky weather API and displays the weather using ESP-IDF
Stars: ✭ 110 (+214.29%)
Mutual labels:  esp32

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

Download

Blynk Mobile App: Google Play | App Store

Documentation

Social: Webpage / Facebook / Twitter / Kickstarter
Documentation: https://docs.blynk.io
Community Forum: http://community.blynk.cc
Blynk for Business: http://www.blynk.io

Usage example

local Blynk = require("blynk.socket")

local blynk = Blynk.new("your_auth_token")

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

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

local sock = getSocketConnection() -- omitted
blynk:connect(sock)

while true do
  blynk:run()
end

You can run the full example:

lua ./examples/client.lua <your_auth_token>

Features

  • 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-openssl

# Get blynk-library-lua from github
cd /root
wget --no-check-certificate -qO- https://github.com/vshymanskyy/blynk-library-lua/archive/v0.2.0.tar.gz | 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

Bonus

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

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

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

Implementations for other platforms

License

This project is released under The MIT License (MIT)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].