node-red-contrib-blynk-ws
Version:
Node Red integration with Blynk App and Server through websockets
425 lines (424 loc) • 9.45 kB
JSON
[
{
"id": "bdc832422fa68bdf",
"type": "tab",
"label": "05 - Table and LCD widgets",
"disabled": false,
"info": "",
"env": []
},
{
"id": "53212fa4.e07348",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 120,
"wires": [["b254d686.70e2a"]]
},
{
"id": "b254d686.70e2a",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "test add",
"func": "var idx = global.get('tbtest');\nif(idx === undefined) idx=0;\nmsg.add = ['nome'+idx,'val'];\nglobal.set('tbtest', idx+1);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 320,
"y": 120,
"wires": [["f62fdbd3.de2fe8"]]
},
{
"id": "f62fdbd3.de2fe8",
"type": "blynk-ws-out-table",
"z": "bdc832422fa68bdf",
"name": "",
"pin": "26",
"client": "8c06e199.b82b28",
"x": 640,
"y": 240,
"wires": []
},
{
"id": "e61ccaee.07b808",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 200,
"wires": [["17807c90.d64963"]]
},
{
"id": "17807c90.d64963",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "test clear",
"func": "msg.clear = true;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 320,
"y": 200,
"wires": [["f62fdbd3.de2fe8"]]
},
{
"id": "802b6270.cd691",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 160,
"wires": [["203b3d11.f5952a"]]
},
{
"id": "203b3d11.f5952a",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "test update 0",
"func": "\nmsg.update = ['0', 'nome0upd','upd'];\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 330,
"y": 160,
"wires": [["f62fdbd3.de2fe8"]]
},
{
"id": "e7986590.e5402",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 260,
"wires": [["4f15450c.5f78a4"]]
},
{
"id": "4f15450c.5f78a4",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "test pick 0",
"func": "\nmsg.pick = 0;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 330,
"y": 260,
"wires": [["f62fdbd3.de2fe8"]]
},
{
"id": "1ce6645c.a05a84",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 300,
"wires": [["4b73c02a.06821"]]
},
{
"id": "4b73c02a.06821",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "test pick 1",
"func": "\nmsg.pick = 1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 330,
"y": 300,
"wires": [["f62fdbd3.de2fe8"]]
},
{
"id": "6a4e4ea3.45566",
"type": "blynk-ws-in-write",
"z": "bdc832422fa68bdf",
"name": "write table",
"pin": "26",
"pin_all": false,
"client": "8c06e199.b82b28",
"x": 620,
"y": 340,
"wires": [["8b81075.638c6f8"]]
},
{
"id": "8b81075.638c6f8",
"type": "debug",
"z": "bdc832422fa68bdf",
"name": "",
"active": true,
"console": "false",
"complete": "arrayOfValues",
"x": 830,
"y": 340,
"wires": []
},
{
"id": "4d401c78.8f8adc",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 360,
"wires": [["f8bb1f0.1a0fce"]]
},
{
"id": "f8bb1f0.1a0fce",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "load arr",
"func": "var idx = global.get('tbtest');\nif(idx === undefined) idx=0;\nmsg.loadtable = [\n ['nome 1','\\xF0\\x9F\\x8C\\xA1'],\n ['nome 2',\"\\\\xF0\\\\0x9F\\\\0x8C\\\\0xA1\"],\n ['name 3','\\uD83C\\uDF21'],\n ['nome 4',null],\n ['nome 5','\\0'],\n ];\nglobal.set('tbtest', idx+msg.loadtable.length);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 320,
"y": 360,
"wires": [["f62fdbd3.de2fe8"]]
},
{
"id": "6024eef.2f0539",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 170,
"y": 400,
"wires": [["ef4a17dd.6271c8"]]
},
{
"id": "ef4a17dd.6271c8",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "load arr nome",
"func": "var idx = global.get('tbtest');\nif(idx === undefined) idx=0;\nmsg.loadtable = [\n 'nome 1',\n 'nome 2',\n 'nome 3',\n 'nome 4',\n 'nome 5',\n ];\nglobal.set('tbtest', idx+msg.loadtable.length);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 340,
"y": 400,
"wires": [["f62fdbd3.de2fe8"]]
},
{
"id": "69e97790f43308c1",
"type": "comment",
"z": "bdc832422fa68bdf",
"name": "Example using Table widget",
"info": "",
"x": 160,
"y": 60,
"wires": []
},
{
"id": "73dec051e301a06b",
"type": "blynk-ws-out-lcd",
"z": "bdc832422fa68bdf",
"name": "",
"pin": "101",
"client": "8c06e199.b82b28",
"x": 560,
"y": 580,
"wires": []
},
{
"id": "e2d21508e5f99557",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "clear and print ",
"func": "msg.clear = true\nmsg.text = \"Hello\"\nmsg.y=0\nmsg.x=5\n\nmsg.text1 = \"World\"\nmsg.y1=1\nmsg.x1=6\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 280,
"y": 640,
"wires": [["73dec051e301a06b", "c3a7dcffc2d2f3b9"]]
},
{
"id": "8fb6a3fafc8cdcf5",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "255",
"payloadType": "num",
"x": 110,
"y": 640,
"wires": [["e2d21508e5f99557"]]
},
{
"id": "9f971ca5bb916efe",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "clear",
"func": "msg.clear = true\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 600,
"wires": [["73dec051e301a06b", "c3a7dcffc2d2f3b9"]]
},
{
"id": "82ec787454e1b4c4",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "255",
"payloadType": "num",
"x": 110,
"y": 600,
"wires": [["9f971ca5bb916efe"]]
},
{
"id": "1a82969d55bd77dd",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "Green",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "#00FF00",
"payloadType": "str",
"x": 110,
"y": 700,
"wires": [["663b2d6b2ea4b17b"]]
},
{
"id": "071a2be15ddc63e0",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "Blue",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "#0000FF",
"payloadType": "str",
"x": 110,
"y": 740,
"wires": [["663b2d6b2ea4b17b"]]
},
{
"id": "663b2d6b2ea4b17b",
"type": "blynk-ws-out-set-property",
"z": "bdc832422fa68bdf",
"name": "Set Color",
"pin": "101",
"pinmode": "0",
"prop": "color",
"client": "8c06e199.b82b28",
"x": 260,
"y": 720,
"wires": []
},
{
"id": "9cf24f70daa582c8",
"type": "function",
"z": "bdc832422fa68bdf",
"name": "print simple",
"func": "msg.text = \"Test print\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 270,
"y": 560,
"wires": [["73dec051e301a06b", "c3a7dcffc2d2f3b9"]]
},
{
"id": "3b40b306b4c69c1a",
"type": "inject",
"z": "bdc832422fa68bdf",
"name": "inject",
"repeat": "",
"crontab": "",
"once": false,
"topic": "",
"payload": "255",
"payloadType": "str",
"x": 110,
"y": 560,
"wires": [["9cf24f70daa582c8"]]
},
{
"id": "d850604eba3550bc",
"type": "comment",
"z": "bdc832422fa68bdf",
"name": "Test LCD node: clear, print and color property - V101 LCD",
"info": "",
"x": 250,
"y": 500,
"wires": []
},
{
"id": "c3a7dcffc2d2f3b9",
"type": "debug",
"z": "bdc832422fa68bdf",
"name": "",
"active": true,
"console": "false",
"complete": "true",
"x": 530,
"y": 640,
"wires": []
},
{
"id": "8c06e199.b82b28",
"type": "blynk-ws-client",
"name": "Blynk Local Server 1",
"path": "ws://your-local-server.ip/websockets",
"key": "your-auth-token-here",
"dbg_all": true,
"dbg_read": false,
"dbg_write": false,
"dbg_notify": false,
"dbg_mail": false,
"dbg_prop": false,
"dbg_sync": false,
"dbg_bridge": false,
"dbg_low": true,
"dbg_pins": "",
"multi_cmd": true,
"proxy_type": "no",
"proxy_url": "",
"enabled": true
}
]