From c2d733ba36a057dac416c55461582926c3cd7426 Mon Sep 17 00:00:00 2001 From: pimmoerman Date: Sun, 28 Sep 2025 13:20:47 +0000 Subject: [PATCH] Upload files to "templates" --- templates/pump.json.tpl | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 templates/pump.json.tpl diff --git a/templates/pump.json.tpl b/templates/pump.json.tpl new file mode 100644 index 0000000..5730b23 --- /dev/null +++ b/templates/pump.json.tpl @@ -0,0 +1,68 @@ +[ + { + "id": "inject1", + "type": "inject", + "name": "Start – {{name}}", + "props": [ + { "p": "payload" } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{{id}}", + "payloadType": "str", + "wires": [["function1"]] + }, + { + "id": "function1", + "type": "function", + "name": "Verwerk asset data", + "func": "msg.payload = {\n asset_id: \"{{id}}\",\n asset_name: \"{{name}}\",\n timestamp: Date.now()\n};\nreturn msg;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "wires": [["change1","debug1","http1"]] + }, + { + "id": "change1", + "type": "change", + "name": "Voeg status toe", + "rules": [ + { "t": "set", "p": "payload.status", "pt": "msg", "to": "active", "tot": "str" } + ], + "wires": [["debug1"]] + }, + { + "id": "http1", + "type": "http request", + "name": "Stuur naar externe API", + "method": "POST", + "ret": "txt", + "url": "http://localhost:3000/api/asset", + "tls": "", + "persist": false, + "proxy": "", + "authType": "", + "x": 540, + "y": 260, + "wires": [["debug1"]] + }, + { + "id": "debug1", + "type": "debug", + "name": "Output debug", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "wires": [] + } +]