1180 lines
33 KiB
JSON
1180 lines
33 KiB
JSON
[
|
|
{
|
|
"id": "4755f17766e954e3",
|
|
"type": "tab",
|
|
"label": "Flow 1",
|
|
"disabled": false,
|
|
"info": "",
|
|
"env": []
|
|
},
|
|
{
|
|
"id": "4c264279abe4112c",
|
|
"type": "junction",
|
|
"z": "4755f17766e954e3",
|
|
"x": 660,
|
|
"y": 260,
|
|
"wires": [
|
|
[
|
|
"1471a83bc5699af7"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "12347cb33341d394",
|
|
"type": "junction",
|
|
"z": "4755f17766e954e3",
|
|
"x": 980,
|
|
"y": 180,
|
|
"wires": [
|
|
[
|
|
"4a636aeb4df0b73b",
|
|
"806bea8d7cbfb2be",
|
|
"4e481c662b48dbcd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "16115503af36b2f9",
|
|
"type": "sftp",
|
|
"host": "ftp1.aquon.nl",
|
|
"port": "22",
|
|
"forceIPv4": false,
|
|
"forceIPv6": false,
|
|
"username": "wsbd_renxr1",
|
|
"privateKey": "",
|
|
"readyTimeout": "",
|
|
"strictVendor": true,
|
|
"debug": "// function - Set this to a function that receives a single \n// string argument to get detailed (local) debug information.",
|
|
"retries": "",
|
|
"retry_factor": "",
|
|
"retry_minTimeout": ""
|
|
},
|
|
{
|
|
"id": "d9e922b53fbf47e6",
|
|
"type": "ui_tab",
|
|
"name": "Monsternamekast",
|
|
"icon": "dashboard",
|
|
"disabled": false,
|
|
"hidden": false
|
|
},
|
|
{
|
|
"id": "9ea57a44b39c268b",
|
|
"type": "ui_group",
|
|
"name": "visuals",
|
|
"tab": "d9e922b53fbf47e6",
|
|
"order": 3,
|
|
"disp": true,
|
|
"width": "6",
|
|
"collapse": false,
|
|
"className": ""
|
|
},
|
|
{
|
|
"id": "efe1e0d843d51d57",
|
|
"type": "ui_group",
|
|
"name": "input",
|
|
"tab": "d9e922b53fbf47e6",
|
|
"order": 2,
|
|
"disp": true,
|
|
"width": "4",
|
|
"collapse": false,
|
|
"className": ""
|
|
},
|
|
{
|
|
"id": "a1f6e09dd4569bd6",
|
|
"type": "ui_group",
|
|
"name": "output",
|
|
"tab": "d9e922b53fbf47e6",
|
|
"order": 1,
|
|
"disp": true,
|
|
"width": "6",
|
|
"collapse": false,
|
|
"className": ""
|
|
},
|
|
{
|
|
"id": "d262df2175e21ee4",
|
|
"type": "ui_base",
|
|
"theme": {
|
|
"name": "theme-light",
|
|
"lightTheme": {
|
|
"default": "#0094CE",
|
|
"baseColor": "#0094CE",
|
|
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
|
|
"edited": true,
|
|
"reset": false
|
|
},
|
|
"darkTheme": {
|
|
"default": "#097479",
|
|
"baseColor": "#097479",
|
|
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
|
|
"edited": false
|
|
},
|
|
"customTheme": {
|
|
"name": "Untitled Theme 1",
|
|
"default": "#4B7930",
|
|
"baseColor": "#4B7930",
|
|
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
|
|
},
|
|
"themeState": {
|
|
"base-color": {
|
|
"default": "#0094CE",
|
|
"value": "#0094CE",
|
|
"edited": false
|
|
},
|
|
"page-titlebar-backgroundColor": {
|
|
"value": "#0094CE",
|
|
"edited": false
|
|
},
|
|
"page-backgroundColor": {
|
|
"value": "#fafafa",
|
|
"edited": false
|
|
},
|
|
"page-sidebar-backgroundColor": {
|
|
"value": "#ffffff",
|
|
"edited": false
|
|
},
|
|
"group-textColor": {
|
|
"value": "#1bbfff",
|
|
"edited": false
|
|
},
|
|
"group-borderColor": {
|
|
"value": "#ffffff",
|
|
"edited": false
|
|
},
|
|
"group-backgroundColor": {
|
|
"value": "#ffffff",
|
|
"edited": false
|
|
},
|
|
"widget-textColor": {
|
|
"value": "#111111",
|
|
"edited": false
|
|
},
|
|
"widget-backgroundColor": {
|
|
"value": "#0094ce",
|
|
"edited": false
|
|
},
|
|
"widget-borderColor": {
|
|
"value": "#ffffff",
|
|
"edited": false
|
|
},
|
|
"base-font": {
|
|
"value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
|
|
}
|
|
},
|
|
"angularTheme": {
|
|
"primary": "indigo",
|
|
"accents": "blue",
|
|
"warn": "red",
|
|
"background": "grey",
|
|
"palette": "light"
|
|
}
|
|
},
|
|
"site": {
|
|
"name": "Node-RED Dashboard",
|
|
"hideToolbar": "false",
|
|
"allowSwipe": "false",
|
|
"lockMenu": "false",
|
|
"allowTempTheme": "true",
|
|
"dateFormat": "DD/MM/YYYY",
|
|
"sizes": {
|
|
"sx": 48,
|
|
"sy": 48,
|
|
"gx": 6,
|
|
"gy": 6,
|
|
"cx": 6,
|
|
"cy": 6,
|
|
"px": 0,
|
|
"py": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "f3944ab24c95b6b0",
|
|
"type": "influxdb",
|
|
"hostname": "127.0.0.1",
|
|
"port": "8086",
|
|
"protocol": "http",
|
|
"database": "database",
|
|
"name": "Monsternamekast dongemond",
|
|
"usetls": false,
|
|
"tls": "",
|
|
"influxdbVersion": "2.0",
|
|
"url": "http://influxdb.centraal.wbd-rd.nl",
|
|
"timeout": "10",
|
|
"rejectUnauthorized": true
|
|
},
|
|
{
|
|
"id": "ce8f57cbc8b689ca",
|
|
"type": "revpi-server",
|
|
"host": "localhost",
|
|
"port": "8000",
|
|
"user": "admin",
|
|
"password": "tasbp4",
|
|
"rejectUnauthorized": false,
|
|
"ca": ""
|
|
},
|
|
{
|
|
"id": "88ac1e46a729d0c9",
|
|
"type": "mqtt-broker",
|
|
"name": "mqttcentraal",
|
|
"broker": "mqtt.centraal.wbd-rd.nl",
|
|
"port": "1883",
|
|
"clientid": "",
|
|
"autoConnect": true,
|
|
"usetls": false,
|
|
"protocolVersion": "4",
|
|
"keepalive": "200",
|
|
"cleansession": true,
|
|
"autoUnsubscribe": true,
|
|
"birthTopic": "",
|
|
"birthQos": "0",
|
|
"birthRetain": "false",
|
|
"birthPayload": "",
|
|
"birthMsg": {},
|
|
"closeTopic": "",
|
|
"closeQos": "0",
|
|
"closeRetain": "false",
|
|
"closePayload": "",
|
|
"closeMsg": {},
|
|
"willTopic": "",
|
|
"willQos": "0",
|
|
"willRetain": "false",
|
|
"willPayload": "",
|
|
"willMsg": {},
|
|
"userProps": "",
|
|
"sessionExpiry": ""
|
|
},
|
|
{
|
|
"id": "301ec30856c8a7a1",
|
|
"type": "mqtt-broker",
|
|
"name": "emqx",
|
|
"broker": "broker.emqx.io",
|
|
"port": "1883",
|
|
"clientid": "",
|
|
"autoConnect": true,
|
|
"usetls": false,
|
|
"protocolVersion": "4",
|
|
"keepalive": "60",
|
|
"cleansession": true,
|
|
"autoUnsubscribe": true,
|
|
"birthTopic": "",
|
|
"birthQos": "0",
|
|
"birthRetain": "false",
|
|
"birthPayload": "",
|
|
"birthMsg": {},
|
|
"closeTopic": "",
|
|
"closeQos": "0",
|
|
"closeRetain": "false",
|
|
"closePayload": "",
|
|
"closeMsg": {},
|
|
"willTopic": "",
|
|
"willQos": "0",
|
|
"willRetain": "false",
|
|
"willPayload": "",
|
|
"willMsg": {},
|
|
"userProps": "",
|
|
"sessionExpiry": ""
|
|
},
|
|
{
|
|
"id": "4a636aeb4df0b73b",
|
|
"type": "function",
|
|
"z": "4755f17766e954e3",
|
|
"name": "pulse",
|
|
"func": "if(msg.payload.pulse){\n msg.payload = 1;\n}\nelse{\n msg.payload = 0;\n}\nreturn msg;",
|
|
"outputs": 1,
|
|
"timeout": 0,
|
|
"noerr": 0,
|
|
"initialize": "",
|
|
"finalize": "",
|
|
"libs": [],
|
|
"x": 1090,
|
|
"y": 140,
|
|
"wires": [
|
|
[
|
|
"95026c1cf8ce4494",
|
|
"be73c100878e4b1e"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "841df45a914eb9d9",
|
|
"type": "influxdb batch",
|
|
"z": "4755f17766e954e3",
|
|
"influxdb": "f3944ab24c95b6b0",
|
|
"precision": "",
|
|
"retentionPolicy": "",
|
|
"name": "influxdb",
|
|
"database": "database",
|
|
"precisionV18FluxV20": "ms",
|
|
"retentionPolicyV18Flux": "",
|
|
"org": "39a30abacde10f6a",
|
|
"bucket": "monster",
|
|
"x": 1460,
|
|
"y": 380,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "95026c1cf8ce4494",
|
|
"type": "revpi-output",
|
|
"z": "4755f17766e954e3",
|
|
"server": "ce8f57cbc8b689ca",
|
|
"outputpin": "O_2",
|
|
"overwritevalue": false,
|
|
"outputvalue": "",
|
|
"x": 1260,
|
|
"y": 60,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "edfa8b2edb711b76",
|
|
"type": "revpi-single-input",
|
|
"z": "4755f17766e954e3",
|
|
"server": "ce8f57cbc8b689ca",
|
|
"inputpin": "InputValue_1",
|
|
"topic": "i_flow",
|
|
"x": 120,
|
|
"y": 80,
|
|
"wires": [
|
|
[
|
|
"aa59531b077a81d5"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3ff3131720a0c7f8",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 24",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 540,
|
|
"y": 80,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "aa59531b077a81d5",
|
|
"type": "range",
|
|
"z": "4755f17766e954e3",
|
|
"minin": "4000",
|
|
"maxin": "20000",
|
|
"minout": "0",
|
|
"maxout": "6000",
|
|
"action": "scale",
|
|
"round": false,
|
|
"property": "payload",
|
|
"name": "i_flow",
|
|
"x": 310,
|
|
"y": 80,
|
|
"wires": [
|
|
[
|
|
"3ff3131720a0c7f8",
|
|
"4c264279abe4112c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "7c75c26506fea905",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 14",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 320,
|
|
"y": 420,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "c8145fe064a57b32",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "15 07 * * *",
|
|
"once": false,
|
|
"onceDelay": "1",
|
|
"topic": "",
|
|
"payload": "",
|
|
"payloadType": "date",
|
|
"x": 130,
|
|
"y": 380,
|
|
"wires": [
|
|
[
|
|
"b0d469d8b63df5fe"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "f00954bc2b98ad24",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "fetch data from aquon",
|
|
"info": "",
|
|
"x": 140,
|
|
"y": 340,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "01e31c79b1259a03",
|
|
"type": "file in",
|
|
"z": "4755f17766e954e3",
|
|
"name": "monsternametijden",
|
|
"filename": "./.node-red/node_modules/typicals/monster/config/monsternametijden.csv",
|
|
"filenameType": "str",
|
|
"format": "utf8",
|
|
"chunk": false,
|
|
"sendError": false,
|
|
"encoding": "none",
|
|
"allProps": false,
|
|
"x": 330,
|
|
"y": 520,
|
|
"wires": [
|
|
[
|
|
"68db9a12b380d615",
|
|
"1f16dcb96005df11"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "7830bc245b4f2611",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "50 07 * * *",
|
|
"once": true,
|
|
"onceDelay": "10",
|
|
"topic": "aquon_monsternametijden",
|
|
"payload": "",
|
|
"payloadType": "date",
|
|
"x": 130,
|
|
"y": 520,
|
|
"wires": [
|
|
[
|
|
"01e31c79b1259a03"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "68db9a12b380d615",
|
|
"type": "csv",
|
|
"z": "4755f17766e954e3",
|
|
"name": "monsternametijden",
|
|
"sep": ",",
|
|
"hdrin": true,
|
|
"hdrout": "all",
|
|
"multi": "mult",
|
|
"ret": "\\n",
|
|
"temp": "SAMPLE_NAME,DESCRIPTION,SAMPLED_DATE,START_DATE,END_DATE",
|
|
"skip": "0",
|
|
"strings": true,
|
|
"include_empty_strings": "",
|
|
"include_null_values": "",
|
|
"x": 570,
|
|
"y": 520,
|
|
"wires": [
|
|
[
|
|
"1f0d10957029a8dd",
|
|
"4c264279abe4112c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1f0d10957029a8dd",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 20",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 580,
|
|
"y": 560,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "abface34b7a5380e",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "fetch data from local file and convert to json",
|
|
"info": "",
|
|
"x": 200,
|
|
"y": 480,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "26c99474e7d67992",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "55 07 * * *",
|
|
"once": true,
|
|
"onceDelay": "1",
|
|
"topic": "",
|
|
"payload": "",
|
|
"payloadType": "date",
|
|
"x": 130,
|
|
"y": 660,
|
|
"wires": [
|
|
[
|
|
"677a266006b218c6"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "677a266006b218c6",
|
|
"type": "http request",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"method": "GET",
|
|
"ret": "txt",
|
|
"paytoqs": "ignore",
|
|
"url": "https://api.open-meteo.com/v1/forecast?latitude=51.7140004961472,51.714000496148444,51.71400049614957,51.71400049615058,51.7140004961515,51.7140004961523,51.714000496153,51.69100049707191,51.69100049707316,51.69100049707432,51.69100049707531,51.69100049707621,51.668000497995365,51.66800049799658,51.66800049799769,51.66800049799869,51.668000497999614,51.6680004980004,51.64500049891743,51.64500049891865,51.645000498919764,51.64500049892077,51.645000498921675,51.64500049892247,51.622000499839395,51.6220004998405,51.62200049984153,51.62200049984241,51.59900050076092,51.59900050076181&longitude=4.772999997019469,4.809999997301288,4.8469999975830875,4.883999997864905,4.920999998146714,4.95799999842853,4.994999998710344,4.772999997010078,4.80999999729239,4.8469999975747164,4.883999997857032,4.920999998139366,4.772999997000686,4.809999997283514,4.8469999975663445,4.883999997849185,4.920999998132014,4.957999998414859,4.772999996991296,4.80999999727464,4.84699999755798,4.88399999784133,4.920999998124684,4.957999998408024,4.809999997265776,4.846999997549634,4.88399999783348,4.920999998117339,4.883999997825649,4.920999998110016&hourly=precipitation,precipitation_probability&timezone=Europe%2FBerlin&past_days=2&forecast_days=2",
|
|
"tls": "",
|
|
"persist": false,
|
|
"proxy": "",
|
|
"insecureHTTPParser": false,
|
|
"authType": "",
|
|
"senderr": false,
|
|
"headers": [],
|
|
"x": 290,
|
|
"y": 660,
|
|
"wires": [
|
|
[
|
|
"be77f74e92cee63a"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "9e438b826cb1e927",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 35",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 640,
|
|
"y": 700,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "be77f74e92cee63a",
|
|
"type": "json",
|
|
"z": "4755f17766e954e3",
|
|
"name": "rain_data",
|
|
"property": "payload",
|
|
"action": "",
|
|
"pretty": false,
|
|
"x": 460,
|
|
"y": 660,
|
|
"wires": [
|
|
[
|
|
"9d4732a6a8156ef8",
|
|
"9e438b826cb1e927"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "9d4732a6a8156ef8",
|
|
"type": "change",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "topic",
|
|
"pt": "msg",
|
|
"to": "rain_data",
|
|
"tot": "str"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 630,
|
|
"y": 660,
|
|
"wires": [
|
|
[
|
|
"9e438b826cb1e927",
|
|
"4c264279abe4112c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2d921a525c729adb",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "fetch data from meteo",
|
|
"info": "",
|
|
"x": 140,
|
|
"y": 600,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "b0d469d8b63df5fe",
|
|
"type": "sftp in",
|
|
"z": "4755f17766e954e3",
|
|
"sftp": "16115503af36b2f9",
|
|
"operation": "get",
|
|
"path": "",
|
|
"pattern": "",
|
|
"filename": "wsBD_MONSTERNAMETIJDEN.csv",
|
|
"localFilename": "./.node-red/node_modules/typicals/monster/config/monsternametijden.csv",
|
|
"name": "",
|
|
"x": 310,
|
|
"y": 380,
|
|
"wires": [
|
|
[
|
|
"7c75c26506fea905"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "ba25944513b27e82",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "start manual",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "i_start",
|
|
"payload": "true",
|
|
"payloadType": "bool",
|
|
"x": 130,
|
|
"y": 260,
|
|
"wires": [
|
|
[
|
|
"4c264279abe4112c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2daff244c891063b",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "pulse high",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "o_pulse",
|
|
"payload": "1",
|
|
"payloadType": "num",
|
|
"x": 1080,
|
|
"y": 60,
|
|
"wires": [
|
|
[
|
|
"95026c1cf8ce4494"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "a808af7687b4bc1e",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "pulse low",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "o_pulse",
|
|
"payload": "0",
|
|
"payloadType": "num",
|
|
"x": 1080,
|
|
"y": 100,
|
|
"wires": [
|
|
[
|
|
"95026c1cf8ce4494"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1713cce6e234b5c1",
|
|
"type": "http request",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"method": "POST",
|
|
"ret": "txt",
|
|
"paytoqs": "ignore",
|
|
"url": "https://webservice.z-info.nl/WSR/zi_wsr.svc/token",
|
|
"tls": "",
|
|
"persist": false,
|
|
"proxy": "",
|
|
"insecureHTTPParser": false,
|
|
"authType": "",
|
|
"senderr": false,
|
|
"headers": [],
|
|
"x": 1350,
|
|
"y": 260,
|
|
"wires": [
|
|
[
|
|
"e2159ff84294ec2d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e2159ff84294ec2d",
|
|
"type": "json",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"property": "payload",
|
|
"action": "",
|
|
"pretty": false,
|
|
"x": 1490,
|
|
"y": 220,
|
|
"wires": [
|
|
[
|
|
"cbb580ebc24d10fc"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "9aefefbcb587d4db",
|
|
"type": "http request",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"method": "PUT",
|
|
"ret": "txt",
|
|
"paytoqs": "ignore",
|
|
"url": "https://webservice.z-info.nl/WSR/zi_wsr.svc/json/NL.25/importmwd/pa/?gebruiker=WSR_WBD",
|
|
"tls": "",
|
|
"persist": false,
|
|
"proxy": "",
|
|
"insecureHTTPParser": false,
|
|
"authType": "",
|
|
"senderr": false,
|
|
"headers": [],
|
|
"x": 1790,
|
|
"y": 220,
|
|
"wires": [
|
|
[
|
|
"8f933b5d97d97b94"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "cbb580ebc24d10fc",
|
|
"type": "function",
|
|
"z": "4755f17766e954e3",
|
|
"name": "function 28",
|
|
"func": "let token = msg.payload.access_token;\nlet zinfoData = msg.zinfoData;\nlet zinfoDateFrom = msg.zinfoDateFrom;\nlet zinfoDateUntil = msg.zinfoDateUntil;\nlet zinfoNameSpace = \"25.ZRW11tlTA.\";\nlet zinfoDebietName = \"F021.m3\";\nlet zinfoPulseName = \"Q000.PULS\"\n\nmsg.payload = {\n \"import\":\n {\n \"algemeen\": {\n \"AanleverendeOrganisatie\": \"NL.25\",\n \"Versie\": \"IMm2018\",\n \"Batchid\": `ZI_PA_NL.25_${Date.now()}.json`,\n \"Systeembron\": \"WBD/NEERSG\", //SysteemBron\n \"Systeemdoel\": \"HWH/Z-info\",\n \"Opmerking\": \"v1\"\n },\n \"data\":\n [\n {\n \"Meetwaarden\": [\n {\n \"mepid\": `${zinfoNameSpace + zinfoDebietName}`,\n \"dbmDtm\": `${zinfoDateFrom}`,\n \"dbmTijd\": \"06:00\",\n \"demDtm\": `${zinfoDateUntil}`,\n \"demTijd\": \"06:00\",\n \"mwdWaarde\": `${zinfoData.m3Total}`,\n \"mwdWaardeAN\": \"\",\n \"nMwd\": \"\",\n \"mwdOpmerk\": \"TestR&D\"\n },\n {\n \"mepid\": `${zinfoNameSpace + zinfoPulseName}`,\n \"dbmDtm\": `${zinfoDateFrom}`,\n \"dbmTijd\": \"06:00\",\n \"demDtm\": `${zinfoDateUntil}`,\n \"demTijd\": \"06:00\",\n \"mwdWaarde\": `${zinfoData.pulse}`,\n \"mwdWaardeAN\": \"\",\n \"nMwd\": \"\",\n \"mwdOpmerk\": \"TestR&D\"\n }\n\n ]\n }\n ]\n }\n}\n\nmsg.headers['authorization'] = 'Bearer ' + token;\n\nreturn msg;",
|
|
"outputs": 1,
|
|
"timeout": 0,
|
|
"noerr": 0,
|
|
"initialize": "",
|
|
"finalize": "",
|
|
"libs": [],
|
|
"x": 1630,
|
|
"y": 260,
|
|
"wires": [
|
|
[
|
|
"9aefefbcb587d4db"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "a5c2b6a5735ed781",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "Put data in z-info",
|
|
"info": "",
|
|
"x": 1140,
|
|
"y": 240,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "4e481c662b48dbcd",
|
|
"type": "function",
|
|
"z": "4755f17766e954e3",
|
|
"name": "function 29",
|
|
"func": "let running = context.get(\"running\");\n\n\nif(running){\n if(msg.payload.m3PerPulse){\n let pulse = Math.floor(msg.payload.m3PerPulse);\n context.set(\"pulse\", pulse);\n }\n if (msg.payload.m3Total) {\n let m3Total = Math.round(msg.payload.m3Total);\n context.set(\"m3Total\", m3Total);\n } \n}\n\n//execute code once when running\nif(msg.payload.running == false && running == true){\n\n //request token data\n msg.payload = \"grant_type=password&username=WSR_WBD_PDATA&password=ziwsr24WBD!_Pdata&client_id=WSR_CID_WBD_PDATA&client_secret=ziwsr24WBD!_PdataCid\";\n\n let zinfoData = {};\n zinfoData.pulse = context.get(\"pulse\");\n zinfoData.m3Total = context.get(\"m3Total\");\n msg.zinfoData = zinfoData;\n\n //build date\n let today = new Date();\n let day = today.getDate();\n let yesterday = today.getDate()-1;\n let month = String(today.getMonth() + 1).padStart(2, '0');\n let year = today.getFullYear();\n\n let dateFrom = `${year}-${month}-${yesterday}`;\n let dateUntil = `${year}-${month}-${day}`;\n\n //temp overwrite\n /*\n dateFrom = \"2024-10-20\";\n dateUntil = \"2024-10-21\";\n zinfoData.pulse = 209;\n zinfoData.m3Total = 16576;\n */\n //-----------\n\n msg.zinfoDateFrom = dateFrom;\n msg.zinfoDateUntil = dateUntil;\n\n node.send(msg);\n}\n\nif(msg.payload.running){\n running = true;\n\n}\n\nif (!msg.payload.running){\n running = false;\n}\n\ncontext.set(\"running\",running);\n\nnode.done();",
|
|
"outputs": 1,
|
|
"timeout": 0,
|
|
"noerr": 0,
|
|
"initialize": "// Code added here will be run once\n// whenever the node is started.\ncontext.set(\"running\",false);",
|
|
"finalize": "",
|
|
"libs": [],
|
|
"x": 1130,
|
|
"y": 280,
|
|
"wires": [
|
|
[
|
|
"1713cce6e234b5c1",
|
|
"3ab00a90765cc1d6"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3ab00a90765cc1d6",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 79",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1340,
|
|
"y": 300,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "41986f1bd00ac96c",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "true",
|
|
"props": [
|
|
{
|
|
"p": "payload.running",
|
|
"v": "true",
|
|
"vt": "bool"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "running",
|
|
"x": 850,
|
|
"y": 320,
|
|
"wires": [
|
|
[
|
|
"4e481c662b48dbcd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "8f933b5d97d97b94",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 80",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1940,
|
|
"y": 260,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "1471a83bc5699af7",
|
|
"type": "monster",
|
|
"z": "4755f17766e954e3",
|
|
"name": "Monsternamekast",
|
|
"number": "1",
|
|
"samplingtime": "24",
|
|
"minvolume": "5",
|
|
"maxweight": "23",
|
|
"emptyWeightBucket": "8.3",
|
|
"aquon_sample_name": "112100",
|
|
"x": 800,
|
|
"y": 260,
|
|
"wires": [
|
|
[
|
|
"96f0f7814852a184",
|
|
"12347cb33341d394"
|
|
],
|
|
[
|
|
"7fa16c68dea50bb3",
|
|
"ff0bc82714c36c74"
|
|
],
|
|
[
|
|
"841df45a914eb9d9",
|
|
"d6a201ade73d9967"
|
|
],
|
|
[]
|
|
]
|
|
},
|
|
{
|
|
"id": "7fa16c68dea50bb3",
|
|
"type": "join",
|
|
"z": "4755f17766e954e3",
|
|
"name": "",
|
|
"mode": "custom",
|
|
"build": "array",
|
|
"property": "payload",
|
|
"propertyType": "msg",
|
|
"key": "topic",
|
|
"joiner": "\\n",
|
|
"joinerType": "str",
|
|
"accumulate": false,
|
|
"timeout": "",
|
|
"count": "10",
|
|
"reduceRight": false,
|
|
"reduceExp": "",
|
|
"reduceInit": "",
|
|
"reduceInitType": "",
|
|
"reduceFixup": "",
|
|
"x": 1110,
|
|
"y": 380,
|
|
"wires": [
|
|
[
|
|
"841df45a914eb9d9",
|
|
"7e2c28813fa2140f"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1f16dcb96005df11",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 83",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 360,
|
|
"y": 560,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "f6ba2899faab0233",
|
|
"type": "inject",
|
|
"z": "4755f17766e954e3",
|
|
"name": "false",
|
|
"props": [
|
|
{
|
|
"p": "payload.running",
|
|
"v": "false",
|
|
"vt": "bool"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "running",
|
|
"x": 850,
|
|
"y": 360,
|
|
"wires": [
|
|
[
|
|
"4e481c662b48dbcd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "7e2c28813fa2140f",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 84",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1260,
|
|
"y": 420,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "fe6c8c8bdc73595e",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "Translate input to m3",
|
|
"info": "",
|
|
"x": 360,
|
|
"y": 40,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "ea5f7e03152f93f7",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "Emergency start",
|
|
"info": "",
|
|
"x": 120,
|
|
"y": 220,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "d08a4d1200f49910",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "Manual puls",
|
|
"info": "",
|
|
"x": 1070,
|
|
"y": 20,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "9f812a436b26f880",
|
|
"type": "comment",
|
|
"z": "4755f17766e954e3",
|
|
"name": "Place data in dbase",
|
|
"info": "",
|
|
"x": 1150,
|
|
"y": 340,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "be73c100878e4b1e",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 85",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1260,
|
|
"y": 140,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "96f0f7814852a184",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 86",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 920,
|
|
"y": 140,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "d6a201ade73d9967",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 87",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 990,
|
|
"y": 480,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "ff0bc82714c36c74",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 88",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 770,
|
|
"y": 160,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "806bea8d7cbfb2be",
|
|
"type": "debug",
|
|
"z": "4755f17766e954e3",
|
|
"name": "debug 89",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1100,
|
|
"y": 180,
|
|
"wires": []
|
|
}
|
|
] |