node-red-contrib-3dm-space 0.0.8 → 1.0.2
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/3dm-cloud-config.html +80 -16
- package/3dm-cloud-config.js +197 -192
- package/3dm-cloud-in.html +27 -14
- package/3dm-cloud-in.js +115 -115
- package/3dm-cloud-out.html +23 -10
- package/3dm-cloud-out.js +736 -669
- package/3dm-config-store.html +236 -0
- package/3dm-config-store.js +883 -0
- package/README.md +193 -58
- package/node-red-contrib-3dm-space-1.0.0.tgz +0 -0
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -1,104 +1,239 @@
|
|
|
1
1
|
# node-red-contrib-3dm-space
|
|
2
2
|
|
|
3
|
-
Node-RED nodes for
|
|
3
|
+
Node-RED nodes for connecting Smithtek PassPort gateways to **3DM.space SCADA Cloud**.
|
|
4
4
|
|
|
5
|
-
This package is designed
|
|
5
|
+
This package is designed to keep setup simple. Users copy the device details from 3DM.space into Node-RED, then use the nodes to send data, receive commands, store settings, and run local control logic.
|
|
6
6
|
|
|
7
7
|
## Nodes Included
|
|
8
8
|
|
|
9
9
|
### 3DM Cloud Login
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Stores the 3DM.space device login used by the 3DM nodes.
|
|
12
12
|
|
|
13
|
-
The
|
|
13
|
+
The fields match the order shown in 3DM.space:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
1. **Client ID**
|
|
16
|
+
2. **User Name***
|
|
17
|
+
3. **Password**
|
|
18
|
+
4. **Node Name**
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**Node Name** is optional and is only used inside Node-RED to make the login easier to identify.
|
|
21
21
|
|
|
22
22
|
### 3DM Out
|
|
23
23
|
|
|
24
|
-
Sends
|
|
24
|
+
Sends telemetry from Node-RED to 3DM.space.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Use this node when the PassPort needs to send live values such as:
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
- Tank level
|
|
29
|
+
- Pump status
|
|
30
|
+
- Flow rate
|
|
31
|
+
- Pressure
|
|
32
|
+
- Battery voltage
|
|
33
|
+
- Fault status
|
|
34
|
+
- Run hours
|
|
35
|
+
- Totaliser values
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
The node automatically prepares the data for 3DM.space.
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
"pump_run": true,
|
|
40
|
-
"flow_lpm": 125.5,
|
|
41
|
-
"tank_level_percent": 64,
|
|
42
|
-
"dc_voltage": 24.1
|
|
43
|
-
}
|
|
44
|
-
```
|
|
39
|
+
If the connection is unavailable, valid data is stored locally and sent later when the connection returns.
|
|
45
40
|
|
|
46
41
|
### 3DM In
|
|
47
42
|
|
|
48
|
-
Receives
|
|
43
|
+
Receives values sent from 3DM.space to the PassPort.
|
|
49
44
|
|
|
50
|
-
|
|
45
|
+
Use this node when 3DM.space needs to send values down to Node-RED, such as:
|
|
51
46
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
- Pump commands
|
|
48
|
+
- Mode changes
|
|
49
|
+
- Reset commands
|
|
50
|
+
- Setpoints
|
|
51
|
+
- Scheduler updates
|
|
52
|
+
- Control settings
|
|
53
|
+
- Remote configuration values
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
The node can receive all values, or it can be filtered to only pass through one selected key.
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
### 3DM Config Store
|
|
58
|
+
|
|
59
|
+
Stores settings sent from 3DM.space and uses them locally on the PassPort.
|
|
60
|
+
|
|
61
|
+
This node is normally placed after a **3DM In** node.
|
|
62
|
+
|
|
63
|
+
3DM In → 3DM Config Store → Local Outputs
|
|
64
|
+
|
|
65
|
+
Use this node for settings that need to be remembered and used by the PassPort, such as:
|
|
66
|
+
|
|
67
|
+
- Pump schedules
|
|
68
|
+
- Irrigation schedules
|
|
69
|
+
- Start and stop levels
|
|
70
|
+
- Pressure setpoints
|
|
71
|
+
- Alarm settings
|
|
72
|
+
- Control limits
|
|
73
|
+
- Run time settings
|
|
74
|
+
- Site configuration values
|
|
75
|
+
|
|
76
|
+
The Config Store saves the latest settings locally.
|
|
77
|
+
|
|
78
|
+
If Node-RED restarts, the last saved settings are loaded again automatically.
|
|
79
|
+
|
|
80
|
+
The node has **24 outputs** that can be used for local control.
|
|
81
|
+
|
|
82
|
+
## Basic Setup
|
|
83
|
+
|
|
84
|
+
### 1. Create or Open a Device in 3DM.space
|
|
85
|
+
|
|
86
|
+
Log in to **3DM.space**.
|
|
87
|
+
|
|
88
|
+
Create a new device, or open the existing device you want the PassPort to connect to.
|
|
89
|
+
|
|
90
|
+
Open the device credentials section.
|
|
91
|
+
|
|
92
|
+
Copy these values:
|
|
93
|
+
|
|
94
|
+
- Client ID
|
|
95
|
+
- User Name*
|
|
96
|
+
- Password
|
|
97
|
+
|
|
98
|
+
### 2. Add a 3DM Cloud Login in Node-RED
|
|
99
|
+
|
|
100
|
+
Open a **3DM Out** or **3DM In** node.
|
|
101
|
+
|
|
102
|
+
Create a new **3DM Cloud Login**.
|
|
103
|
+
|
|
104
|
+
Paste the values from 3DM.space into the matching fields.
|
|
105
|
+
|
|
106
|
+
| 3DM.space | Node-RED |
|
|
107
|
+
|---|---|
|
|
108
|
+
| Client ID | Client ID |
|
|
109
|
+
| User Name* | User Name* |
|
|
110
|
+
| Password | Password |
|
|
111
|
+
|
|
112
|
+
Give it a simple Node Name if needed, such as:
|
|
113
|
+
|
|
114
|
+
Main PassPort
|
|
115
|
+
|
|
116
|
+
### 3. Send Telemetry
|
|
117
|
+
|
|
118
|
+
Add a **3DM Out** node.
|
|
119
|
+
|
|
120
|
+
Select the **3DM Cloud Login**.
|
|
121
|
+
|
|
122
|
+
Connect your live data into the node.
|
|
123
|
+
|
|
124
|
+
The values will appear against the selected device in 3DM.space.
|
|
125
|
+
|
|
126
|
+
### 4. Receive Commands
|
|
127
|
+
|
|
128
|
+
Add a **3DM In** node.
|
|
129
|
+
|
|
130
|
+
Select the same **3DM Cloud Login**.
|
|
131
|
+
|
|
132
|
+
Leave **Attribute Key** blank to receive all incoming values.
|
|
133
|
+
|
|
134
|
+
Enter an **Attribute Key** if you only want one value to pass through.
|
|
135
|
+
|
|
136
|
+
For example, you may use a key such as:
|
|
137
|
+
|
|
138
|
+
pump_cmd
|
|
139
|
+
|
|
140
|
+
Only that value will then be passed through the node.
|
|
141
|
+
|
|
142
|
+
### 5. Store Settings
|
|
143
|
+
|
|
144
|
+
Add a **3DM Config Store** node after a **3DM In** node.
|
|
145
|
+
|
|
146
|
+
Use this when settings from 3DM.space need to be saved on the PassPort.
|
|
147
|
+
|
|
148
|
+
This is useful for:
|
|
149
|
+
|
|
150
|
+
- Scheduler widgets
|
|
151
|
+
- Setpoint widgets
|
|
152
|
+
- Control widgets
|
|
153
|
+
- Site setup widgets
|
|
154
|
+
- Remote configuration screens
|
|
155
|
+
|
|
156
|
+
The Config Store saves the settings locally and keeps using them even after a restart.
|
|
157
|
+
|
|
158
|
+
### 6. Run Local Outputs
|
|
159
|
+
|
|
160
|
+
The **3DM Config Store** node has 24 outputs.
|
|
161
|
+
|
|
162
|
+
These outputs can be used to control local logic in Node-RED.
|
|
163
|
+
|
|
164
|
+
Typical uses include:
|
|
165
|
+
|
|
166
|
+
- Starting a pump on schedule
|
|
167
|
+
- Stopping a pump on level
|
|
168
|
+
- Running irrigation zones
|
|
169
|
+
- Enabling or disabling control logic
|
|
170
|
+
- Sending commands to a PLC
|
|
171
|
+
- Triggering local relays or outputs
|
|
64
172
|
|
|
65
173
|
## Store and Forward
|
|
66
174
|
|
|
67
|
-
The 3DM Out node includes built-in store and forward.
|
|
175
|
+
The **3DM Out** node includes built-in store and forward.
|
|
68
176
|
|
|
69
|
-
If the cloud connection is
|
|
177
|
+
If the cloud connection is unavailable, valid telemetry is stored locally on the gateway.
|
|
70
178
|
|
|
71
|
-
When the
|
|
179
|
+
When the connection returns, stored telemetry is sent automatically.
|
|
72
180
|
|
|
73
|
-
|
|
181
|
+
This helps prevent data loss during temporary connection outages.
|
|
74
182
|
|
|
75
|
-
|
|
76
|
-
250 ms per packet
|
|
77
|
-
```
|
|
183
|
+
## Safe Sending Limits
|
|
78
184
|
|
|
79
|
-
|
|
185
|
+
The **3DM Out** node includes safe sending protection.
|
|
80
186
|
|
|
81
|
-
|
|
82
|
-
4 packets per second
|
|
83
|
-
```
|
|
187
|
+
This helps prevent users from accidentally sending data too quickly.
|
|
84
188
|
|
|
85
|
-
|
|
189
|
+
Stored data is handled automatically when the connection returns.
|
|
86
190
|
|
|
87
|
-
|
|
191
|
+
## Typical Flows
|
|
88
192
|
|
|
89
|
-
|
|
193
|
+
Sending telemetry:
|
|
90
194
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
195
|
+
Sensor / PLC Data
|
|
196
|
+
↓
|
|
197
|
+
Function Node
|
|
198
|
+
↓
|
|
199
|
+
3DM Out
|
|
200
|
+
↓
|
|
201
|
+
3DM.space
|
|
94
202
|
|
|
95
|
-
|
|
203
|
+
Receiving commands:
|
|
96
204
|
|
|
205
|
+
3DM.space
|
|
206
|
+
↓
|
|
207
|
+
3DM In
|
|
208
|
+
↓
|
|
209
|
+
Function Node
|
|
210
|
+
↓
|
|
211
|
+
PLC / Output Logic
|
|
97
212
|
|
|
98
|
-
|
|
213
|
+
Receiving saved settings:
|
|
99
214
|
|
|
100
|
-
|
|
215
|
+
3DM.space
|
|
216
|
+
↓
|
|
217
|
+
3DM In
|
|
218
|
+
↓
|
|
219
|
+
3DM Config Store
|
|
220
|
+
↓
|
|
221
|
+
24 Local Outputs
|
|
222
|
+
|
|
223
|
+
## Notes
|
|
224
|
+
|
|
225
|
+
- Use **3DM Out** to send live data to 3DM.space.
|
|
226
|
+
- Use **3DM In** to receive commands and settings from 3DM.space.
|
|
227
|
+
- Use **3DM Config Store** to save settings and run local control logic.
|
|
228
|
+
- Device credentials should be copied directly from 3DM.space.
|
|
229
|
+
- Node Name fields are optional and are only used inside Node-RED.
|
|
230
|
+
- Store and forward is handled automatically.
|
|
231
|
+
- Saved settings are stored locally on the PassPort.
|
|
101
232
|
|
|
102
233
|
## Author
|
|
103
234
|
|
|
104
235
|
Smithtek
|
|
236
|
+
|
|
237
|
+
## License
|
|
238
|
+
|
|
239
|
+
GPL-3.0-or-later
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-3dm-space",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Node-RED nodes for 3DM.space SCADA Cloud telemetry and
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Node-RED nodes for 3DM.space SCADA Cloud telemetry, attributes, and local config storage",
|
|
5
5
|
"main": "3dm-cloud-config.js",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node-red",
|
|
9
|
+
"node-red-contrib",
|
|
9
10
|
"3dm",
|
|
10
11
|
"3dm.space",
|
|
12
|
+
"smithtek",
|
|
11
13
|
"scada",
|
|
12
14
|
"telemetry",
|
|
13
|
-
"store-and-forward"
|
|
15
|
+
"store-and-forward",
|
|
16
|
+
"config-store",
|
|
17
|
+
"scheduler"
|
|
14
18
|
],
|
|
15
19
|
"node-red": {
|
|
16
20
|
"nodes": {
|
|
17
21
|
"3dm-cloud-config": "3dm-cloud-config.js",
|
|
18
22
|
"3dm-cloud-out": "3dm-cloud-out.js",
|
|
19
|
-
"3dm-cloud-in": "3dm-cloud-in.js"
|
|
23
|
+
"3dm-cloud-in": "3dm-cloud-in.js",
|
|
24
|
+
"3dm-config-store": "3dm-config-store.js"
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
"dependencies": {
|
|
23
|
-
"mqtt": "~4.3.7"
|
|
28
|
+
"mqtt": "~4.3.7"
|
|
29
|
+
},
|
|
30
|
+
"optionalDependencies": {
|
|
24
31
|
"node-persistent-queue": "^0.3.1"
|
|
25
32
|
}
|
|
26
33
|
}
|