0.0.3 • Published 3 years ago

node-red-contrib-blynk-mg v0.0.3

Weekly downloads
22
License
MIT
Repository
-
Last release
3 years ago

node-red-contrib-blynk-mg

a simple node-red Blynk node with flexible token and pins configuration

Build Status

you can also check the npmjs package page.

Description!

Thip node-red package allows users to pass Blynk token and pin as part of the message. For instance:

msg = {
  'token' : ['token1', 'token-2'],
  'payload' : ['value-0' , 'value-1' , 'value-2', 'value-3'],
  'pin' : [0, 1, 2, 3]
  }   

When the above message is recieved, the node will send the payload 4 messages, to the pin list, one for each pin. all messages will be sent to each token in the msg.token list.

If msg.payload is longer than msg.pin => the node will send the first payload messages until pins list is used.

listv 1v 2v 3v 4
msg.payloadpl_0pl_1pl_2pl_3
msg.pin01
resultsend 'pl_0' to v_pin_0send 'pl_1' to v_pin_1

if msg.pin is longer than payload => the node will send 0 for the pins that has no match in payload list.

listv 1v 2v 3v 4
msg.payloadpl_0pl_1
msg.pin0123
resultsend 'pl_0' to v_pin_0send 'pl_1' to v_pin_1send 0 to v_pin_2send 0 to v_pin_3

If a token is added to the node config view, this token will be appended to the msg.token list.

config_diag

Installation

in the (Node-red)[] installation directory run this command:

$ npm i node-red-contrib-blynk-mg

Todos for next releases

  • improve the user experience and how the msg is consumed.