node-red-contrib-influxdb3 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +386 -386
- package/__tests__/influxdb3.test.js +786 -240
- package/examples/basic-flow.json +170 -170
- package/examples/mqtt-to-influx.json +134 -134
- package/influxdb3.html +243 -243
- package/influxdb3.js +400 -315
- package/package.json +41 -44
- package/renovate.json +6 -6
- package/test/point-api.test.js +56 -0
package/examples/basic-flow.json
CHANGED
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "example-flow",
|
|
4
|
-
"type": "tab",
|
|
5
|
-
"label": "InfluxDB v3 Example",
|
|
6
|
-
"disabled": false,
|
|
7
|
-
"info": "Example flow showing how to write data to InfluxDB v3"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"id": "inject-temp",
|
|
11
|
-
"type": "inject",
|
|
12
|
-
"z": "example-flow",
|
|
13
|
-
"name": "Generate Temperature Data",
|
|
14
|
-
"props": [
|
|
15
|
-
{
|
|
16
|
-
"p": "payload"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"repeat": "5",
|
|
20
|
-
"crontab": "",
|
|
21
|
-
"once": false,
|
|
22
|
-
"onceDelay": 0.1,
|
|
23
|
-
"topic": "",
|
|
24
|
-
"payload": "",
|
|
25
|
-
"payloadType": "date",
|
|
26
|
-
"x": 180,
|
|
27
|
-
"y": 100,
|
|
28
|
-
"wires": [
|
|
29
|
-
[
|
|
30
|
-
"format-temp"
|
|
31
|
-
]
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"id": "format-temp",
|
|
36
|
-
"type": "function",
|
|
37
|
-
"z": "example-flow",
|
|
38
|
-
"name": "Format Temperature",
|
|
39
|
-
"func": "// Generate random temperature between 18 and 28 degrees\nconst temp = 18 + Math.random() * 10;\nconst humidity = 40 + Math.random() * 30;\n\nmsg.measurement = 'environment';\nmsg.payload = {\n temperature: parseFloat(temp.toFixed(2)),\n humidity: parseFloat(humidity.toFixed(2)),\n tags: {\n location: 'office',\n sensor: 'dht22_01'\n }\n};\n\nreturn msg;",
|
|
40
|
-
"outputs": 1,
|
|
41
|
-
"noerr": 0,
|
|
42
|
-
"initialize": "",
|
|
43
|
-
"finalize": "",
|
|
44
|
-
"libs": [],
|
|
45
|
-
"x": 420,
|
|
46
|
-
"y": 100,
|
|
47
|
-
"wires": [
|
|
48
|
-
[
|
|
49
|
-
"write-influx",
|
|
50
|
-
"debug-payload"
|
|
51
|
-
]
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"id": "write-influx",
|
|
56
|
-
"type": "influxdb3-write",
|
|
57
|
-
"z": "example-flow",
|
|
58
|
-
"influxdb": "influxdb3-config",
|
|
59
|
-
"name": "Write to InfluxDB v3",
|
|
60
|
-
"measurement": "",
|
|
61
|
-
"database": "",
|
|
62
|
-
"x": 660,
|
|
63
|
-
"y": 100,
|
|
64
|
-
"wires": [
|
|
65
|
-
[
|
|
66
|
-
"debug-result"
|
|
67
|
-
]
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"id": "debug-payload",
|
|
72
|
-
"type": "debug",
|
|
73
|
-
"z": "example-flow",
|
|
74
|
-
"name": "Debug Payload",
|
|
75
|
-
"active": true,
|
|
76
|
-
"tosidebar": true,
|
|
77
|
-
"console": false,
|
|
78
|
-
"tostatus": false,
|
|
79
|
-
"complete": "payload",
|
|
80
|
-
"targetType": "msg",
|
|
81
|
-
"statusVal": "",
|
|
82
|
-
"statusType": "auto",
|
|
83
|
-
"x": 660,
|
|
84
|
-
"y": 60,
|
|
85
|
-
"wires": []
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"id": "debug-result",
|
|
89
|
-
"type": "debug",
|
|
90
|
-
"z": "example-flow",
|
|
91
|
-
"name": "Debug Result",
|
|
92
|
-
"active": true,
|
|
93
|
-
"tosidebar": true,
|
|
94
|
-
"console": false,
|
|
95
|
-
"tostatus": false,
|
|
96
|
-
"complete": "true",
|
|
97
|
-
"targetType": "full",
|
|
98
|
-
"statusVal": "",
|
|
99
|
-
"statusType": "auto",
|
|
100
|
-
"x": 870,
|
|
101
|
-
"y": 100,
|
|
102
|
-
"wires": []
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"id": "inject-line-protocol",
|
|
106
|
-
"type": "inject",
|
|
107
|
-
"z": "example-flow",
|
|
108
|
-
"name": "Line Protocol Example",
|
|
109
|
-
"props": [
|
|
110
|
-
{
|
|
111
|
-
"p": "payload"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"repeat": "",
|
|
115
|
-
"crontab": "",
|
|
116
|
-
"once": false,
|
|
117
|
-
"onceDelay": 0.1,
|
|
118
|
-
"topic": "",
|
|
119
|
-
"payload": "weather,location=garden temperature=18.5,humidity=75,pressure=1013.25",
|
|
120
|
-
"payloadType": "str",
|
|
121
|
-
"x": 180,
|
|
122
|
-
"y": 200,
|
|
123
|
-
"wires": [
|
|
124
|
-
[
|
|
125
|
-
"write-influx-lp"
|
|
126
|
-
]
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"id": "write-influx-lp",
|
|
131
|
-
"type": "influxdb3-write",
|
|
132
|
-
"z": "example-flow",
|
|
133
|
-
"influxdb": "influxdb3-config",
|
|
134
|
-
"name": "Write Line Protocol",
|
|
135
|
-
"measurement": "",
|
|
136
|
-
"database": "",
|
|
137
|
-
"x": 450,
|
|
138
|
-
"y": 200,
|
|
139
|
-
"wires": [
|
|
140
|
-
[
|
|
141
|
-
"debug-lp"
|
|
142
|
-
]
|
|
143
|
-
]
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"id": "debug-lp",
|
|
147
|
-
"type": "debug",
|
|
148
|
-
"z": "example-flow",
|
|
149
|
-
"name": "Debug LP",
|
|
150
|
-
"active": true,
|
|
151
|
-
"tosidebar": true,
|
|
152
|
-
"console": false,
|
|
153
|
-
"tostatus": false,
|
|
154
|
-
"complete": "true",
|
|
155
|
-
"targetType": "full",
|
|
156
|
-
"statusVal": "",
|
|
157
|
-
"statusType": "auto",
|
|
158
|
-
"x": 660,
|
|
159
|
-
"y": 200,
|
|
160
|
-
"wires": []
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"id": "influxdb3-config",
|
|
164
|
-
"type": "influxdb3-config",
|
|
165
|
-
"name": "My InfluxDB v3",
|
|
166
|
-
"host": "https://us-east-1-1.aws.cloud2.influxdata.com",
|
|
167
|
-
"database": "my-database"
|
|
168
|
-
}
|
|
169
|
-
]
|
|
170
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "example-flow",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "InfluxDB v3 Example",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Example flow showing how to write data to InfluxDB v3"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "inject-temp",
|
|
11
|
+
"type": "inject",
|
|
12
|
+
"z": "example-flow",
|
|
13
|
+
"name": "Generate Temperature Data",
|
|
14
|
+
"props": [
|
|
15
|
+
{
|
|
16
|
+
"p": "payload"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"repeat": "5",
|
|
20
|
+
"crontab": "",
|
|
21
|
+
"once": false,
|
|
22
|
+
"onceDelay": 0.1,
|
|
23
|
+
"topic": "",
|
|
24
|
+
"payload": "",
|
|
25
|
+
"payloadType": "date",
|
|
26
|
+
"x": 180,
|
|
27
|
+
"y": 100,
|
|
28
|
+
"wires": [
|
|
29
|
+
[
|
|
30
|
+
"format-temp"
|
|
31
|
+
]
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "format-temp",
|
|
36
|
+
"type": "function",
|
|
37
|
+
"z": "example-flow",
|
|
38
|
+
"name": "Format Temperature",
|
|
39
|
+
"func": "// Generate random temperature between 18 and 28 degrees\nconst temp = 18 + Math.random() * 10;\nconst humidity = 40 + Math.random() * 30;\n\nmsg.measurement = 'environment';\nmsg.payload = {\n temperature: parseFloat(temp.toFixed(2)),\n humidity: parseFloat(humidity.toFixed(2)),\n tags: {\n location: 'office',\n sensor: 'dht22_01'\n }\n};\n\nreturn msg;",
|
|
40
|
+
"outputs": 1,
|
|
41
|
+
"noerr": 0,
|
|
42
|
+
"initialize": "",
|
|
43
|
+
"finalize": "",
|
|
44
|
+
"libs": [],
|
|
45
|
+
"x": 420,
|
|
46
|
+
"y": 100,
|
|
47
|
+
"wires": [
|
|
48
|
+
[
|
|
49
|
+
"write-influx",
|
|
50
|
+
"debug-payload"
|
|
51
|
+
]
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "write-influx",
|
|
56
|
+
"type": "influxdb3-write",
|
|
57
|
+
"z": "example-flow",
|
|
58
|
+
"influxdb": "influxdb3-config",
|
|
59
|
+
"name": "Write to InfluxDB v3",
|
|
60
|
+
"measurement": "",
|
|
61
|
+
"database": "",
|
|
62
|
+
"x": 660,
|
|
63
|
+
"y": 100,
|
|
64
|
+
"wires": [
|
|
65
|
+
[
|
|
66
|
+
"debug-result"
|
|
67
|
+
]
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "debug-payload",
|
|
72
|
+
"type": "debug",
|
|
73
|
+
"z": "example-flow",
|
|
74
|
+
"name": "Debug Payload",
|
|
75
|
+
"active": true,
|
|
76
|
+
"tosidebar": true,
|
|
77
|
+
"console": false,
|
|
78
|
+
"tostatus": false,
|
|
79
|
+
"complete": "payload",
|
|
80
|
+
"targetType": "msg",
|
|
81
|
+
"statusVal": "",
|
|
82
|
+
"statusType": "auto",
|
|
83
|
+
"x": 660,
|
|
84
|
+
"y": 60,
|
|
85
|
+
"wires": []
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "debug-result",
|
|
89
|
+
"type": "debug",
|
|
90
|
+
"z": "example-flow",
|
|
91
|
+
"name": "Debug Result",
|
|
92
|
+
"active": true,
|
|
93
|
+
"tosidebar": true,
|
|
94
|
+
"console": false,
|
|
95
|
+
"tostatus": false,
|
|
96
|
+
"complete": "true",
|
|
97
|
+
"targetType": "full",
|
|
98
|
+
"statusVal": "",
|
|
99
|
+
"statusType": "auto",
|
|
100
|
+
"x": 870,
|
|
101
|
+
"y": 100,
|
|
102
|
+
"wires": []
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "inject-line-protocol",
|
|
106
|
+
"type": "inject",
|
|
107
|
+
"z": "example-flow",
|
|
108
|
+
"name": "Line Protocol Example",
|
|
109
|
+
"props": [
|
|
110
|
+
{
|
|
111
|
+
"p": "payload"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"repeat": "",
|
|
115
|
+
"crontab": "",
|
|
116
|
+
"once": false,
|
|
117
|
+
"onceDelay": 0.1,
|
|
118
|
+
"topic": "",
|
|
119
|
+
"payload": "weather,location=garden temperature=18.5,humidity=75,pressure=1013.25",
|
|
120
|
+
"payloadType": "str",
|
|
121
|
+
"x": 180,
|
|
122
|
+
"y": 200,
|
|
123
|
+
"wires": [
|
|
124
|
+
[
|
|
125
|
+
"write-influx-lp"
|
|
126
|
+
]
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "write-influx-lp",
|
|
131
|
+
"type": "influxdb3-write",
|
|
132
|
+
"z": "example-flow",
|
|
133
|
+
"influxdb": "influxdb3-config",
|
|
134
|
+
"name": "Write Line Protocol",
|
|
135
|
+
"measurement": "",
|
|
136
|
+
"database": "",
|
|
137
|
+
"x": 450,
|
|
138
|
+
"y": 200,
|
|
139
|
+
"wires": [
|
|
140
|
+
[
|
|
141
|
+
"debug-lp"
|
|
142
|
+
]
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "debug-lp",
|
|
147
|
+
"type": "debug",
|
|
148
|
+
"z": "example-flow",
|
|
149
|
+
"name": "Debug LP",
|
|
150
|
+
"active": true,
|
|
151
|
+
"tosidebar": true,
|
|
152
|
+
"console": false,
|
|
153
|
+
"tostatus": false,
|
|
154
|
+
"complete": "true",
|
|
155
|
+
"targetType": "full",
|
|
156
|
+
"statusVal": "",
|
|
157
|
+
"statusType": "auto",
|
|
158
|
+
"x": 660,
|
|
159
|
+
"y": 200,
|
|
160
|
+
"wires": []
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "influxdb3-config",
|
|
164
|
+
"type": "influxdb3-config",
|
|
165
|
+
"name": "My InfluxDB v3",
|
|
166
|
+
"host": "https://us-east-1-1.aws.cloud2.influxdata.com",
|
|
167
|
+
"database": "my-database"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
|
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "mqtt-flow",
|
|
4
|
-
"type": "tab",
|
|
5
|
-
"label": "MQTT to InfluxDB v3",
|
|
6
|
-
"disabled": false,
|
|
7
|
-
"info": "Example flow showing how to capture MQTT data and write to InfluxDB v3"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"id": "mqtt-in",
|
|
11
|
-
"type": "mqtt in",
|
|
12
|
-
"z": "mqtt-flow",
|
|
13
|
-
"name": "MQTT Sensor Data",
|
|
14
|
-
"topic": "sensors/+/data",
|
|
15
|
-
"qos": "0",
|
|
16
|
-
"datatype": "json",
|
|
17
|
-
"broker": "mqtt-broker",
|
|
18
|
-
"nl": false,
|
|
19
|
-
"rap": false,
|
|
20
|
-
"inputs": 0,
|
|
21
|
-
"x": 140,
|
|
22
|
-
"y": 100,
|
|
23
|
-
"wires": [
|
|
24
|
-
[
|
|
25
|
-
"parse-mqtt"
|
|
26
|
-
]
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"id": "parse-mqtt",
|
|
31
|
-
"type": "function",
|
|
32
|
-
"z": "mqtt-flow",
|
|
33
|
-
"name": "Parse MQTT Data",
|
|
34
|
-
"func": "// Extract sensor ID from topic (sensors/SENSOR_ID/data)\nconst topicParts = msg.topic.split('/');\nconst sensorId = topicParts[1];\n\n// Prepare data for InfluxDB\nmsg.measurement = 'sensor_readings';\nmsg.payload = {\n fields: {\n temperature: msg.payload.temperature,\n humidity: msg.payload.humidity,\n battery: msg.payload.battery\n },\n tags: {\n sensor_id: sensorId,\n location: msg.payload.location || 'unknown'\n }\n};\n\nreturn msg;",
|
|
35
|
-
"outputs": 1,
|
|
36
|
-
"noerr": 0,
|
|
37
|
-
"initialize": "",
|
|
38
|
-
"finalize": "",
|
|
39
|
-
"libs": [],
|
|
40
|
-
"x": 360,
|
|
41
|
-
"y": 100,
|
|
42
|
-
"wires": [
|
|
43
|
-
[
|
|
44
|
-
"influx-write",
|
|
45
|
-
"debug-mqtt"
|
|
46
|
-
]
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"id": "influx-write",
|
|
51
|
-
"type": "influxdb3-write",
|
|
52
|
-
"z": "mqtt-flow",
|
|
53
|
-
"influxdb": "influxdb3-config",
|
|
54
|
-
"name": "Store in InfluxDB",
|
|
55
|
-
"measurement": "",
|
|
56
|
-
"database": "",
|
|
57
|
-
"x": 590,
|
|
58
|
-
"y": 100,
|
|
59
|
-
"wires": [
|
|
60
|
-
[
|
|
61
|
-
"debug-success"
|
|
62
|
-
]
|
|
63
|
-
]
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": "debug-mqtt",
|
|
67
|
-
"type": "debug",
|
|
68
|
-
"z": "mqtt-flow",
|
|
69
|
-
"name": "MQTT Data",
|
|
70
|
-
"active": true,
|
|
71
|
-
"tosidebar": true,
|
|
72
|
-
"console": false,
|
|
73
|
-
"tostatus": false,
|
|
74
|
-
"complete": "payload",
|
|
75
|
-
"targetType": "msg",
|
|
76
|
-
"statusVal": "",
|
|
77
|
-
"statusType": "auto",
|
|
78
|
-
"x": 570,
|
|
79
|
-
"y": 60,
|
|
80
|
-
"wires": []
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"id": "debug-success",
|
|
84
|
-
"type": "debug",
|
|
85
|
-
"z": "mqtt-flow",
|
|
86
|
-
"name": "Write Result",
|
|
87
|
-
"active": true,
|
|
88
|
-
"tosidebar": true,
|
|
89
|
-
"console": false,
|
|
90
|
-
"tostatus": false,
|
|
91
|
-
"complete": "true",
|
|
92
|
-
"targetType": "full",
|
|
93
|
-
"statusVal": "",
|
|
94
|
-
"statusType": "auto",
|
|
95
|
-
"x": 790,
|
|
96
|
-
"y": 100,
|
|
97
|
-
"wires": []
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"id": "mqtt-broker",
|
|
101
|
-
"type": "mqtt-broker",
|
|
102
|
-
"name": "Local MQTT Broker",
|
|
103
|
-
"broker": "localhost",
|
|
104
|
-
"port": "1883",
|
|
105
|
-
"clientid": "",
|
|
106
|
-
"autoConnect": true,
|
|
107
|
-
"usetls": false,
|
|
108
|
-
"protocolVersion": "4",
|
|
109
|
-
"keepalive": "60",
|
|
110
|
-
"cleansession": true,
|
|
111
|
-
"birthTopic": "",
|
|
112
|
-
"birthQos": "0",
|
|
113
|
-
"birthPayload": "",
|
|
114
|
-
"birthMsg": {},
|
|
115
|
-
"closeTopic": "",
|
|
116
|
-
"closeQos": "0",
|
|
117
|
-
"closePayload": "",
|
|
118
|
-
"closeMsg": {},
|
|
119
|
-
"willTopic": "",
|
|
120
|
-
"willQos": "0",
|
|
121
|
-
"willPayload": "",
|
|
122
|
-
"willMsg": {},
|
|
123
|
-
"userProps": "",
|
|
124
|
-
"sessionExpiry": ""
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"id": "influxdb3-config",
|
|
128
|
-
"type": "influxdb3-config",
|
|
129
|
-
"name": "My InfluxDB v3",
|
|
130
|
-
"host": "https://us-east-1-1.aws.cloud2.influxdata.com",
|
|
131
|
-
"database": "my-database"
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "mqtt-flow",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "MQTT to InfluxDB v3",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Example flow showing how to capture MQTT data and write to InfluxDB v3"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "mqtt-in",
|
|
11
|
+
"type": "mqtt in",
|
|
12
|
+
"z": "mqtt-flow",
|
|
13
|
+
"name": "MQTT Sensor Data",
|
|
14
|
+
"topic": "sensors/+/data",
|
|
15
|
+
"qos": "0",
|
|
16
|
+
"datatype": "json",
|
|
17
|
+
"broker": "mqtt-broker",
|
|
18
|
+
"nl": false,
|
|
19
|
+
"rap": false,
|
|
20
|
+
"inputs": 0,
|
|
21
|
+
"x": 140,
|
|
22
|
+
"y": 100,
|
|
23
|
+
"wires": [
|
|
24
|
+
[
|
|
25
|
+
"parse-mqtt"
|
|
26
|
+
]
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "parse-mqtt",
|
|
31
|
+
"type": "function",
|
|
32
|
+
"z": "mqtt-flow",
|
|
33
|
+
"name": "Parse MQTT Data",
|
|
34
|
+
"func": "// Extract sensor ID from topic (sensors/SENSOR_ID/data)\nconst topicParts = msg.topic.split('/');\nconst sensorId = topicParts[1];\n\n// Prepare data for InfluxDB\nmsg.measurement = 'sensor_readings';\nmsg.payload = {\n fields: {\n temperature: msg.payload.temperature,\n humidity: msg.payload.humidity,\n battery: msg.payload.battery\n },\n tags: {\n sensor_id: sensorId,\n location: msg.payload.location || 'unknown'\n }\n};\n\nreturn msg;",
|
|
35
|
+
"outputs": 1,
|
|
36
|
+
"noerr": 0,
|
|
37
|
+
"initialize": "",
|
|
38
|
+
"finalize": "",
|
|
39
|
+
"libs": [],
|
|
40
|
+
"x": 360,
|
|
41
|
+
"y": 100,
|
|
42
|
+
"wires": [
|
|
43
|
+
[
|
|
44
|
+
"influx-write",
|
|
45
|
+
"debug-mqtt"
|
|
46
|
+
]
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "influx-write",
|
|
51
|
+
"type": "influxdb3-write",
|
|
52
|
+
"z": "mqtt-flow",
|
|
53
|
+
"influxdb": "influxdb3-config",
|
|
54
|
+
"name": "Store in InfluxDB",
|
|
55
|
+
"measurement": "",
|
|
56
|
+
"database": "",
|
|
57
|
+
"x": 590,
|
|
58
|
+
"y": 100,
|
|
59
|
+
"wires": [
|
|
60
|
+
[
|
|
61
|
+
"debug-success"
|
|
62
|
+
]
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "debug-mqtt",
|
|
67
|
+
"type": "debug",
|
|
68
|
+
"z": "mqtt-flow",
|
|
69
|
+
"name": "MQTT Data",
|
|
70
|
+
"active": true,
|
|
71
|
+
"tosidebar": true,
|
|
72
|
+
"console": false,
|
|
73
|
+
"tostatus": false,
|
|
74
|
+
"complete": "payload",
|
|
75
|
+
"targetType": "msg",
|
|
76
|
+
"statusVal": "",
|
|
77
|
+
"statusType": "auto",
|
|
78
|
+
"x": 570,
|
|
79
|
+
"y": 60,
|
|
80
|
+
"wires": []
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "debug-success",
|
|
84
|
+
"type": "debug",
|
|
85
|
+
"z": "mqtt-flow",
|
|
86
|
+
"name": "Write Result",
|
|
87
|
+
"active": true,
|
|
88
|
+
"tosidebar": true,
|
|
89
|
+
"console": false,
|
|
90
|
+
"tostatus": false,
|
|
91
|
+
"complete": "true",
|
|
92
|
+
"targetType": "full",
|
|
93
|
+
"statusVal": "",
|
|
94
|
+
"statusType": "auto",
|
|
95
|
+
"x": 790,
|
|
96
|
+
"y": 100,
|
|
97
|
+
"wires": []
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "mqtt-broker",
|
|
101
|
+
"type": "mqtt-broker",
|
|
102
|
+
"name": "Local MQTT Broker",
|
|
103
|
+
"broker": "localhost",
|
|
104
|
+
"port": "1883",
|
|
105
|
+
"clientid": "",
|
|
106
|
+
"autoConnect": true,
|
|
107
|
+
"usetls": false,
|
|
108
|
+
"protocolVersion": "4",
|
|
109
|
+
"keepalive": "60",
|
|
110
|
+
"cleansession": true,
|
|
111
|
+
"birthTopic": "",
|
|
112
|
+
"birthQos": "0",
|
|
113
|
+
"birthPayload": "",
|
|
114
|
+
"birthMsg": {},
|
|
115
|
+
"closeTopic": "",
|
|
116
|
+
"closeQos": "0",
|
|
117
|
+
"closePayload": "",
|
|
118
|
+
"closeMsg": {},
|
|
119
|
+
"willTopic": "",
|
|
120
|
+
"willQos": "0",
|
|
121
|
+
"willPayload": "",
|
|
122
|
+
"willMsg": {},
|
|
123
|
+
"userProps": "",
|
|
124
|
+
"sessionExpiry": ""
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "influxdb3-config",
|
|
128
|
+
"type": "influxdb3-config",
|
|
129
|
+
"name": "My InfluxDB v3",
|
|
130
|
+
"host": "https://us-east-1-1.aws.cloud2.influxdata.com",
|
|
131
|
+
"database": "my-database"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
|