Upload files to "templates"

This commit is contained in:
2025-09-28 13:20:47 +00:00
parent 2bc403892c
commit c2d733ba36

68
templates/pump.json.tpl Normal file
View File

@@ -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": []
}
]