UNPKG

smithtek-node-red-meter

Version:

Adds record function to node-red

414 lines (413 loc) 9.68 kB
[ { "id": "dd6d6754.3b5bd8", "type": "tab", "label": "example record with duty control", "disabled": false, "info": "" }, { "id": "f2fbb46c.5ccbe8", "type": "smithtek_dutycontrol", "z": "dd6d6754.3b5bd8", "name": "", "senseTime": "10", "primary": "Pump 1", "x": 910, "y": 360, "wires": [ ["741ac43f.33014c"], ["6ab252cc.5e2c1c"], ["89e2c069.b1ec8"], ["cf4f93ec.48b6e"] ] }, { "id": "79b807c1.04d7a8", "type": "smithtek_duty_pumptrip", "z": "dd6d6754.3b5bd8", "name": "Pump 1 Trip", "pumpNumber": 1, "x": 630, "y": 500, "wires": [["f2fbb46c.5ccbe8"]] }, { "id": "8fef5609.c950d8", "type": "smithtek_duty_senseflow", "z": "dd6d6754.3b5bd8", "name": "", "x": 660, "y": 360, "wires": [["f2fbb46c.5ccbe8"]] }, { "id": "3e961792.43e488", "type": "smithtek_duty_start_stop", "z": "dd6d6754.3b5bd8", "name": "", "x": 660, "y": 260, "wires": [["f2fbb46c.5ccbe8"]] }, { "id": "86c64c6f.f7e43", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "Pump Start", "topic": "", "payload": "true", "payloadType": "bool", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 460, "y": 240, "wires": [["3e961792.43e488", "dde3566.df8cca8"]] }, { "id": "66f45bbd.e1c434", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "Pump Stop", "topic": "", "payload": "false", "payloadType": "bool", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 460, "y": 280, "wires": [["3e961792.43e488", "b0a14c3a.5af01"]] }, { "id": "d1d97da1.dd89a", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "", "topic": "", "payload": "105", "payloadType": "num", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 150, "y": 640, "wires": [["d35e6dbd.d9c99"]] }, { "id": "d35e6dbd.d9c99", "type": "switch", "z": "dd6d6754.3b5bd8", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "gt", "v": "99", "vt": "num" }, { "t": "lt", "v": "100", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 290, "y": 360, "wires": [["5d2fd884.4c01f8"], ["68b354f1.eeb84c"]] }, { "id": "cfa5239a.74c0c", "type": "smithtek_duty_pumptrip", "z": "dd6d6754.3b5bd8", "name": "Pump 2 trip", "pumpNumber": "2", "x": 630, "y": 540, "wires": [["f2fbb46c.5ccbe8"]] }, { "id": "5d2fd884.4c01f8", "type": "change", "z": "dd6d6754.3b5bd8", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "true", "tot": "bool" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 460, "y": 340, "wires": [["8fef5609.c950d8"]] }, { "id": "4d3731c0.2dd0b", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "", "topic": "", "payload": "50", "payloadType": "num", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 150, "y": 680, "wires": [["d35e6dbd.d9c99"]] }, { "id": "68b354f1.eeb84c", "type": "change", "z": "dd6d6754.3b5bd8", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "false", "tot": "bool" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 460, "y": 380, "wires": [["8fef5609.c950d8"]] }, { "id": "75fc8ea1.7bf5d", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "Reset Pump 1 Fault", "topic": "", "payload": "false", "payloadType": "bool", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 410, "y": 500, "wires": [["79b807c1.04d7a8"]] }, { "id": "9699b318.16364", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "Reset Pump 2 Fault", "topic": "", "payload": "false", "payloadType": "bool", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 410, "y": 540, "wires": [["cfa5239a.74c0c"]] }, { "id": "acb3eca0.008d8", "type": "debug", "z": "dd6d6754.3b5bd8", "name": "Pump 1 flow status", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 1590, "y": 420, "wires": [] }, { "id": "c8e4d5e5.d449c8", "type": "debug", "z": "dd6d6754.3b5bd8", "name": "Pump 2 Flow status", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 1590, "y": 460, "wires": [] }, { "id": "c657ed1.5885e1", "type": "comment", "z": "dd6d6754.3b5bd8", "name": "Simulates a flow rate", "info": "Press the top button to simulate good flow\nPress the botom button to simulate bad flow\n\nFlow must be good within the delay time. \nThe delay time is configurable in the pump controller", "x": 130, "y": 300, "wires": [] }, { "id": "223d19ce.576456", "type": "comment", "z": "dd6d6754.3b5bd8", "name": "Start Stops the pump", "info": "", "x": 440, "y": 200, "wires": [] }, { "id": "1f523862.f53e78", "type": "comment", "z": "dd6d6754.3b5bd8", "name": "Pump Trip signal", "info": "If a false is passed into the pump trip it will clear the pump faults\nIf a true is passed to the pump trip it will trip the pump out", "x": 480, "y": 460, "wires": [] }, { "id": "a07ae73a.8b3558", "type": "comment", "z": "dd6d6754.3b5bd8", "name": "Indicates flow rate status", "info": "If good flow when the pump is running it will send false.\nIf bad flow when the pump is running it will send true", "x": 1610, "y": 380, "wires": [] }, { "id": "dde3566.df8cca8", "type": "function", "z": "dd6d6754.3b5bd8", "name": "Simulated flow rate running", "func": "msg.payload = 105\nreturn msg;", "outputs": 1, "noerr": 0, "x": 120, "y": 400, "wires": [["d35e6dbd.d9c99"]] }, { "id": "b0a14c3a.5af01", "type": "function", "z": "dd6d6754.3b5bd8", "name": "Simulated flow rate stopped", "func": "msg.payload = 105\nreturn msg;", "outputs": 1, "noerr": 0, "x": 120, "y": 440, "wires": [["d35e6dbd.d9c99"]] }, { "id": "89e2c069.b1ec8", "type": "function", "z": "dd6d6754.3b5bd8", "name": "Pump 1 Run Status / Signal", "func": "var status = msg.payload\n\n\nif (status === false) {\n msg.payload = 'Water Flowing Pump 1'\n} else {\n msg.payload = 'Water not Flowing Pump 1'\n}\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 1300, "y": 420, "wires": [["acb3eca0.008d8"]] }, { "id": "cf4f93ec.48b6e", "type": "function", "z": "dd6d6754.3b5bd8", "name": "Pump 1 Run Status / Signal", "func": "var status = msg.payload\n\n\nif (status === false) {\n msg.payload = 'Water Flowing Pump 2'\n} else {\n msg.payload = 'Water not Flowing Pump 2'\n}\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 1300, "y": 460, "wires": [["c8e4d5e5.d449c8"]] }, { "id": "741ac43f.33014c", "type": "smithtek_node_red_record", "z": "dd6d6754.3b5bd8", "name": "time record pump1", "recordType": "time", "saveto": "pump1", "savetoType": "flow", "start": "true", "startType": "bool", "stop": "false", "stopType": "bool", "multiplier": 1, "x": 1320, "y": 160, "wires": [[]] }, { "id": "6ab252cc.5e2c1c", "type": "smithtek_node_red_record", "z": "dd6d6754.3b5bd8", "name": "time record pum2", "recordType": "time", "saveto": "pump2", "savetoType": "flow", "start": "true", "startType": "bool", "stop": "false", "stopType": "bool", "multiplier": 1, "x": 1330, "y": 260, "wires": [[]] }, { "id": "636404bb.741b1c", "type": "smithtek_node_red_reset_formatter", "z": "dd6d6754.3b5bd8", "name": "", "x": 910, "y": 100, "wires": [["741ac43f.33014c"]] }, { "id": "f83a71cc.4b01d", "type": "smithtek_node_red_reset_formatter", "z": "dd6d6754.3b5bd8", "name": "", "x": 910, "y": 200, "wires": [["6ab252cc.5e2c1c"]] }, { "id": "dcf06e8f.7fbc6", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "reset count 1", "topic": "", "payload": "", "payloadType": "date", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 670, "y": 80, "wires": [["636404bb.741b1c"]] }, { "id": "467c4cc6.260754", "type": "inject", "z": "dd6d6754.3b5bd8", "name": "reset count 2", "topic": "", "payload": "", "payloadType": "date", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 670, "y": 160, "wires": [["f83a71cc.4b01d"]] } ]