Repository navigation
Expand file tree
/
Copy pathpower_measurement.json
More file actions
86 lines (86 loc) · 2.03 KB
/
Copy pathpower_measurement.json
File metadata and controls
86 lines (86 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"name": "TX Power Measurement",
"nodes": [
{
"id": "1",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [240, 300],
"parameters": {}
},
{
"id": "2",
"name": "Connect Sensor",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [460, 300],
"parameters": {
"method": "POST",
"url": "http://host.docker.internal:8765/connect",
"sendBody": true,
"contentType": "json",
"body": "{}"
}
},
{
"id": "3",
"name": "Read Power",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [680, 300],
"parameters": {
"method": "GET",
"url": "http://host.docker.internal:8765/power"
}
},
{
"id": "4",
"name": "Format Result",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [900, 300],
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{
"id": "a1",
"name": "power_dBm",
"type": "number",
"value": "={{ $json.value_dbm }}"
},
{
"id": "a2",
"name": "power_mW",
"type": "number",
"value": "={{ $json.value_mw }}"
},
{
"id": "a3",
"name": "timestamp",
"type": "string",
"value": "={{ $now }}"
}
]
},
"includeOtherFields": false
}
}
],
"connections": {
"Manual Trigger": {
"main": [[{ "node": "Connect Sensor", "type": "main", "index": 0 }]]
},
"Connect Sensor": {
"main": [[{ "node": "Read Power", "type": "main", "index": 0 }]]
},
"Read Power": {
"main": [[{ "node": "Format Result", "type": "main", "index": 0 }]]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
}
}