before functional changes by codex
This commit is contained in:
21
examples/README.md
Normal file
21
examples/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Measurement Example Flows
|
||||
|
||||
These flows are import-ready Node-RED examples for the `measurement` node.
|
||||
|
||||
## Files
|
||||
- `basic.flow.json`
|
||||
Purpose: basic measurement injection and output inspection.
|
||||
|
||||
- `integration.flow.json`
|
||||
Purpose: parent/child registration and periodic measurement updates.
|
||||
|
||||
- `edge.flow.json`
|
||||
Purpose: invalid/edge payload driving for robustness checks.
|
||||
|
||||
## Requirements
|
||||
- EVOLV `measurement` node available in Node-RED.
|
||||
|
||||
## Import
|
||||
1. Open Node-RED import.
|
||||
2. Import one `*.flow.json` file.
|
||||
3. Deploy and inspect debug output.
|
||||
111
examples/basic.flow.json
Normal file
111
examples/basic.flow.json
Normal file
@@ -0,0 +1,111 @@
|
||||
[
|
||||
{
|
||||
"id": "m_tab_basic_1",
|
||||
"type": "tab",
|
||||
"label": "Measurement Basic",
|
||||
"disabled": false,
|
||||
"info": "Basic measurement flow"
|
||||
},
|
||||
{
|
||||
"id": "m_basic_node",
|
||||
"type": "measurement",
|
||||
"z": "m_tab_basic_1",
|
||||
"name": "M Basic",
|
||||
"scaling": true,
|
||||
"i_min": 0,
|
||||
"i_max": 100,
|
||||
"i_offset": 0,
|
||||
"o_min": 0,
|
||||
"o_max": 10,
|
||||
"simulator": false,
|
||||
"smooth_method": "mean",
|
||||
"count": 5,
|
||||
"uuid": "",
|
||||
"supplier": "vendor",
|
||||
"category": "sensor",
|
||||
"assetType": "pressure",
|
||||
"model": "PT-1",
|
||||
"unit": "bar",
|
||||
"assetTagNumber": "PT-001",
|
||||
"enableLog": false,
|
||||
"logLevel": "error",
|
||||
"positionVsParent": "atEquipment",
|
||||
"positionIcon": "",
|
||||
"hasDistance": false,
|
||||
"distance": 0,
|
||||
"distanceUnit": "m",
|
||||
"distanceDescription": "",
|
||||
"x": 510,
|
||||
"y": 220,
|
||||
"wires": [["m_basic_dbg_process"],["m_basic_dbg_influx"],["m_basic_dbg_parent"]]
|
||||
},
|
||||
{
|
||||
"id": "m_basic_inject_measurement",
|
||||
"type": "inject",
|
||||
"z": "m_tab_basic_1",
|
||||
"name": "measurement 42",
|
||||
"props": [{"p": "topic", "vt": "str"},{"p": "payload", "vt": "num"}],
|
||||
"topic": "measurement",
|
||||
"payload": "42",
|
||||
"payloadType": "num",
|
||||
"x": 170,
|
||||
"y": 220,
|
||||
"wires": [["m_basic_node"]]
|
||||
},
|
||||
{
|
||||
"id": "m_basic_inject_calibrate",
|
||||
"type": "inject",
|
||||
"z": "m_tab_basic_1",
|
||||
"name": "calibrate",
|
||||
"props": [{"p": "topic", "vt": "str"}],
|
||||
"topic": "calibrate",
|
||||
"x": 140,
|
||||
"y": 170,
|
||||
"wires": [["m_basic_node"]]
|
||||
},
|
||||
{
|
||||
"id": "m_basic_dbg_process",
|
||||
"type": "debug",
|
||||
"z": "m_tab_basic_1",
|
||||
"name": "M process",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 750,
|
||||
"y": 180,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "m_basic_dbg_influx",
|
||||
"type": "debug",
|
||||
"z": "m_tab_basic_1",
|
||||
"name": "M influx",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 740,
|
||||
"y": 220,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "m_basic_dbg_parent",
|
||||
"type": "debug",
|
||||
"z": "m_tab_basic_1",
|
||||
"name": "M parent",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 740,
|
||||
"y": 260,
|
||||
"wires": []
|
||||
}
|
||||
]
|
||||
120
examples/edge.flow.json
Normal file
120
examples/edge.flow.json
Normal file
@@ -0,0 +1,120 @@
|
||||
[
|
||||
{
|
||||
"id": "m_tab_edge_1",
|
||||
"type": "tab",
|
||||
"label": "Measurement Edge",
|
||||
"disabled": false,
|
||||
"info": "Edge-case measurement flow"
|
||||
},
|
||||
{
|
||||
"id": "m_edge_node",
|
||||
"type": "measurement",
|
||||
"z": "m_tab_edge_1",
|
||||
"name": "M Edge",
|
||||
"scaling": true,
|
||||
"i_min": 0,
|
||||
"i_max": 100,
|
||||
"i_offset": 0,
|
||||
"o_min": 0,
|
||||
"o_max": 10,
|
||||
"simulator": false,
|
||||
"smooth_method": "mean",
|
||||
"count": 5,
|
||||
"supplier": "vendor",
|
||||
"category": "sensor",
|
||||
"assetType": "pressure",
|
||||
"model": "PT-E",
|
||||
"unit": "bar",
|
||||
"positionVsParent": "atEquipment",
|
||||
"hasDistance": false,
|
||||
"distance": 0,
|
||||
"distanceUnit": "m",
|
||||
"enableLog": false,
|
||||
"logLevel": "error",
|
||||
"x": 510,
|
||||
"y": 220,
|
||||
"wires": [["m_edge_dbg_process"],["m_edge_dbg_influx"],["m_edge_dbg_parent"]]
|
||||
},
|
||||
{
|
||||
"id": "m_edge_bad_payload",
|
||||
"type": "inject",
|
||||
"z": "m_tab_edge_1",
|
||||
"name": "measurement bad payload",
|
||||
"props": [{"p": "topic", "vt": "str"},{"p": "payload", "vt": "str"}],
|
||||
"topic": "measurement",
|
||||
"payload": "not-a-number",
|
||||
"payloadType": "str",
|
||||
"x": 170,
|
||||
"y": 170,
|
||||
"wires": [["m_edge_node"]]
|
||||
},
|
||||
{
|
||||
"id": "m_edge_toggle_outlier",
|
||||
"type": "inject",
|
||||
"z": "m_tab_edge_1",
|
||||
"name": "toggle outlier",
|
||||
"props": [{"p": "topic", "vt": "str"}],
|
||||
"topic": "outlierDetection",
|
||||
"x": 140,
|
||||
"y": 220,
|
||||
"wires": [["m_edge_node"]]
|
||||
},
|
||||
{
|
||||
"id": "m_edge_unknown_topic",
|
||||
"type": "inject",
|
||||
"z": "m_tab_edge_1",
|
||||
"name": "unknown topic",
|
||||
"props": [{"p": "topic", "vt": "str"},{"p": "payload", "vt": "num"}],
|
||||
"topic": "doesNotExist",
|
||||
"payload": "1",
|
||||
"payloadType": "num",
|
||||
"x": 150,
|
||||
"y": 270,
|
||||
"wires": [["m_edge_node"]]
|
||||
},
|
||||
{
|
||||
"id": "m_edge_dbg_process",
|
||||
"type": "debug",
|
||||
"z": "m_tab_edge_1",
|
||||
"name": "M edge process",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 750,
|
||||
"y": 180,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "m_edge_dbg_influx",
|
||||
"type": "debug",
|
||||
"z": "m_tab_edge_1",
|
||||
"name": "M edge influx",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 740,
|
||||
"y": 220,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "m_edge_dbg_parent",
|
||||
"type": "debug",
|
||||
"z": "m_tab_edge_1",
|
||||
"name": "M edge parent",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 740,
|
||||
"y": 260,
|
||||
"wires": []
|
||||
}
|
||||
]
|
||||
142
examples/integration.flow.json
Normal file
142
examples/integration.flow.json
Normal file
@@ -0,0 +1,142 @@
|
||||
[
|
||||
{
|
||||
"id": "m_tab_int_1",
|
||||
"type": "tab",
|
||||
"label": "Measurement Integration",
|
||||
"disabled": false,
|
||||
"info": "Integration-oriented measurement flow"
|
||||
},
|
||||
{
|
||||
"id": "m_int_parent",
|
||||
"type": "measurement",
|
||||
"z": "m_tab_int_1",
|
||||
"name": "M Parent",
|
||||
"scaling": true,
|
||||
"i_min": 0,
|
||||
"i_max": 100,
|
||||
"i_offset": 0,
|
||||
"o_min": 0,
|
||||
"o_max": 10,
|
||||
"simulator": false,
|
||||
"smooth_method": "mean",
|
||||
"count": 5,
|
||||
"supplier": "vendor",
|
||||
"category": "sensor",
|
||||
"assetType": "pressure",
|
||||
"model": "PT-P",
|
||||
"unit": "bar",
|
||||
"positionVsParent": "atEquipment",
|
||||
"hasDistance": false,
|
||||
"distance": 0,
|
||||
"distanceUnit": "m",
|
||||
"enableLog": false,
|
||||
"logLevel": "error",
|
||||
"x": 560,
|
||||
"y": 220,
|
||||
"wires": [["m_int_dbg_process"],["m_int_dbg_influx"],["m_int_dbg_parent"]]
|
||||
},
|
||||
{
|
||||
"id": "m_int_child",
|
||||
"type": "measurement",
|
||||
"z": "m_tab_int_1",
|
||||
"name": "M Child",
|
||||
"scaling": true,
|
||||
"i_min": 0,
|
||||
"i_max": 100,
|
||||
"i_offset": 0,
|
||||
"o_min": 0,
|
||||
"o_max": 10,
|
||||
"simulator": false,
|
||||
"smooth_method": "none",
|
||||
"count": 3,
|
||||
"supplier": "vendor",
|
||||
"category": "sensor",
|
||||
"assetType": "pressure",
|
||||
"model": "PT-C",
|
||||
"unit": "bar",
|
||||
"positionVsParent": "upstream",
|
||||
"hasDistance": true,
|
||||
"distance": 5,
|
||||
"distanceUnit": "m",
|
||||
"enableLog": false,
|
||||
"logLevel": "error",
|
||||
"x": 560,
|
||||
"y": 360,
|
||||
"wires": [[],[],[]]
|
||||
},
|
||||
{
|
||||
"id": "m_int_register_child",
|
||||
"type": "inject",
|
||||
"z": "m_tab_int_1",
|
||||
"name": "register child",
|
||||
"props": [
|
||||
{"p": "topic", "vt": "str"},
|
||||
{"p": "payload", "vt": "str"},
|
||||
{"p": "positionVsParent", "v": "upstream", "vt": "str"}
|
||||
],
|
||||
"topic": "registerChild",
|
||||
"payload": "m_int_child",
|
||||
"payloadType": "str",
|
||||
"x": 150,
|
||||
"y": 180,
|
||||
"wires": [["m_int_parent"]]
|
||||
},
|
||||
{
|
||||
"id": "m_int_measurement",
|
||||
"type": "inject",
|
||||
"z": "m_tab_int_1",
|
||||
"name": "measurement 55",
|
||||
"props": [{"p": "topic", "vt": "str"},{"p": "payload", "vt": "num"}],
|
||||
"topic": "measurement",
|
||||
"payload": "55",
|
||||
"payloadType": "num",
|
||||
"x": 150,
|
||||
"y": 240,
|
||||
"wires": [["m_int_parent"]]
|
||||
},
|
||||
{
|
||||
"id": "m_int_dbg_process",
|
||||
"type": "debug",
|
||||
"z": "m_tab_int_1",
|
||||
"name": "M int process",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 810,
|
||||
"y": 180,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "m_int_dbg_influx",
|
||||
"type": "debug",
|
||||
"z": "m_tab_int_1",
|
||||
"name": "M int influx",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 800,
|
||||
"y": 220,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "m_int_dbg_parent",
|
||||
"type": "debug",
|
||||
"z": "m_tab_int_1",
|
||||
"name": "M int parent",
|
||||
"active": true,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"x": 800,
|
||||
"y": 260,
|
||||
"wires": []
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user