smithtek-node-red-meter
Version:
Adds record function to node-red
288 lines (287 loc) • 6.02 kB
JSON
[
{
"id": "4df35142.3026f",
"type": "tab",
"label": "Flow recorder",
"disabled": false,
"info": ""
},
{
"id": "65c31975.512b28",
"type": "debug",
"z": "4df35142.3026f",
"name": "get global variable value",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 1070,
"y": 340,
"wires": []
},
{
"id": "f704d2aa.997fc",
"type": "function",
"z": "4df35142.3026f",
"name": "read time recorder",
"func": "\nmsg.payload = global.get(\"time\");\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 770,
"y": 340,
"wires": [["65c31975.512b28"]]
},
{
"id": "d9a9bea7.6c0bb",
"type": "inject",
"z": "4df35142.3026f",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "1.4",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 210,
"y": 340,
"wires": [["f704d2aa.997fc"]]
},
{
"id": "47fffab.7108304",
"type": "smithtek_node_red_record",
"z": "4df35142.3026f",
"name": "",
"recordType": "unit",
"saveto": "unit",
"savetoType": "global",
"start": 1,
"startType": "num",
"stop": 0,
"stopType": "num",
"multiplier": "3.6",
"x": 710,
"y": 580,
"wires": [["56b2d133.6fe91"]]
},
{
"id": "9d5aef37.e51df",
"type": "smithtek_node_red_set_multi_formatter",
"z": "4df35142.3026f",
"name": "",
"x": 460,
"y": 660,
"wires": [["47fffab.7108304"]]
},
{
"id": "7bb03496.922a8c",
"type": "smithtek_node_red_reset_formatter",
"z": "4df35142.3026f",
"name": "",
"x": 450,
"y": 580,
"wires": [["47fffab.7108304"]]
},
{
"id": "6548dc2.75f5824",
"type": "inject",
"z": "4df35142.3026f",
"name": "reset",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 250,
"y": 580,
"wires": [["7bb03496.922a8c"]]
},
{
"id": "d1223759.bc3fb8",
"type": "inject",
"z": "4df35142.3026f",
"name": "",
"topic": "",
"payload": "0.4",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 250,
"y": 660,
"wires": [["9d5aef37.e51df"]]
},
{
"id": "56b2d133.6fe91",
"type": "debug",
"z": "4df35142.3026f",
"name": "output msg",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 1030,
"y": 580,
"wires": []
},
{
"id": "be64acfc.48663",
"type": "debug",
"z": "4df35142.3026f",
"name": "mgs global",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 1030,
"y": 740,
"wires": []
},
{
"id": "bb332e1b.06172",
"type": "function",
"z": "4df35142.3026f",
"name": "read msg recorder",
"func": "\nmsg.payload = global.get(\"unit\");\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 730,
"y": 740,
"wires": [["be64acfc.48663"]]
},
{
"id": "80a13d0c.6cd99",
"type": "inject",
"z": "4df35142.3026f",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "10",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 250,
"y": 740,
"wires": [["bb332e1b.06172"]]
},
{
"id": "80ec3606.731c78",
"type": "inject",
"z": "4df35142.3026f",
"name": "input pulse",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 230,
"y": 520,
"wires": [["47fffab.7108304"]]
},
{
"id": "5069e79a.2f93e8",
"type": "smithtek_node_red_record",
"z": "4df35142.3026f",
"name": "",
"recordType": "time",
"saveto": "time",
"savetoType": "global",
"start": 1,
"startType": "num",
"stop": 0,
"stopType": "num",
"multiplier": 1,
"x": 810,
"y": 180,
"wires": [[]]
},
{
"id": "5aa8c6ab.88ec58",
"type": "smithtek_node_red_reset_formatter",
"z": "4df35142.3026f",
"name": "",
"x": 430,
"y": 260,
"wires": [["5069e79a.2f93e8"]]
},
{
"id": "c8b75985.244428",
"type": "inject",
"z": "4df35142.3026f",
"name": "reset",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 190,
"y": 260,
"wires": [["5aa8c6ab.88ec58"]]
},
{
"id": "d0638e85.284d9",
"type": "inject",
"z": "4df35142.3026f",
"name": "start",
"topic": "",
"payload": "1",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 490,
"y": 160,
"wires": [["5069e79a.2f93e8"]]
},
{
"id": "38b7d841.8d4e58",
"type": "inject",
"z": "4df35142.3026f",
"name": "stop",
"topic": "",
"payload": "0",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 490,
"y": 220,
"wires": [["5069e79a.2f93e8"]]
},
{
"id": "592b4ae.c8b57b4",
"type": "comment",
"z": "4df35142.3026f",
"name": "Time record",
"info": "",
"x": 190,
"y": 200,
"wires": []
},
{
"id": "1b686e20.b1daf2",
"type": "comment",
"z": "4df35142.3026f",
"name": "unit record with multiplier",
"info": "",
"x": 250,
"y": 480,
"wires": []
}
]