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/README.md CHANGED
@@ -1,104 +1,239 @@
1
1
  # node-red-contrib-3dm-space
2
2
 
3
- Node-RED nodes for sending telemetry data to **3DM.space SCADA Cloud** and receiving cloud attribute commands.
3
+ Node-RED nodes for connecting Smithtek PassPort gateways to **3DM.space SCADA Cloud**.
4
4
 
5
- This package is designed for Smithtek PassPort gateways and provides simple 3DM Cloud communication without exposing MQTT details to the user.
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
- Shared configuration node used by the 3DM input and output nodes.
11
+ Stores the 3DM.space device login used by the 3DM nodes.
12
12
 
13
- The user only needs to enter:
13
+ The fields match the order shown in 3DM.space:
14
14
 
15
- * Name
16
- * Username
17
- * Password
18
- * Optional Client ID
15
+ 1. **Client ID**
16
+ 2. **User Name***
17
+ 3. **Password**
18
+ 4. **Node Name**
19
19
 
20
- Connection details are handled internally.
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 JSON telemetry data to 3DM.space SCADA Cloud.
24
+ Sends telemetry from Node-RED to 3DM.space.
25
25
 
26
- The node automatically:
26
+ Use this node when the PassPort needs to send live values such as:
27
27
 
28
- * Adds a timestamp
29
- * Formats the payload for 3DM Cloud time-series data
30
- * Publishes to the correct cloud endpoint
31
- * Applies a publish rate limit
32
- * Stores messages locally if the cloud connection is offline
33
- * Replays stored messages when the connection returns
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
- Example input:
37
+ The node automatically prepares the data for 3DM.space.
36
38
 
37
- ```json
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 cloud attribute updates from 3DM.space.
43
+ Receives values sent from 3DM.space to the PassPort.
49
44
 
50
- The node can:
45
+ Use this node when 3DM.space needs to send values down to Node-RED, such as:
51
46
 
52
- * Allow all incoming attributes through
53
- * Filter by a single key
54
- * Output the selected value only
55
- * Output an object containing the selected key and value
47
+ - Pump commands
48
+ - Mode changes
49
+ - Reset commands
50
+ - Setpoints
51
+ - Scheduler updates
52
+ - Control settings
53
+ - Remote configuration values
56
54
 
57
- Example cloud attribute:
55
+ The node can receive all values, or it can be filtered to only pass through one selected key.
58
56
 
59
- ```json
60
- {
61
- "pump_cmd": 1
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 lost, valid telemetry messages are stored locally using a persistent queue. Each message is timestamped when it arrives at the node, not when it is replayed.
177
+ If the cloud connection is unavailable, valid telemetry is stored locally on the gateway.
70
178
 
71
- When the cloud connection returns, stored messages are replayed automatically.
179
+ When the connection returns, stored telemetry is sent automatically.
72
180
 
73
- Default replay speed:
181
+ This helps prevent data loss during temporary connection outages.
74
182
 
75
- ```text
76
- 250 ms per packet
77
- ```
183
+ ## Safe Sending Limits
78
184
 
79
- This equals approximately:
185
+ The **3DM Out** node includes safe sending protection.
80
186
 
81
- ```text
82
- 4 packets per second
83
- ```
187
+ This helps prevent users from accidentally sending data too quickly.
84
188
 
85
- ## Rate Limiting
189
+ Stored data is handled automatically when the connection returns.
86
190
 
87
- The 3DM Out node includes a live publish throttle to prevent users from publishing too quickly.
191
+ ## Typical Flows
88
192
 
89
- Default live publish limit:
193
+ Sending telemetry:
90
194
 
91
- ```text
92
- 1 message every 10 seconds
93
- ```
195
+ Sensor / PLC Data
196
+ ↓
197
+ Function Node
198
+ ↓
199
+ 3DM Out
200
+ ↓
201
+ 3DM.space
94
202
 
95
- If valid telemetry arrives faster than the live publish limit, it is queued rather than discarded.
203
+ Receiving commands:
96
204
 
205
+ 3DM.space
206
+ ↓
207
+ 3DM In
208
+ ↓
209
+ Function Node
210
+ ↓
211
+ PLC / Output Logic
97
212
 
98
- ## License
213
+ Receiving saved settings:
99
214
 
100
- GPL-3.0-or-later
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
package/package.json CHANGED
@@ -1,26 +1,33 @@
1
1
  {
2
2
  "name": "node-red-contrib-3dm-space",
3
- "version": "0.0.8",
4
- "description": "Node-RED nodes for 3DM.space SCADA Cloud telemetry and attributes",
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
  }