[ { "id": "5b3bd8916448e558", "type": "ctrlx-datalayer-subscribe", "z": "d8d335038913d08f", "subscription": "ef5014f53c7079d6", "path": "plc/app/Application/sym/PLC_PRG/Activate_CoilB", "name": "Test_B", "inputs": 0, "x": 110, "y": 680, "wires": [ [ "b3d07d76f154fdad" ] ] }, { "id": "b3d07d76f154fdad", "type": "trigger", "z": "d8d335038913d08f", "name": "", "op1": "", "op2": "0", "op1type": "pay", "op2type": "str", "duration": "-1", "extend": false, "overrideDelay": false, "units": "s", "reset": "", "bytopic": "all", "topic": "topic", "outputs": 1, "x": 320, "y": 680, "wires": [ [ "a5ebbe1c66f69197" ] ] }, { "id": "393b4d1a6cd085b8", "type": "join", "z": "d8d335038913d08f", "name": "", "mode": "custom", "build": "object", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "joinerType": "str", "accumulate": true, "timeout": "", "count": "1", "reduceRight": false, "reduceExp": "", "reduceInit": "", "reduceInitType": "num", "reduceFixup": "", "x": 790, "y": 560, "wires": [ [ "8a71eabd129d4203", "4ead183d8e5b606d" ] ] }, { "id": "99a29fd883401c6f", "type": "string", "z": "d8d335038913d08f", "name": "", "methods": [ { "name": "replaceAll", "params": [ { "type": "str", "value": "plc/app/Application/sym/PLC_PRG/PressureB_Raw" }, { "type": "str", "value": "RopeTension" } ] } ], "prop": "topic", "propout": "topic", "object": "msg", "objectout": "msg", "x": 550, "y": 560, "wires": [ [ "393b4d1a6cd085b8" ] ] }, { "id": "a5ebbe1c66f69197", "type": "string", "z": "d8d335038913d08f", "name": "", "methods": [ { "name": "replaceAll", "params": [ { "type": "str", "value": "plc/app/Application/sym/PLC_PRG/Activate_CoilB" }, { "type": "str", "value": "ManualOverride" } ] } ], "prop": "topic", "propout": "topic", "object": "msg", "objectout": "msg", "x": 550, "y": 680, "wires": [ [ "393b4d1a6cd085b8" ] ] }, { "id": "cb1c0fa9ded6f6b9", "type": "comment", "z": "d8d335038913d08f", "name": "Offline- AutoLogger", "info": "", "x": 150, "y": 480, "wires": [] }, { "id": "8a71eabd129d4203", "type": "function", "z": "d8d335038913d08f", "name": "Reassign variable", "func": "var Timestamp = msg.payload.Timestamp;\nvar Tension = msg.payload.RopeTension;\nvar ManualOverride = msg.payload.ManualOverride;\n\n\nvar m = {'DateTime':Timestamp,'Tension(kN)': Tension, 'ManualOverride': ManualOverride };\n\nreturn { payload: m };\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1030, "y": 560, "wires": [ [ "8289ca59b22005ee" ] ] }, { "id": "8289ca59b22005ee", "type": "csv", "z": "d8d335038913d08f", "name": "", "sep": ",", "hdrin": "", "hdrout": "once", "multi": "one", "ret": "\\n", "temp": "DateTime,Tension(kN),ManualOverride", "skip": "0", "strings": true, "include_empty_strings": "", "include_null_values": "", "x": 1250, "y": 560, "wires": [ [ "8c683b41c694840c" ] ] }, { "id": "8c683b41c694840c", "type": "file", "z": "d8d335038913d08f", "name": "", "filename": "/media/mmcblk1p1/Datalog1.csv", "filenameType": "str", "appendNewline": true, "createDir": true, "overwriteFile": "false", "encoding": "utf8", "x": 1490, "y": 560, "wires": [ [ "d1cb9febc12eec08" ] ] }, { "id": "95b2debead1aa3d4", "type": "inject", "z": "d8d335038913d08f", "name": "Inject DateTime", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "1", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "Timestamp", "payload": "", "payloadType": "date", "x": 170, "y": 760, "wires": [ [ "b0e2c32c44bdcfed" ] ] }, { "id": "b0e2c32c44bdcfed", "type": "moment", "z": "d8d335038913d08f", "name": "", "topic": "", "input": "", "inputType": "msg", "inTz": "Asia/Manila", "adjAmount": "8", "adjType": "hours", "adjDir": "add", "format": "", "locale": "C", "output": "", "outputType": "msg", "outTz": "Asia/Manila", "x": 520, "y": 760, "wires": [ [ "393b4d1a6cd085b8" ] ] }, { "id": "4ead183d8e5b606d", "type": "debug", "z": "d8d335038913d08f", "name": "debug 3", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1060, "y": 720, "wires": [] }, { "id": "d1cb9febc12eec08", "type": "debug", "z": "d8d335038913d08f", "name": "debug 4", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1720, "y": 640, "wires": [] }, { "id": "f74603a9022fe996", "type": "http request", "z": "d8d335038913d08f", "name": "http_Access_Token_Request", "method": "use", "ret": "obj", "paytoqs": "ignore", "url": "", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [ { "keyType": "Accept", "keyValue": "", "valueType": "other", "valueValue": "application/json" } ], "x": 720, "y": 160, "wires": [ [ "3c19256989b345c2", "925455fc8d55aeb3" ] ] }, { "id": "bdf61d5a2c768e68", "type": "inject", "z": "d8d335038913d08f", "name": "Trigger Request", "props": [ { "p": "payload" } ], "repeat": "1", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "Trigger", "payloadType": "str", "x": 170, "y": 160, "wires": [ [ "4c354a92f359cb74" ] ] }, { "id": "189e02ca24d7bc58", "type": "debug", "z": "d8d335038913d08f", "name": "debug 6", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 940, "y": 280, "wires": [] }, { "id": "32b31c5e3a8f96de", "type": "http request", "z": "d8d335038913d08f", "name": "http_get_storage_info", "method": "use", "ret": "obj", "paytoqs": "ignore", "url": "", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 640, "y": 280, "wires": [ [ "189e02ca24d7bc58", "5d5d20058e84ddfa" ] ] }, { "id": "8f95d0266b55237a", "type": "inject", "z": "d8d335038913d08f", "name": "Trigger Request", "props": [], "repeat": "1", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 170, "y": 280, "wires": [ [ "96c262adb3fb95ea" ] ] }, { "id": "f9e8f97941cf1ed6", "type": "comment", "z": "d8d335038913d08f", "name": "SD card Mount Condition update(Via REST API)", "info": "", "x": 220, "y": 80, "wires": [] }, { "id": "3c19256989b345c2", "type": "change", "z": "d8d335038913d08f", "name": "", "rules": [ { "t": "set", "p": "access_token", "pt": "global", "to": "payload[\"access_token\"]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1130, "y": 160, "wires": [ [] ] }, { "id": "96c262adb3fb95ea", "type": "function", "z": "d8d335038913d08f", "name": "GET request", "func": "msg.method= \"GET\";\n\nmsg.url = \"https://192.168.2.246/storage/api/v1/media\";\nmsg.payload ={};\nmsg.headers ={};\nmsg.headers[\"Authorization\"] = \"Bearer \" + global.get(\"access_token\");\nmsg.headers[\"Content-Type\"] = \"application/json\";\n\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 410, "y": 280, "wires": [ [ "32b31c5e3a8f96de" ] ] }, { "id": "925455fc8d55aeb3", "type": "debug", "z": "d8d335038913d08f", "name": "debug 9", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1100, "y": 220, "wires": [] }, { "id": "4c354a92f359cb74", "type": "function", "z": "d8d335038913d08f", "name": "POST request", "func": "msg.method= \"POST\";\n\nmsg.url = \"https://192.168.2.246/identity-manager/api/v2/auth/token\";\nmsg.payload ={name:\"boschrexroth\", password:\"Jackson1997!\"};\nmsg.headers ={};\n\nmsg.headers[\"Content-Type\"] = \"application/json\";\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 460, "y": 160, "wires": [ [ "f74603a9022fe996" ] ] }, { "id": "dcbefd7306c4ff97", "type": "debug", "z": "d8d335038913d08f", "name": "debug 11", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 900, "y": 360, "wires": [] }, { "id": "30c4bf10c5d10377", "type": "http request", "z": "d8d335038913d08f", "name": "", "method": "use", "ret": "obj", "paytoqs": "ignore", "url": "", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 650, "y": 360, "wires": [ [ "dcbefd7306c4ff97" ] ] }, { "id": "5d5d20058e84ddfa", "type": "function", "z": "d8d335038913d08f", "name": "POST request", "func": "msg.method= \"POST\";\n\nmsg.url = \"https://192.168.2.246/storage/api/v1/tasks\";\nmsg.payload = {\n \"action\": \"mount\",\n \"parameters\": {\n \"media\": \"70d9cef6-54f9-4357-9d6c-9790c3a6efad\",\n \"assignment\": \"data-exchange\"\n }\n};\nmsg.headers ={};\nmsg.headers[\"Authorization\"] = \"Bearer \" + global.get(\"access_token\");\nmsg.headers[\"Content-Type\"] = \"application/json\";\nmsg.headers[\"Accept\"] = \"application/json\";\n\n\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 440, "y": 360, "wires": [ [ "30c4bf10c5d10377" ] ] }, { "id": "1c14fde421402b1b", "type": "ctrlx-datalayer-subscribe", "z": "d8d335038913d08f", "subscription": "ef5014f53c7079d6", "path": "plc/app/Application/sym/PLC_PRG/PressureB_Raw", "name": "Test_A", "inputs": 0, "x": 110, "y": 560, "wires": [ [ "99a29fd883401c6f" ] ] }, { "id": "ef5014f53c7079d6", "type": "ctrlx-config-subscription", "device": "021d2326543ad9bd", "name": "OM_CtrlX", "publishIntervalMs": "", "samplingInterval": "", "errorInterval": "", "keepaliveInterval": "", "queueSize": "", "deadbandValue": "" }, { "id": "021d2326543ad9bd", "type": "ctrlx-config", "name": "PALB Automation", "hostname": "192.168.2.246", "debug": false } ]