Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 2c25e2a

Browse files
committed
Add internal pin callback
1 parent f674f57 commit 2c25e2a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ lua ./examples/client.lua <your_auth_token>
7373
- `virtualWrite`
7474
- `syncVirtual`
7575
- `setProperty`
76-
- `notify`, `tweet`
7776
- `logEvent`
78-
- events: `Vn`, `readVn`, `connected`, `disconnected`
77+
- events: `Vn`, `readVn`, `connected`, `disconnected`, `redirect`
7978
- `TCP` and secure `TLS/SSL` connection support
8079
- can run on embedded hardware, like `NodeMCU` or `OpenWrt`
8180

@@ -145,7 +144,7 @@ __________
145144
* [Python, MicroPython](https://github.com/vshymanskyy/blynk-library-python)
146145
* [OpenWrt packages](https://github.com/vshymanskyy/blynk-library-openwrt)
147146
* [MBED](https://developer.mbed.org/users/vshymanskyy/code/Blynk/)
148-
* [Node-RED](https://www.npmjs.com/package/node-red-contrib-blynk-ws)
147+
* [Node-RED for Blynk IoT](https://flows.nodered.org/node/node-red-contrib-blynk-iot) and [for old Blynk](https://www.npmjs.com/package/node-red-contrib-blynk-ws)
149148
* [LabVIEW](https://github.com/juncaofish/NI-LabVIEWInterfaceforBlynk)
150149
* [C#](https://github.com/sverrefroy/BlynkLibrary)
151150

blynk.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,12 @@ function Blynk:process(data)
162162
elseif args[1] == 'vr' then
163163
self:emit("readV"..args[2])
164164
end
165+
elseif cmd == COMMAND.internal then
166+
self:emit("internal:"..args[1], {unpack(args, 2)})
165167
elseif cmd == COMMAND.redirect then
166168
--TODO
167169
elseif cmd == COMMAND.debug then
168170
print("Server says: "..args[1])
169-
elseif cmd == COMMAND.internal then
170171
else --sanity check
171172
print("Unexpected command: "..cmd)
172173
self:disconnect()

0 commit comments

Comments
 (0)