[ { "id": "f29d91cb4d0756f7", "type": "tab", "label": "Flow 2", "disabled": false, "info": "", "env": [] }, { "id": "0c1911040bda92a1", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogDateTimeStamp", "payloadFormat": "value", "name": "", "x": 460, "y": 220, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "19d20499b7609d36", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogTimeTimeStamp", "payloadFormat": "value", "name": "", "x": 460, "y": 260, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "9b4e956c85215262", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogEmployeeNumber", "payloadFormat": "value", "name": "", "x": 460, "y": 300, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "4bf5b54969f799c6", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogJobNumber", "payloadFormat": "value", "name": "", "x": 440, "y": 340, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "7ea9db1a040de853", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogModelNumber", "payloadFormat": "value", "name": "", "x": 450, "y": 380, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "ad0fd4d02e1117f9", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogSerialNumber", "payloadFormat": "value", "name": "", "x": 450, "y": 420, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "8c1b020a0d47d01f", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogMaxFlow", "payloadFormat": "value", "name": "", "x": 440, "y": 460, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "83a5f48cde2c445a", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogShiftPressureSetup", "payloadFormat": "value", "name": "", "x": 470, "y": 500, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "0880dc94544ddd99", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogMainReliefPressureSetup", "payloadFormat": "value", "name": "", "x": 490, "y": 540, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "711bd42a947789da", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogRotorRPMSetup", "payloadFormat": "value", "name": "", "x": 460, "y": 580, "wires": [ [ "65b5fb5de1d15bd4" ] ] }, { "id": "846518d126d2c6b8", "type": "inject", "z": "f29d91cb4d0756f7", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 110, "y": 380, "wires": [ [ "0c1911040bda92a1", "19d20499b7609d36", "9b4e956c85215262", "4bf5b54969f799c6", "7ea9db1a040de853", "ad0fd4d02e1117f9", "8c1b020a0d47d01f", "83a5f48cde2c445a", "0880dc94544ddd99", "711bd42a947789da", "2c70ff0be069c3bb", "280730dab1dd191d" ] ] }, { "id": "65b5fb5de1d15bd4", "type": "join", "z": "f29d91cb4d0756f7", "name": "", "mode": "custom", "build": "object", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "joinerType": "str", "accumulate": true, "timeout": "", "count": "10", "reduceRight": false, "reduceExp": "", "reduceInit": "", "reduceInitType": "", "reduceFixup": "", "x": 830, "y": 360, "wires": [ [ "0407595114100180", "8a9241c8c46da98e" ] ] }, { "id": "0407595114100180", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 810, "y": 280, "wires": [] }, { "id": "e0c7bf9ca9eebd17", "type": "function", "z": "f29d91cb4d0756f7", "name": "", "func": "msg.filename =\"/media/sda1/\"+flow.get(\"logsubfilename\") + \".csv\"\nmsg.filename2 = flow.get(\"logsubfilename\") + \".csv\"\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1240, "y": 360, "wires": [ [ "b0c68ea4dbe0b70c", "4bb0b69d9b4cba9f" ] ] }, { "id": "b0c68ea4dbe0b70c", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1230, "y": 280, "wires": [] }, { "id": "22b3847afabd47a8", "type": "fs-ops-copy", "z": "f29d91cb4d0756f7", "name": "to USB", "sourcePath": "", "sourcePathType": "str", "sourceFilename": "filename", "sourceFilenameType": "msg", "destPath": "/media/sda1", "destPathType": "str", "destFilename": "filename2", "destFilenameType": "msg", "link": false, "overwrite": true, "x": 2140, "y": 360, "wires": [ [ "b9667d0255078e17" ] ] }, { "id": "c5f2db9dda948444", "type": "change", "z": "f29d91cb4d0756f7", "name": "", "rules": [ { "t": "set", "p": "filename", "pt": "flow", "to": "logsubfilename", "tot": "flow" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1630, "y": 280, "wires": [ [ "429d48adf4666e1c", "2c4f12a8c155ca8b" ] ] }, { "id": "429d48adf4666e1c", "type": "csv", "z": "f29d91cb4d0756f7", "name": "", "sep": ",", "hdrin": false, "hdrout": "all", "multi": "one", "ret": "\\n", "temp": "Date,Time,Employee Number,Job Number,Model Number,Serial Number,Max Flow,Shift Pressure Setup,Main Relief Pressure Setup,Rotor RPM Setup,Cylinder Active,Hydraulic Active,Electric Active,Trap Door Only,Trap Door Pusher,Record Type,Case Drain Flow,Current Relief Pressure,Main Flow,Rotor RPM,Right Bearing Temp,Left Bearing Temp,Current Shift Pressure,Test Status,Cylinder Hydraulic Extended And Retracted,Cylinder Electric Extended And Retracted,High Flow Pressure,Low Flow Pressure", "skip": "0", "strings": true, "include_empty_strings": "", "include_null_values": "", "x": 1790, "y": 280, "wires": [ [ "4294f65252402924", "6d71559c0224c29e" ] ] }, { "id": "4294f65252402924", "type": "file", "z": "f29d91cb4d0756f7", "name": "overwrite file", "filename": "", "appendNewline": false, "createDir": true, "overwriteFile": "true", "encoding": "none", "x": 1930, "y": 280, "wires": [ [ "22b3847afabd47a8" ] ] }, { "id": "2c70ff0be069c3bb", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/LogSubFileName", "payloadFormat": "value", "name": "", "x": 450, "y": 100, "wires": [ [ "daabc02d7f4d2b47" ] ] }, { "id": "b9667d0255078e17", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 2150, "y": 300, "wires": [] }, { "id": "2c4f12a8c155ca8b", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1630, "y": 220, "wires": [] }, { "id": "6d71559c0224c29e", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1790, "y": 220, "wires": [] }, { "id": "280730dab1dd191d", "type": "ctrlx-datalayer-request", "z": "f29d91cb4d0756f7", "device": "e3fffde42c19089b", "method": "READ", "path": "devicebridge/CtrlXCORE/WriteLogData", "payloadFormat": "value", "name": "", "x": 440, "y": 60, "wires": [ [ "4c6d6000806a033e" ] ] }, { "id": "645dd0197c396050", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1150, "y": 60, "wires": [] }, { "id": "4c6d6000806a033e", "type": "function", "z": "f29d91cb4d0756f7", "name": "", "func": "var writedata=flow.get(\"writedata\");\nflow.set(\"writedata\",msg.payload);\nif (writedata==true){\n return [msg];}", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 760, "y": 60, "wires": [ [ "10bd8d6525bfc334" ] ] }, { "id": "4bb0b69d9b4cba9f", "type": "switch", "z": "f29d91cb4d0756f7", "name": "new file?", "property": "logsubfilename", "propertyType": "flow", "rules": [ { "t": "neq", "v": "filename", "vt": "flow" }, { "t": "eq", "v": "filename", "vt": "flow" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 1440, "y": 360, "wires": [ [ "c5f2db9dda948444" ], [ "dfe2fc3d7549d523" ] ] }, { "id": "dfe2fc3d7549d523", "type": "csv", "z": "f29d91cb4d0756f7", "name": "", "sep": ",", "hdrin": true, "hdrout": "none", "multi": "one", "ret": "\\n", "temp": "Date,Time,Employee Number,Job Number,Model Number,Serial Number,Max Flow,Shift Pressure Setup,Main Relief Pressure Setup,Rotor RPM Setup,Cylinder Active,Hydraulic Active,Electric Active,Trap Door Only,Trap Door Pusher,Record Type,Case Drain Flow,Current Relief Pressure,Main Flow,Rotor RPM,Right Bearing Temp,Left Bearing Temp,Current Shift Pressure,Test Status,Cylinder Hydraulic Extended And Retracted,Cylinder Electric Extended And Retracted,High Flow Pressure,Low Flow Pressure", "skip": "0", "strings": true, "include_empty_strings": "", "include_null_values": "", "x": 1590, "y": 440, "wires": [ [ "df60cd7a5699da2d", "4bdb9fbfac473fb5" ] ] }, { "id": "df60cd7a5699da2d", "type": "file", "z": "f29d91cb4d0756f7", "name": "append file", "filename": "", "appendNewline": false, "createDir": false, "overwriteFile": "false", "encoding": "none", "x": 1930, "y": 440, "wires": [ [ "22b3847afabd47a8" ] ] }, { "id": "10bd8d6525bfc334", "type": "switch", "z": "f29d91cb4d0756f7", "name": "write?", "property": "writedata", "propertyType": "flow", "rules": [ { "t": "true" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 970, "y": 60, "wires": [ [ "645dd0197c396050" ] ] }, { "id": "8a9241c8c46da98e", "type": "switch", "z": "f29d91cb4d0756f7", "name": "Writejoin", "property": "writedata", "propertyType": "flow", "rules": [ { "t": "true" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 1040, "y": 360, "wires": [ [ "e0c7bf9ca9eebd17", "d270015f42deefa5" ] ] }, { "id": "4bdb9fbfac473fb5", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1590, "y": 520, "wires": [] }, { "id": "d270015f42deefa5", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1030, "y": 280, "wires": [] }, { "id": "daabc02d7f4d2b47", "type": "function", "z": "f29d91cb4d0756f7", "name": "", "func": "var logsubfilename = flow.get(\"logsubfilename\");\nflow.set(\"logsubfilename\",msg.payload);\n\nreturn [msg];", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 760, "y": 100, "wires": [ [ "632dc72130bc911c" ] ] }, { "id": "632dc72130bc911c", "type": "switch", "z": "f29d91cb4d0756f7", "name": "write?", "property": "writedata", "propertyType": "flow", "rules": [ { "t": "true" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 970, "y": 100, "wires": [ [ "17597e42ca91c457" ] ] }, { "id": "17597e42ca91c457", "type": "debug", "z": "f29d91cb4d0756f7", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1150, "y": 100, "wires": [] }, { "id": "e3fffde42c19089b", "type": "ctrlx-config", "name": "CORE", "hostname": "10.10.7.100", "debug": false } ]