node-red-contrib-3dm-space 1.0.10 → 2.1.0

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,27 +1,147 @@
1
+
2
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/3dm%20github.png?raw=true")
1
3
  # node-red-contrib-3dm-space
2
4
 
3
5
  Node-RED nodes for connecting Smithtek PassPort gateways to **3DM.space SCADA Cloud**.
4
6
 
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.
7
+ This package is designed to keep setup simple. A user copies the device credentials from 3DM.space into Node-RED, then uses the nodes to send telemetry, receive commands, store settings, and run local control logic on the PassPort.
6
8
 
7
- ## Nodes Included
9
+ The package is intended for Smithtek PassPort gateway projects using 3DM.space, Mako RF nodes, PLCs, sensors, relays, pump controllers, irrigation systems, water treatment systems, remote telemetry sites and SCADA control applications.
10
+
11
+ ---
12
+
13
+ ## Requirements
8
14
 
9
- ### 3DM Cloud Login
15
+ To use these nodes, you need:
10
16
 
11
- Stores the 3DM.space device login used by the 3DM nodes.
17
+ - A current 3DM.space account
18
+ - An active PassPort device created in 3DM.space
19
+ - Device credentials copied from the PassPort device page
20
+ - Node-RED running on the PassPort or gateway
21
+ - A working internet connection when sending or receiving live cloud data
12
22
 
13
- The fields match the order shown in 3DM.space:
23
+ To connect the 3DM nodes to your 3DM.space account:
24
+
25
+ 1. Log in to **3DM.space**
26
+ 2. Open the required PassPort device
27
+ 3. Open the device credentials section
28
+ 4. Copy the credentials into the **3DM Cloud Login** node in Node-RED
29
+
30
+ The credentials are copied from 3DM.space into Node-RED in this order:
14
31
 
15
32
  1. **Client ID**
16
33
  2. **User Name***
17
34
  3. **Password**
18
35
  4. **Node Name**
19
36
 
20
- **Node Name** is optional and is only used inside Node-RED to make the login easier to identify.
21
37
 
22
- ### 3DM Out
38
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/3dm%20Creds.png?raw=true")
39
+ ---
40
+
41
+ ## Nodes Included
42
+
43
+ This package includes four nodes:
44
+
45
+ - **3DM Cloud Login**
46
+ - **3DM Out**
47
+ - **3DM In**
48
+ - **3DM Config Store**
49
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/3dm%20nodes.jpg?raw=true")
50
+
51
+ ---
52
+
53
+ # 3DM Cloud Login
54
+
55
+ The **3DM Cloud login** node stores the 3DM.space device login used by the 3DM nodes.
56
+
57
+ This is a configuration node. It does not appear as a wired node in the flow by itself. It is selected inside the **3DM Out** and **3DM In** nodes.
58
+
59
+ ---
60
+
61
+ ## 3DM Cloud Login Fields
62
+
63
+ ### Client ID
64
+
65
+ The Client ID from the PassPort device credentials in 3DM.space.
66
+
67
+ Only enter this if 3DM.space provides one for the device, you can auto create one or create your own!.
68
+
69
+ ### User Name*
70
+
71
+ The device username from 3DM.space.
72
+
73
+ This field is required,you can auto create one or create your own!..
74
+
75
+ ### Password
76
+
77
+ The device password from 3DM.space,you can auto create one or create your own!.
78
+
79
+ After deploy, Node-RED may show the password field as blank. This is normal for password fields. The password is secured and stored internally.
80
+
81
+ ### Node Name
82
+
83
+ Optional.
84
+
85
+ This is only used inside Node-RED to make the login easier to identify.
86
+
87
+ Example:
88
+
89
+ ```text
90
+ Main PassPort
91
+ ```
92
+
93
+ ---
94
+
95
+ ## What 3DM Cloud Login Does
96
+
97
+ The 3DM Cloud Login node:
98
+
99
+ - Stores the device credentials
100
+ - Creates the cloud connection used by 3DM In and 3DM Out
101
+ - Allows multiple 3DM nodes to use the same login
102
+ - Handles reconnecting after a connection drop
103
+ - Shares connection state with the 3DM In and 3DM Out nodes
104
+
105
+ ---
106
+
107
+ ## 3DM Cloud Login Common Problems
108
+
109
+ ### Password looks blank after deploy
110
+
111
+ This can be normal.
112
+
113
+ Node-RED often hides password values after deploy.
114
+
115
+ Check whether the 3DM In or 3DM Out node still connects.
116
+
117
+ ### Login rejected
118
+
119
+ Check:
120
+
121
+ - Client ID
122
+ - User Name*
123
+ - Password
124
+ - The correct PassPort device was selected in 3DM.space
125
+ - Check the passport exisits in 3DM.space
126
+ - No extra spaces were copied into the fields
127
+
128
+ ### Node stays offline
129
+
130
+ Check:
131
+
132
+ - Internet connection
133
+ - Device credentials
134
+ - 3DM.space device is active
135
+ - The correct 3DM Cloud Login is selected in the 3DM In or 3DM Out node
136
+ - The PassPort is powered
137
+ - If it is spcific RF data thats offline, check the RF antennas are OK.
138
+ ---
139
+
140
+ # 3DM Out
141
+
142
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/3dm%20out%20node.jpg?raw=true")
23
143
 
24
- Sends telemetry from Node-RED to 3DM.space.
144
+ The **3DM Out** node sends telemetry from Node-RED to 3DM.space.
25
145
 
26
146
  Use this node when the PassPort needs to send live values such as:
27
147
 
@@ -33,14 +153,245 @@ Use this node when the PassPort needs to send live values such as:
33
153
  - Fault status
34
154
  - Run hours
35
155
  - Totaliser values
156
+ - PLC values
157
+ - Mako RF node values
158
+ - Site data
36
159
 
37
160
  The node automatically prepares the data for 3DM.space.
38
161
 
39
- If the connection is unavailable, valid data is stored locally and sent later when the connection returns.
162
+ If the cloud connection is unavailable, valid data is stored locally and sent later when the connection returns.
163
+
164
+ ---
165
+
166
+ ## 3DM Out Input Data Type
167
+
168
+ The 3DM Out node expects `msg.payload` to be a JSON object.
169
+
170
+ Correct:
171
+
172
+ ```json
173
+ {
174
+ "tank_level": 65.2,
175
+ "pump_run": true,
176
+ "dc_voltage": 24.4
177
+ }
178
+ ```
179
+
180
+ Incorrect:
181
+
182
+ ```json
183
+ 65.2
184
+ ```
185
+
186
+ Incorrect:
187
+
188
+ ```text
189
+ pump_run
190
+ ```
191
+
192
+ Incorrect:
193
+
194
+ ```json
195
+ [
196
+ 1,
197
+ 2,
198
+ 3
199
+ ]
200
+ ```
201
+
202
+ The payload must be an object containing key/value pairs.
203
+
204
+
205
+ ---
206
+
207
+ ## Recommended Mako RF Payload
208
+
209
+ The Mako RF node should normally pass a flat JSON object into the 3DM Out node.
210
+
211
+ Example:
212
+
213
+ ```json
214
+ {
215
+ "cl level": 672.06,
216
+ "cl ppm": 1.2,
217
+ "cl dc": 24.46,
218
+ "ty et level": 1607.38,
219
+ "ty lph": 0,
220
+ "ty l1": 239.85,
221
+ "ty l2": 237.95,
222
+ "ty l3": 241.25,
223
+ "ty i1": 0.09,
224
+ "ty i2": 0.09,
225
+ "ty i3": 0.10,
226
+ "ty kwh": 0.003,
227
+ "ty totalizer": 25,
228
+ "cl fault": false,
229
+ "cl p1": false,
230
+ "cl p2": false
231
+ }
232
+ ```
233
+
234
+ This format is ideal because each key becomes a usable telemetry key in 3DM.space.
235
+ -It is important that each asset has a different key name, if you have multiple of the same asset, for example 3 bore pumpinh station, use a prefix like "b1 flowrate" then for the next bore "b2 flow rate", this ensures the data telemetry doesnt cancel over overide each other and it ensures you can find your data telemetry keys when building and designing dashbaords.
236
+
237
+ ---
238
+
239
+ ## Supported Value Types
240
+
241
+ The 3DM Out node can send values such as:
242
+
243
+ ```json
244
+ {
245
+ "level": 1234.5,
246
+ "pump_run": true,
247
+ "mode": "AUTO",
248
+ "fault_code": 0
249
+ }
250
+ ```
251
+
252
+ Supported values:
253
+
254
+ - Number
255
+ - Boolean
256
+ - String
257
+
258
+ Avoid sending large nested objects unless they are needed.
259
+
260
+ ---
261
+
262
+ ## 3DM Out Sending Speed Limit
263
+
264
+ The 3DM Out node includes safe sending protection.
265
+
266
+ Live telemetry should be sent no faster than:
267
+
268
+ ```text
269
+ 1 message every 60 seconds.
270
+ ```
271
+
272
+ This helps prevent accidental flooding from fast inject nodes, loops, or badly configured flows.
273
+
274
+ Example safe setup:
275
+
276
+ ```text
277
+ Inject / PLC / Mako RF
278
+ ↓
279
+ Function Node
280
+ ↓
281
+ 3DM Out
282
+ ```
283
+
284
+ Use an inject, polling, or scheduler rate of 60 seconds or slower.
285
+
286
+ ---
287
+
288
+ ## 3DM Out Store and Forward
289
+
290
+ The 3DM Out node includes built-in store and forward.
291
+
292
+ If the connection to 3DM.space is unavailable, valid telemetry is stored locally on the gateway.
293
+
294
+ When the connection returns, stored telemetry is sent automatically.
295
+
296
+ This helps prevent data loss during temporary connection outages.
297
+
298
+ Store and forward is useful for:
299
+
300
+ - 4G dropouts
301
+ - Remote site outages
302
+ - Satellite connection gaps
303
+ - Router restarts
304
+ - Temporary 3DM.space connection loss
305
+ - Poor signal sites
306
+
307
+ Stored data keeps the timestamp from when it arrived at the 3DM Out node.
308
+
309
+ ---
310
+
311
+ ## Live Data vs Stored Data
312
+
313
+ Live data is protected by the 60 second sending limit.
314
+
315
+ Stored data is handled separately.
316
+
317
+ When the connection returns, stored messages may be sent faster than the normal live limit so the gateway can catch up.
318
+
319
+ This means:
320
+
321
+ ```text
322
+ Live telemetry = protected by speed limit
323
+ Stored telemetry replay = handled automatically
324
+ ```
325
+
326
+ ---
327
+
328
+ ## 3DM Out Status Messages
329
+
330
+ The 3DM Out node shows a status under the node in Node-RED.
331
+
332
+ ### connected
333
+
334
+ The node is connected to 3DM.space and ready to send telemetry.
335
+
336
+ ### sent
337
+
338
+ The latest telemetry message was sent successfully.
339
+
340
+ ### storing offline
341
+
342
+ The node is not connected to 3DM.space, so valid telemetry is being stored locally.
343
+
344
+ This usually means:
345
+
346
+ - No internet connection
347
+ - 3DM.space connection is unavailable
348
+ - Credentials are wrong
349
+ - The cloud login has not connected yet
350
+
351
+ ### queued
352
+
353
+ The message has been placed in the local queue.
354
+
355
+ This can happen when stored messages are being processed or when the node needs to preserve message order.
356
+
357
+ ### backhauling
358
+
359
+ The connection has returned and the node is sending stored data from the local queue.
360
+
361
+ ### queue high
362
+
363
+ The local queue has a large number of stored messages.
364
+
365
+ This may happen after a long outage or if data is being sent too fast.
40
366
 
41
- ### 3DM In
367
+ ### bad payload
42
368
 
43
- Receives values sent from 3DM.space to the PassPort.
369
+ The incoming `msg.payload` was not a valid JSON object.
370
+
371
+ Check the data going into the 3DM Out node.
372
+
373
+ ### rate limited
374
+
375
+ The live payloads are arriving too quickly.
376
+
377
+ Slow the input down to 60 seconds or slower.
378
+
379
+ ### store/forward unavailable
380
+
381
+ The store and forward queue could not open.
382
+
383
+ Live sending may still work, but offline storage may not.
384
+
385
+ Check the Node-RED log.
386
+
387
+ ---
388
+
389
+ # 3DM In
390
+
391
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/3dm%20in%20node.jpg?raw=true")
392
+
393
+ The **3DM In** node receives values sent from 3DM.space to the PassPort.
394
+ The data is sent using `"Attributes"` in 3DM.space, you can create attributes in the chosen device or manually add them when building dashboards.
44
395
 
45
396
  Use this node when 3DM.space needs to send values down to Node-RED, such as:
46
397
 
@@ -51,16 +402,201 @@ Use this node when 3DM.space needs to send values down to Node-RED, such as:
51
402
  - Scheduler updates
52
403
  - Control settings
53
404
  - Remote configuration values
405
+ - SCADA button commands
406
+ - Config Store updates
407
+
408
+ ---
409
+
410
+ ## 3DM In Typical Uses
411
+
412
+ ### Simple command
413
+
414
+ Widgets will automatically send the commands in simlar data formats to 3DM.space sends:
415
+
416
+ ```json
417
+ {
418
+ "pump_cmd": 1
419
+ }
420
+ ```
421
+ Or
422
+ ```json
423
+ {
424
+ "setpoint": 1225
425
+ }
426
+ ```
427
+
428
+ Node-RED receives the command and then it can be forward sent to a PLC, relay, function node, or Mako RF node, or any other node in NodeRED.
429
+
430
+ ### Setpoint command
431
+
432
+ 3DM.space sends:
433
+
434
+ ```json
435
+ {
436
+ "start_level": 40,
437
+ "stop_level": 90
438
+ }
439
+ ```
440
+
441
+ Node-RED receives the values and uses them in local logic. It could be for high and low tank level pump start top logic.
442
+
443
+ ### Config Store command
444
+
445
+ 3DM.space sends:
446
+
447
+ ```json
448
+ {
449
+ "configStore": {
450
+ "b1": {
451
+ "type": "scheduler",
452
+ "data": []
453
+ }
454
+ }
455
+ }
456
+ ```
457
+
458
+ Node-RED passes the config into the 3DM Config Store node. This data is sent to the PassPort to be used for schedules, smar logic if the coms goes down. More details mentioned below
459
+
460
+ ---
461
+
462
+ ## 3DM In Attribute Key Field
463
+
464
+ The 3DM In node can receive all incoming values, or it can filter for one selected key.
465
+
466
+ ---
467
+
468
+ ### Leave Attribute Key Blank
469
+
470
+ Use this when you want all incoming values to pass through.
471
+
472
+ Recommended when feeding the 3DM Config Store node.
473
+
474
+ Example:
475
+
476
+ ```text
477
+ Attribute Key: blank
478
+ ```
479
+
480
+ Flow:
481
+
482
+ ```text
483
+ 3DM In
484
+ ↓
485
+ 3DM Config Store
486
+ ```
487
+
488
+ This allows the full incoming config to reach the Config Store node.
489
+
490
+ ---
491
+
492
+ ### Enter an Attribute Key
493
+
494
+ Use this when you only want one value to pass through.
495
+
496
+ Example:
497
+
498
+ ```text
499
+ Attribute Key: pump_cmd
500
+ ```
501
+
502
+ If 3DM.space sends:
503
+
504
+ ```json
505
+ {
506
+ "pump_cmd": 1,
507
+ "other_value": 55
508
+ }
509
+ ```
510
+
511
+ only `pump_cmd` is passed through.
512
+
513
+ ---
514
+
515
+ ## 3DM In Modes
516
+
517
+ The 3DM In node is normally used in one of two ways.
518
+
519
+ ---
520
+
521
+ ### All Values Mode
522
+
523
+ Leave the Attribute Key blank.
524
+
525
+ Use this for:
526
+
527
+ - Config Store
528
+ - Scheduler updates
529
+ - Smart control settings
530
+ - Multiple setpoints
531
+ - Receiving several cloud values at once
532
+
533
+ ---
534
+
535
+ ### Single Key Mode
536
+
537
+ Enter one Attribute Key.
538
+
539
+ Use this for:
540
+
541
+ - One pump command
542
+ - One reset command
543
+ - One setpoint
544
+ - One mode command
545
+ - One control value
546
+
547
+ ---
548
+
549
+ ## 3DM In Status Messages
54
550
 
55
- The node can receive all values, or it can be filtered to only pass through one selected key.
551
+ ### connected
56
552
 
57
- ### 3DM Config Store
553
+ The node is connected and listening for values from 3DM.space.
58
554
 
59
- Stores settings sent from 3DM.space and uses them locally on the PassPort.
555
+ ### waiting
556
+
557
+ The node is waiting for the 3DM Cloud Login connection.
558
+
559
+ ### connecting
560
+
561
+ The node is waiting for the cloud connection to become available.
562
+
563
+ ### received
564
+
565
+ The node received a value from 3DM.space.
566
+
567
+ ### filtered
568
+
569
+ The node received data, but it did not match the selected Attribute Key.
570
+
571
+ ### offline
572
+
573
+ The selected 3DM Cloud Login is not connected.
574
+
575
+ Check:
576
+
577
+ - Internet connection
578
+ - Device credentials
579
+ - 3DM Cloud Login node
580
+ - 3DM.space device credentials
581
+
582
+ ---
583
+
584
+ # 3DM Config Store
585
+
586
+
587
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/3dm%20config%20store%20node.jpg?raw=true")
588
+
589
+ The **3DM Config Store** node stores settings sent from 3DM.space and uses them locally on the PassPort.
60
590
 
61
591
  This node is normally placed after a **3DM In** node.
62
592
 
63
- 3DM In → 3DM Config Store → Local Outputs
593
+ ```text
594
+ 3DM In
595
+ ↓
596
+ 3DM Config Store
597
+ ↓
598
+ Local Outputs
599
+ ```
64
600
 
65
601
  Use this node for settings that need to be remembered and used by the PassPort, such as:
66
602
 
@@ -72,168 +608,1764 @@ Use this node for settings that need to be remembered and used by the PassPort,
72
608
  - Control limits
73
609
  - Run time settings
74
610
  - Site configuration values
611
+ - SCADA Canvas smart controls
75
612
 
76
613
  The Config Store saves the latest settings locally.
77
614
 
78
615
  If Node-RED restarts, the last saved settings are loaded again automatically.
79
616
 
80
- The node has **24 outputs** that can be used for local control. You can turn outputs not used to minimize the node size saving flow editor space.
617
+ ---
81
618
 
82
- ## Basic Setup
619
+ ## 3DM Config Store Active Outputs
83
620
 
84
- ### 1. Create or Open a Device in 3DM.space
621
+ The 3DM Config Store node supports up to 24 outputs.
85
622
 
86
- Log in to **3DM.space**.
623
+ You can select how many outputs are active.
87
624
 
88
- Create a new device, or open the existing device you want the PassPort to connect to.
625
+ Example:
89
626
 
90
- Open the device credentials section.
627
+ ```text
628
+ Active Outputs: 1
629
+ ```
91
630
 
92
- Copy these values:
631
+ Only output 1 is visible.
93
632
 
94
- - Client ID
95
- - User Name*
96
- - Password
633
+ Example:
97
634
 
98
- ### 2. Add a 3DM Cloud Login in Node-RED
635
+ ```text
636
+ Active Outputs: 8
637
+ ```
99
638
 
100
- Open a **3DM Out** or **3DM In** node.
639
+ Outputs 1 to 8 are visible.
101
640
 
102
- Create a new **3DM Cloud Login**.
641
+ Example:
103
642
 
104
- Paste the values from 3DM.space into the matching fields.
643
+ ```text
644
+ Active Outputs: 24
645
+ ```
105
646
 
106
- | 3DM.space | Node-RED |
107
- |---|---|
108
- | Client ID | Client ID |
109
- | User Name* | User Name* |
110
- | Password | Password |
647
+ All 24 outputs are visible.
111
648
 
112
- Give it a simple Node Name if needed, such as:
649
+ This keeps the Node-RED flow cleaner when only a few outputs are needed.
113
650
 
114
- Main PassPort
651
+ ---
115
652
 
116
- ### 3. Send Telemetry
653
+ ## 3DM Config Store Output Names
117
654
 
118
- Add a **3DM Out** node.
655
+ Config Store items use output names such as:
119
656
 
120
- Select the **3DM Cloud Login**.
657
+ ```text
658
+ output1
659
+ output2
660
+ output3
661
+ ```
121
662
 
122
- Connect your live data into the node.
663
+ The output name must match the output number.
123
664
 
124
- The values will appear against the selected device in 3DM.space.
665
+ Example:
125
666
 
126
- ### 4. Receive Commands
667
+ ```json
668
+ {
669
+ "output": "output1"
670
+ }
671
+ ```
127
672
 
128
- Add a **3DM In** node.
673
+ This sends to output 1.
129
674
 
130
- Select the same **3DM Cloud Login**.
675
+ Example:
131
676
 
132
- Leave **Attribute Key** blank to receive all incoming values.
677
+ ```json
678
+ {
679
+ "output": "output5"
680
+ }
681
+ ```
133
682
 
134
- Enter an **Attribute Key** if you only want one value to pass through.
683
+ This sends to output 5.
135
684
 
136
- For example, you may use a key such as:
685
+ If an item uses an output higher than the active output count, that item is skipped.
137
686
 
138
- pump_cmd
687
+ Example:
139
688
 
140
- Only that value will then be passed through the node.
689
+ ```text
690
+ Active Outputs: 1
691
+ Item output: output2
692
+ Result: skipped - output disabled
693
+ ```
141
694
 
142
- ### 5. Store Settings
695
+ ---
143
696
 
144
- Add a **3DM Config Store** node after a **3DM In** node.
697
+ ## 3DM Config Store Config Name
145
698
 
146
- Use this when settings from 3DM.space need to be saved on the PassPort.
699
+ The Config Name field controls which config block the node uses.
147
700
 
148
- This is useful for:
701
+ ---
149
702
 
150
- - Scheduler widgets
151
- - Setpoint widgets
152
- - Control widgets
153
- - Site setup widgets
154
- - Remote configuration screens
703
+ ### Blank Config Name
155
704
 
156
- The Config Store saves the settings locally and keeps using them even after a restart.
705
+ Leave Config Name blank to accept all config blocks.
157
706
 
158
- ### 6. Run Local Outputs
707
+ Example:
159
708
 
160
- The **3DM Config Store** node has 24 outputs.
709
+ ```text
710
+ Config Name: blank
711
+ ```
161
712
 
162
- These outputs can be used to control local logic in Node-RED. You can turn outputs not used off, the outputs will align with the 3DM scada canvas node and other schedule and control nodes that have reference to 24 outputs.
713
+ This accepts:
163
714
 
164
- Typical uses include:
715
+ ```json
716
+ {
717
+ "b1": {},
718
+ "b2": {},
719
+ "mainScheduler": {}
720
+ }
721
+ ```
165
722
 
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
723
+ ---
172
724
 
173
- ## Store and Forward
725
+ ### Named Config
174
726
 
175
- The **3DM Out** node includes built-in store and forward.
727
+ Enter a name to only accept one config block.
176
728
 
177
- If the cloud connection is unavailable, valid telemetry is stored locally on the gateway.
729
+ Example:
178
730
 
179
- When the connection returns, stored telemetry is sent automatically.
731
+ ```text
732
+ Config Name: b1
733
+ ```
180
734
 
181
- This helps prevent data loss during temporary connection outages.
735
+ This node only uses:
182
736
 
183
- ## Safe Sending Limits
737
+ ```json
738
+ {
739
+ "b1": {}
740
+ }
741
+ ```
184
742
 
185
- The **3DM Out** node includes safe sending protection.
743
+ and ignores:
186
744
 
187
- This helps prevent users from accidentally sending data too quickly.
745
+ ```json
746
+ {
747
+ "b2": {}
748
+ }
749
+ ```
188
750
 
189
- Stored data is handled automatically when the connection returns.
751
+ This is useful when using multiple Config Store nodes.
190
752
 
191
- ## Typical Flows
753
+ Example:
192
754
 
193
- Sending telemetry:
755
+ ```text
756
+ Config Store node 1
757
+ Config Name: b1
758
+ Active Outputs: 1
194
759
 
195
- Sensor / PLC Data
196
- ↓
197
- Function Node
198
- ↓
199
- 3DM Out
200
- ↓
201
- 3DM.space
760
+ Config Store node 2
761
+ Config Name: b2
762
+ Active Outputs: 1
763
+ ```
202
764
 
203
- Receiving commands:
765
+ Both nodes can receive the same incoming `configStore`, but each node only acts on its own config name.
204
766
 
205
- 3DM.space
206
- ↓
207
- 3DM In
208
- ↓
209
- Function Node
210
- ↓
211
- PLC / Output Logic
767
+ ---
212
768
 
213
- Receiving saved settings:
769
+ ## 3DM Config Store Format
214
770
 
215
- 3DM.space
216
- ↓
217
- 3DM In
218
- ↓
219
- 3DM Config Store
220
- ↓
221
- 24 Local Outputs
771
+ The Config Store expects a main `configStore` object.
222
772
 
223
- ## Notes
773
+ Inside `configStore`, each block has its own name.
224
774
 
225
- - Use **3DM Out** to send live data to 3DM.space. This can be read on 3DM devices via "Latest telemetry" under the device properties
226
- - Use **3DM In** to receive commands and settings from 3DM.space. Data can be sent from 3DM.space to the PassPort via "Attributes" under the device properties
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.
775
+ Example:
232
776
 
233
- ## Author
777
+ ```json
778
+ {
779
+ "configStore": {
780
+ "b1": {
781
+ "type": "scheduler",
782
+ "data": [
783
+ {
784
+ "id": "b1_control",
785
+ "output": "output1",
786
+ "name": "Bore Pump 1",
787
+ "controlType": "control",
788
+ "mode": "AUTO",
789
+ "variable": "tank_level",
790
+ "lowSetpoint": 40,
791
+ "highSetpoint": 90,
792
+ "direction": "in"
793
+ }
794
+ ]
795
+ },
796
+ "b2": {
797
+ "type": "scheduler",
798
+ "data": [
799
+ {
800
+ "id": "b2_control",
801
+ "output": "output1",
802
+ "name": "Bore Pump 2",
803
+ "controlType": "control",
804
+ "mode": "AUTO",
805
+ "variable": "tank_level",
806
+ "lowSetpoint": 40,
807
+ "highSetpoint": 90,
808
+ "direction": "in"
809
+ }
810
+ ]
811
+ }
812
+ }
813
+ }
814
+ ```
234
815
 
235
- Smithtek
816
+ ---
817
+
818
+ ## 3DM Config Store Check Every
819
+
820
+ This sets how often the Config Store checks its local logic.
821
+
822
+ Example:
823
+
824
+ ```text
825
+ Check Every: 20 seconds
826
+ ```
827
+
828
+ The node checks the saved schedules and controls every 20 seconds.
829
+
830
+ Allowed range:
831
+
832
+ ```text
833
+ 1 to 60 seconds
834
+ ```
835
+
836
+ ---
837
+
838
+ ## 3DM Config Store Output Mode
839
+
840
+ The Config Store has two output modes.
841
+
842
+ ---
843
+
844
+ ### Only When Output Changes
845
+
846
+ This only sends an output when the final output state changes.
847
+
848
+ Example:
849
+
850
+ ```text
851
+ Output was false
852
+ Tank drops below low start
853
+ Output becomes true
854
+ Node sends true once
855
+ ```
856
+
857
+ This is normally the best mode for real equipment, or can be used to optimize and reduce RF transmissions.
858
+
859
+ ---
860
+
861
+ ### Every Check
862
+
863
+ This sends the current output state every check interval.
864
+
865
+ Example:
866
+
867
+ ```text
868
+ Check Every: 20 seconds
869
+ Output Mode: Every check
870
+ ```
871
+
872
+ The node sends the output state every 20 seconds.
873
+
874
+ Use this when downstream logic needs repeated true/false messages.
875
+
876
+ ---
877
+
878
+ ## 3DM Config Store Config Output
879
+
880
+ Config Output is optional.
881
+
882
+ It sends the stored config out of one selected output.
883
+
884
+ Normal use:
885
+
886
+ ```text
887
+ Config Output: Disabled
888
+ ```
889
+
890
+ Debug use:
891
+
892
+ ```text
893
+ Config Output: Output 24
894
+ ```
895
+
896
+ This can be useful when testing what the Config Store has saved.
897
+
898
+ Do not use the same output for control and Config Output at the same time.
899
+
900
+ ---
901
+
902
+ ## 3DM Config Store Send Config
903
+
904
+ When enabled, the node sends the stored config when it is updated.
905
+
906
+ This is mainly useful for debugging or passing the saved config to another part of the flow.
907
+
908
+ Normal use:
909
+
910
+ ```text
911
+ Send Config: off
912
+ ```
913
+
914
+ ---
915
+
916
+ # Config Store Control Modes
917
+
918
+ The Config Store supports local control logic.
919
+
920
+ The most common control modes are:
921
+
922
+ - ON
923
+ - OFF
924
+ - AUTO
925
+
926
+ ---
927
+
928
+ ## ON Mode
929
+
930
+ ON forces the output on.
931
+
932
+ Example:
933
+
934
+ ```json
935
+ {
936
+ "mode": "ON"
937
+ }
938
+ ```
939
+
940
+ Result:
941
+
942
+ ```text
943
+ Output = true
944
+ ```
945
+
946
+ ---
947
+
948
+ ## OFF Mode
949
+
950
+ OFF forces the output off.
951
+
952
+ Example:
953
+
954
+ ```json
955
+ {
956
+ "mode": "OFF"
957
+ }
958
+ ```
959
+
960
+ Result:
961
+
962
+ ```text
963
+ Output = false
964
+ ```
965
+
966
+ ---
967
+
968
+ ## AUTO Mode
969
+
970
+ AUTO uses a live input value and setpoints.
971
+
972
+ Example:
973
+
974
+ ```json
975
+ {
976
+ "mode": "AUTO",
977
+ "variable": "tank_level",
978
+ "lowSetpoint": 40,
979
+ "highSetpoint": 90,
980
+ "direction": "in"
981
+ }
982
+ ```
983
+
984
+ The node watches:
985
+
986
+ ```text
987
+ tank_level
988
+ ```
989
+
990
+ and compares it to:
991
+
992
+ ```text
993
+ Low Start: 40
994
+ High Stop: 90
995
+ ```
996
+
997
+ ---
998
+
999
+ ## Pump In / Fill Direction
1000
+
1001
+ Use `direction: "in"` for filling.
1002
+
1003
+ Logic:
1004
+
1005
+ ```text
1006
+ Value <= Low Start → Output ON
1007
+ Value >= High Stop → Output OFF
1008
+ Between setpoints → Hold last state
1009
+ ```
1010
+
1011
+ Example:
1012
+
1013
+ ```text
1014
+ Tank level = 30
1015
+ Low Start = 40
1016
+ High Stop = 90
1017
+ Direction = Pump In / Fill
1018
+ Result = ON
1019
+ ```
1020
+
1021
+ Example:
1022
+
1023
+ ```text
1024
+ Tank level = 95
1025
+ Low Start = 40
1026
+ High Stop = 90
1027
+ Direction = Pump In / Fill
1028
+ Result = OFF
1029
+ ```
1030
+
1031
+ ---
1032
+
1033
+ ## Pump Out / Empty Direction
1034
+
1035
+ Use `direction: "out"` for emptying.
1036
+
1037
+ Logic:
1038
+
1039
+ ```text
1040
+ Value >= High Stop → Output ON
1041
+ Value <= Low Start → Output OFF
1042
+ Between setpoints → Hold last state
1043
+ ```
1044
+
1045
+ Example:
1046
+
1047
+ ```text
1048
+ Tank level = 95
1049
+ Low Start = 40
1050
+ High Stop = 90
1051
+ Direction = Pump Out / Empty
1052
+ Result = ON
1053
+ ```
1054
+
1055
+ Example:
1056
+
1057
+ ```text
1058
+ Tank level = 30
1059
+ Low Start = 40
1060
+ High Stop = 90
1061
+ Direction = Pump Out / Empty
1062
+ Result = OFF
1063
+ ```
1064
+
1065
+ ---
1066
+
1067
+ ## Hysteresis
1068
+
1069
+ AUTO mode uses hysteresis.
1070
+
1071
+ That means the output does not constantly flick on and off while the value is between the low and high setpoints.
1072
+
1073
+ Example:
1074
+
1075
+ ```text
1076
+ Low Start: 40
1077
+ High Stop: 90
1078
+ Current value: 60
1079
+ ```
1080
+
1081
+ The value is between the setpoints, so the node holds the last output state.
1082
+
1083
+ ---
1084
+
1085
+ # Remote Key To Watch
1086
+
1087
+ The Remote Key To Watch is the live payload key the Config Store checks in AUTO mode.
1088
+
1089
+ Example incoming payload:
1090
+
1091
+ ```json
1092
+ {
1093
+ "ty et level": 1607.38
1094
+ }
1095
+ ```
1096
+
1097
+ Remote Key To Watch:
1098
+
1099
+ ```text
1100
+ ty et level
1101
+ ```
1102
+
1103
+ The key must match the payload exactly.
1104
+
1105
+ Spaces are allowed.
1106
+
1107
+ ---
1108
+
1109
+ ## Flat Payload Keys
1110
+
1111
+ For a flat payload:
1112
+
1113
+ ```json
1114
+ {
1115
+ "ty et level": 1607.38
1116
+ }
1117
+ ```
1118
+
1119
+ Use:
1120
+
1121
+ ```text
1122
+ ty et level
1123
+ ```
1124
+
1125
+ ---
1126
+
1127
+ ## Wrapped Payload Keys
1128
+
1129
+ For a wrapped payload:
1130
+
1131
+ ```json
1132
+ {
1133
+ "ty et level": {
1134
+ "value": 1607.38,
1135
+ "timestamp": 1788329806635
1136
+ }
1137
+ }
1138
+ ```
1139
+
1140
+ Use:
1141
+
1142
+ ```text
1143
+ ty et level.value
1144
+ ```
1145
+
1146
+ ---
1147
+
1148
+ ## Mixed Payload Example
1149
+
1150
+ Example:
1151
+
1152
+ ```json
1153
+ {
1154
+ "cl level": {
1155
+ "value": 672.06,
1156
+ "timestamp": 1788329806635
1157
+ },
1158
+ "cl fault": 0,
1159
+ "b2 fb": 0
1160
+ }
1161
+ ```
1162
+
1163
+ Use:
1164
+
1165
+ ```text
1166
+ cl level.value
1167
+ ```
1168
+
1169
+ for the wrapped value.
1170
+
1171
+ Use:
1172
+
1173
+ ```text
1174
+ cl fault
1175
+ ```
1176
+
1177
+ for the direct value.
1178
+
1179
+ Use:
1180
+
1181
+ ```text
1182
+ b2 fb
1183
+ ```
1184
+
1185
+ for the direct value.
1186
+
1187
+ ---
1188
+
1189
+ # Config Store Status Messages
1190
+
1191
+ The Config Store node shows status text under the node.
1192
+
1193
+ ---
1194
+
1195
+ ## waiting for configStore
1196
+
1197
+ The node has not received any valid config yet.
1198
+
1199
+ Check:
1200
+
1201
+ - 3DM In node is connected
1202
+ - 3DM In Attribute Key is blank
1203
+ - 3DM.space has sent a `configStore`
1204
+ - The selected device is correct
1205
+
1206
+ ---
1207
+
1208
+ ## loaded saved config
1209
+
1210
+ The node loaded the last saved config from local storage after Node-RED started.
1211
+
1212
+ This means it can keep using the previous config even before a new cloud update arrives.
1213
+
1214
+ ---
1215
+
1216
+ ## saved: b1
1217
+
1218
+ The node received and saved the `b1` config block.
1219
+
1220
+ Example:
1221
+
1222
+ ```text
1223
+ saved: b1
1224
+ ```
1225
+
1226
+ This means the Config Name matched and the config was stored locally.
1227
+
1228
+ ---
1229
+
1230
+ ## saved: b1, b2
1231
+
1232
+ The node received and saved multiple config blocks.
1233
+
1234
+ This usually happens when Config Name is blank.
1235
+
1236
+ ---
1237
+
1238
+ ## config unchanged: b1
1239
+
1240
+ The node received a config block that matched, but it was the same as the one already stored.
1241
+
1242
+ No forced output update was needed.
1243
+
1244
+ ---
1245
+
1246
+ ## configStore ignored
1247
+
1248
+ The node received a configStore, but it did not match this node's Config Name.
1249
+
1250
+ Example:
1251
+
1252
+ ```text
1253
+ Config Name: b2
1254
+ Received: b1
1255
+ Result: ignored
1256
+ ```
1257
+
1258
+ Check that the Config Name in Node-RED matches the Config Name from the SCADA Canvas control.
1259
+
1260
+ ---
1261
+
1262
+ ## output1: tank skipped
1263
+
1264
+ The node found the config item, but could not calculate the output.
1265
+
1266
+ Common causes:
1267
+
1268
+ - The live payload does not contain the Remote Key To Watch
1269
+ - The key name is wrong
1270
+ - The payload is wrapped and needs `.value`
1271
+ - Low Start is blank
1272
+ - High Stop is blank
1273
+ - The value is not numeric
1274
+
1275
+ Example problem:
1276
+
1277
+ ```json
1278
+ {
1279
+ "tank": {
1280
+ "value": 50
1281
+ }
1282
+ }
1283
+ ```
1284
+
1285
+ Remote Key To Watch is incorrectly set to:
1286
+
1287
+ ```text
1288
+ tank
1289
+ ```
1290
+
1291
+ Correct:
1292
+
1293
+ ```text
1294
+ tank.value
1295
+ ```
1296
+
1297
+ ---
1298
+
1299
+ ## output1: ON
1300
+
1301
+ The final output state is ON.
1302
+
1303
+ The node will send:
1304
+
1305
+ ```json
1306
+ true
1307
+ ```
1308
+
1309
+ from output 1.
1310
+
1311
+ ---
1312
+
1313
+ ## output1: OFF
1314
+
1315
+ The final output state is OFF.
1316
+
1317
+ The node will send:
1318
+
1319
+ ```json
1320
+ false
1321
+ ```
1322
+
1323
+ from output 1.
1324
+
1325
+ ---
1326
+
1327
+ ## skipped - output disabled
1328
+
1329
+ The config item is trying to use an output that is not active.
1330
+
1331
+ Example:
1332
+
1333
+ ```text
1334
+ Active Outputs: 1
1335
+ Item output: output2
1336
+ ```
1337
+
1338
+ Result:
1339
+
1340
+ ```text
1341
+ output2 skipped - output disabled
1342
+ ```
1343
+
1344
+ Increase Active Outputs or change the item to `output1`.
1345
+
1346
+ ---
1347
+
1348
+ # 3DM SCADA Canvas Smart Control Integration
1349
+
1350
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/Canvas%20SCADA%203dm.jpg?raw=true)
1351
+
1352
+ ---
1353
+
1354
+ # 3DM SCADA Canvas Widget
1355
+
1356
+ The **3DM SCADA Canvas** is the main default dashboard-building widget for 3DM.space.
1357
+
1358
+ It is designed to give users one flexible widget that can be used to build complete SCADA-style screens without needing a different widget for every display, control, indicator, gauge or setpoint.
1359
+
1360
+ The canvas can be used to create dashboards for pumps, tanks, bores, irrigation systems, treatment plants, generators, remote sites, telemetry systems and general automation projects.
1361
+
1362
+ It can display live values, show equipment status, add background images, create process-style layouts, send commands, adjust setpoints, and link directly into the 3DM Node-RED nodes running on the PassPort gateway.
1363
+
1364
+ ##-Important-##
1365
+
1366
+ `To run the SCADA press save then live mode button`
1367
+ `To edit the scada and make changes press the edit button`
1368
+
1369
+ Typical canvas items include:
1370
+
1371
+ - Text labels
1372
+ - Value displays
1373
+ - Gauges
1374
+ - Vertical level bars
1375
+ - Horizontal bars
1376
+ - Tables
1377
+ - LED indicators
1378
+ - Spinning run indicators
1379
+ - Control buttons
1380
+ - Setpoint tables
1381
+ - Action buttons
1382
+ - Lines, panels and layout shapes
1383
+ - Background images
1384
+
1385
+ The widget is built so a dashboard can be assembled visually. Items can be added, moved, resized and configured directly on the canvas.
1386
+
1387
+ This makes it suitable for both simple dashboards and more detailed SCADA-style views.
1388
+
1389
+ ---
1390
+
1391
+ ## How the Canvas Works With 3DM Nodes
1392
+
1393
+ The SCADA Canvas works directly with the 3DM Node-RED nodes.
1394
+
1395
+ Live data is normally sent from the PassPort to 3DM.space using the **3DM Out** node.
1396
+
1397
+ Commands and settings are sent from the SCADA Canvas back to the PassPort using the **3DM In** node.
1398
+
1399
+ Smart local control settings are stored and run locally using the **3DM Config Store** node.
1400
+
1401
+ Typical telemetry flow:
1402
+
1403
+ ```text
1404
+ Mako RF / PLC / Sensor Data
1405
+ ↓
1406
+ Node-RED Function Logic
1407
+ ↓
1408
+ 3DM Out
1409
+ ↓
1410
+ 3DM.space
1411
+ ↓
1412
+ SCADA Canvas Display
1413
+ ```
1414
+
1415
+ Typical command flow:
1416
+
1417
+ ```text
1418
+ SCADA Canvas Button / Setpoint
1419
+ ↓
1420
+ 3DM.space Shared Attribute
1421
+ ↓
1422
+ 3DM In
1423
+ ↓
1424
+ Function Node / PLC Logic / Mako RF Command
1425
+ ```
1426
+
1427
+ Typical smart control flow:
1428
+
1429
+ ```text
1430
+ SCADA Canvas Smart Control
1431
+ ↓
1432
+ configStore Shared Attribute
1433
+ ↓
1434
+ 3DM In
1435
+ ↓
1436
+ 3DM Config Store
1437
+ ↓
1438
+ Local Output Logic
1439
+ ```
1440
+
1441
+ ---
1442
+
1443
+ ## Data Variables and Attributes
1444
+
1445
+ When first adding the SCADA Canvas widget to a dashboard, the live telemetry variables must be added to the widget datasource.
1446
+
1447
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/Select%20Data%203dm.jpg?raw=true)
1448
+ These are the values the canvas needs to display. Press the + button to select data from the selected device, in this image the device is called "PassPort no 567"
1449
+
1450
+ Examples:
1451
+
1452
+ ```text
1453
+ tank_level
1454
+ pump_run
1455
+ pump_fault
1456
+ dc_voltage
1457
+ flow_lpm
1458
+ pressure_kpa
1459
+ ty et level
1460
+ b1 fb
1461
+ b2 fb
1462
+ ```
1463
+
1464
+ These data variables are used by display items such as:
1465
+
1466
+ - Values
1467
+ - Gauges
1468
+ - Bars
1469
+ - Tables
1470
+ - LEDs
1471
+ - Run indicators
1472
+
1473
+ Attributes do not need to be added as data variables.
1474
+
1475
+ The SCADA Canvas handles attributes internally through the widget settings and control settings.
1476
+
1477
+ This means command keys, setpoints and smart control configuration do not need to be manually added to the widget datasource as data keys.
1478
+
1479
+ Examples of attributes handled by the widget:
1480
+
1481
+ ```text
1482
+ pump_cmd
1483
+ reset_cmd
1484
+ configStore
1485
+ start_level
1486
+ stop_level
1487
+ ```
1488
+
1489
+ Only add the live telemetry variables that need to be displayed or used visually on the canvas.
1490
+
1491
+ ---
1492
+ ## Widgets
1493
+ ![This is an alt text.](https://github.com/smithtekIOT/ArtWork/blob/master/3dm%20widgets.jpg?raw=true)
1494
+
1495
+ ---
1496
+
1497
+ The SCADA Canvas includes the SCADA widget main items needed to build a complete dashboard screen from one widget.
1498
+
1499
+ ### Background Image
1500
+
1501
+ Adds a site image, process diagram, map, equipment photo or custom SCADA graphic behind the canvas items.
1502
+
1503
+ Use for:
1504
+
1505
+ - Site layouts
1506
+ - Pump station diagrams
1507
+ - Tank layouts
1508
+ - Process backgrounds
1509
+ - Branded dashboard screens
1510
+
1511
+ ---
1512
+
1513
+ ### Text Label
1514
+
1515
+ Adds fixed text to the canvas.
1516
+
1517
+ Use for:
1518
+
1519
+ - Equipment names
1520
+ - Area labels
1521
+ - Section headings
1522
+ - Notes
1523
+ - Units or descriptions
1524
+
1525
+ Example:
1526
+
1527
+ ```text
1528
+ Bore Pump 1
1529
+ Main Tank
1530
+ Discharge Pressure
1531
+ ```
1532
+
1533
+ ---
1534
+
1535
+ ### Value Display
1536
+
1537
+ Shows a live telemetry value from the selected device.
1538
+
1539
+ Use for:
1540
+
1541
+ - Level
1542
+ - Pressure
1543
+ - Flow
1544
+ - Voltage
1545
+ - Current
1546
+ - Run hours
1547
+ - Totalisers
1548
+
1549
+ Example:
1550
+
1551
+ ```text
1552
+ Data Key: tank_level
1553
+ Display: 76 %
1554
+ ```
1555
+
1556
+ ---
1557
+
1558
+ ### Gauge
1559
+
1560
+ Shows a live value as a gauge.
1561
+
1562
+ Use for values that are easier to read visually.
1563
+
1564
+ Use for:
1565
+
1566
+ - Pressure
1567
+ - Flow
1568
+ - Tank level
1569
+ - Battery voltage
1570
+ - Speed
1571
+ - Current
1572
+
1573
+ Example:
1574
+
1575
+ ```text
1576
+ Data Key: pressure_kpa
1577
+ Range: 0 to 600
1578
+ ```
1579
+
1580
+ ---
1581
+
1582
+ ### Vertical Bar
1583
+
1584
+ Shows a live value as a vertical fill bar.
1585
+
1586
+ Best for tanks, levels and storage values.
1587
+
1588
+ Use for:
1589
+
1590
+ - Tank level
1591
+ - Bore level
1592
+ - Chemical level
1593
+ - Silo level
1594
+ - Battery level
1595
+
1596
+ Example:
1597
+
1598
+ ```text
1599
+ Data Key: ty et level
1600
+ Low: 0
1601
+ High: 4000
1602
+ ```
1603
+
1604
+ ---
1605
+
1606
+ ### Horizontal Bar
1607
+
1608
+ Shows a live value as a horizontal fill bar.
1609
+
1610
+ Best for progress-style values.
1611
+
1612
+ Use for:
1613
+
1614
+ - Flow percentage
1615
+ - Pump speed
1616
+ - Battery percentage
1617
+ - Load percentage
1618
+ - Process progress
1619
+
1620
+ Example:
1621
+
1622
+ ```text
1623
+ Data Key: pump_speed
1624
+ Range: 0 to 100
1625
+ ```
1626
+
1627
+ ---
1628
+
1629
+ ### LED Indicator
1630
+
1631
+ Shows equipment state using colour.
1632
+
1633
+ Use for:
1634
+
1635
+ - Pump running
1636
+ - Pump fault
1637
+ - Valve open
1638
+ - Comms status
1639
+ - Alarm state
1640
+ - Relay feedback
1641
+
1642
+ Example:
1643
+
1644
+ ```text
1645
+ Data Key: b1 fb
1646
+ 0 = Off
1647
+ 1 = Running
1648
+ ```
1649
+
1650
+ ---
1651
+
1652
+ ### Spinning Wheel
1653
+
1654
+ Shows a rotating run indicator when a value is active.
1655
+
1656
+ Use for:
1657
+
1658
+ - Pump running
1659
+ - Motor running
1660
+ - Fan running
1661
+ - Mixer running
1662
+ - Generator running
1663
+
1664
+ Example:
1665
+
1666
+ ```text
1667
+ Data Key: pump_run
1668
+ Spin when value = 1
1669
+ ```
1670
+
1671
+ ---
1672
+
1673
+ ### Table
1674
+
1675
+ Shows multiple live values in a compact list.
1676
+
1677
+ Use for:
1678
+
1679
+ - Electrical values
1680
+ - Pump data
1681
+ - Water quality
1682
+ - Site summary
1683
+ - Multiple sensor readings
1684
+
1685
+ Example:
1686
+
1687
+ ```text
1688
+ Voltage
1689
+ Current
1690
+ Power
1691
+ Run Hours
1692
+ Totaliser
1693
+ ```
1694
+
1695
+ ---
1696
+
1697
+ ### Control Button
1698
+
1699
+ Adds ON / OFF / AUTO style controls to the canvas.
1700
+
1701
+ Use for:
1702
+
1703
+ - Pump commands
1704
+ - Mode selection
1705
+ - Manual control
1706
+ - Auto control
1707
+ - Reset commands
1708
+
1709
+ The control button can work as a simple command button or as a Smart Local Control linked to the 3DM Config Store.
1710
+
1711
+ ---
1712
+
1713
+ ### Basic Button Command
1714
+
1715
+ Sends a direct command value back to the PassPort.
1716
+
1717
+ Use for simple commands.
1718
+
1719
+ Example:
1720
+
1721
+ ```text
1722
+ ON → pump_cmd = 1
1723
+ OFF → pump_cmd = 0
1724
+ ```
1725
+
1726
+ The value is sent to Node-RED through the **3DM In** node.
1727
+
1728
+ ---
1729
+
1730
+ ### Smart Local Control
1731
+
1732
+ Sends control settings to the **3DM Config Store** node.
1733
+
1734
+ Use when the PassPort should run the control locally.
1735
+
1736
+ Example:
1737
+
1738
+ ```text
1739
+ Mode: AUTO
1740
+ Watch: ty et level
1741
+ Low Start: 1500
1742
+ High Stop: 1700
1743
+ Direction: Pump In / Fill
1744
+ ```
1745
+
1746
+ The PassPort can keep running this logic locally, even during a temporary cloud outage.
1747
+
1748
+ ---
1749
+
1750
+ ### Setpoint Table
1751
+
1752
+ Allows users to enter and send setpoints from the dashboard.
1753
+
1754
+ Use for:
1755
+
1756
+ - Start levels
1757
+ - Stop levels
1758
+ - Pressure limits
1759
+ - Alarm limits
1760
+ - Flow limits
1761
+ - Site settings
1762
+
1763
+ Example:
1764
+
1765
+ ```text
1766
+ Low Start: 1500
1767
+ High Stop: 1700
1768
+ ```
1769
+
1770
+ Setpoints are sent back to Node-RED through the **3DM In** node.
1771
+
1772
+ ---
1773
+
1774
+ ### Action Button
1775
+
1776
+ Runs a dashboard action configured in 3DM.space.
1777
+
1778
+ Use for:
1779
+
1780
+ - Opening detail screens
1781
+ - Opening popups
1782
+ - Opening trend views
1783
+ - Opening alarm pages
1784
+ - Moving between dashboard states
1785
+
1786
+ Example:
1787
+
1788
+ ```text
1789
+ Button: Pump Details
1790
+ Action: Open pump detail popup
1791
+ ```
1792
+
1793
+ ---
1794
+
1795
+ ### Line
1796
+
1797
+ Adds a simple line to the canvas.
1798
+
1799
+ Use for:
1800
+
1801
+ - Pipework
1802
+ - Flow paths
1803
+ - Cable paths
1804
+ - Separators
1805
+ - Simple process diagrams
1806
+
1807
+ ---
1808
+
1809
+ ### Panel / Rectangle
1810
+
1811
+ Adds a visual panel or box behind other items.
1812
+
1813
+ Use for:
1814
+
1815
+ - Grouping related values
1816
+ - Creating equipment cards
1817
+ - Highlighting sections
1818
+ - Building clean dashboard layouts
1819
+
1820
+ ---
1821
+
1822
+ ## Widget Setup Note
1823
+
1824
+ When first adding the SCADA Canvas widget, add the telemetry data variables that need to be displayed on the canvas.
1825
+
1826
+ Examples:
1827
+
1828
+ ```text
1829
+ tank_level
1830
+ pump_run
1831
+ pump_fault
1832
+ dc_voltage
1833
+ flow_lpm
1834
+ ty et level
1835
+ b1 fb
1836
+ b2 fb
1837
+ ```
1838
+
1839
+ You do not need to add command attributes as data keys.
1840
+
1841
+ The widget handles attributes internally through the widget settings and control settings.
1842
+
1843
+ Examples that do not need to be added as data variables:
1844
+
1845
+ ```text
1846
+ pump_cmd
1847
+ reset_cmd
1848
+ configStore
1849
+ start_level
1850
+ stop_level
1851
+ ```
1852
+
1853
+
1854
+ ## Control Buttons
1855
+
1856
+ The SCADA Canvas includes control buttons that can send commands back to the PassPort.
1857
+
1858
+ There are two main control styles:
1859
+
1860
+ ```text
1861
+ Basic Button Command
1862
+ Smart Local Control
1863
+ ```
1864
+
1865
+ **Basic Button Command** is used when the button sends a simple command value.
1866
+
1867
+ Example:
1868
+
1869
+ ```text
1870
+ ON → pump_cmd = 1
1871
+ OFF → pump_cmd = 0
1872
+ ```
1873
+
1874
+ **Smart Local Control** is used when the PassPort should handle the control logic locally.
1875
+
1876
+ Example:
1877
+
1878
+ ```text
1879
+ AUTO mode
1880
+ Watch tank level
1881
+ Start below low setpoint
1882
+ Stop above high setpoint
1883
+ Run logic locally in Node-RED
1884
+ ```
1885
+
1886
+ Smart Local Control sends its settings to the **3DM Config Store** node, where the logic continues to run locally on the PassPort.
1887
+
1888
+ This means the PassPort can continue running the control logic even if the cloud connection is temporarily unavailable.
1889
+
1890
+ ---
1891
+
1892
+ ## Why Use the SCADA Canvas
1893
+
1894
+ The SCADA Canvas reduces the need to build many separate dashboard widgets.
1895
+
1896
+ Instead of using one widget for a value, another for a gauge, another for a button, another for an LED and another for setpoints, the canvas allows these items to be built into one screen.
1897
+
1898
+ This helps keep dashboards cleaner, easier to manage and better suited to real site layouts.
1899
+
1900
+ It is especially useful for projects that need:
1901
+
1902
+ - A visual overview of a site
1903
+ - Pump and tank control
1904
+ - Remote start/stop commands
1905
+ - Local automatic control
1906
+ - Setpoint adjustment
1907
+ - Live feedback indicators
1908
+ - Simple process diagrams
1909
+ - Custom SCADA-style screens
1910
+
1911
+ ---
1912
+
1913
+ ## Basic Button Command
1914
+
1915
+ Basic mode sends a simple shared attribute key/value.
1916
+
1917
+ Example:
1918
+
1919
+ ```text
1920
+ Control Attribute Key: pump_cmd
1921
+ ON Value: 1
1922
+ OFF Value: 0
1923
+ AUTO Value: auto
1924
+ ```
1925
+
1926
+ Pressing ON sends:
1927
+
1928
+ ```json
1929
+ {
1930
+ "pump_cmd": 1
1931
+ }
1932
+ ```
1933
+
1934
+ Use Basic mode for simple direct commands.
1935
+
1936
+ ---
1937
+
1938
+ ## Smart Local Control
1939
+
1940
+ Smart Local Control sends settings into `configStore`.
1941
+
1942
+ Use this when Node-RED should handle the control locally.
1943
+
1944
+ Example fields:
1945
+
1946
+ ```text
1947
+ Config Name: b1
1948
+ Remote Key To Watch: ty et level
1949
+ Low Start Setpoint: 1500
1950
+ High Stop Setpoint: 1700
1951
+ Direction: Pump In / Fill
1952
+ ```
1953
+
1954
+ This creates a config block that the Config Store node can run locally.
1955
+
1956
+ ---
1957
+
1958
+ ## Control Attribute Key vs Remote Key To Watch
1959
+
1960
+ ### Control Attribute Key
1961
+
1962
+ Used for Basic button command mode.
1963
+
1964
+ It decides which shared attribute key is written when a button is pressed.
1965
+
1966
+ Example:
1967
+
1968
+ ```text
1969
+ pump_cmd
1970
+ ```
1971
+
1972
+ ### Remote Key To Watch
1973
+
1974
+ Used for Smart Local Control AUTO mode.
1975
+
1976
+ It decides which live payload key the Config Store node watches.
1977
+
1978
+ Example:
1979
+
1980
+ ```text
1981
+ ty et level
1982
+ ```
1983
+
1984
+ These are different jobs.
1985
+
1986
+ ---
1987
+
1988
+ ## Smart Control Button Light
1989
+
1990
+ For Smart Local Control, the canvas button should remember the last selected mode.
1991
+
1992
+ Example:
1993
+
1994
+ ```text
1995
+ Press AUTO
1996
+ AUTO stays highlighted
1997
+ ```
1998
+
1999
+ The button light is only a visual indication of the last selected mode.
2000
+
2001
+ For real-world feedback, use separate indicator variables, LED widgets, or telemetry feedback keys from the device.
2002
+
2003
+ Recommended setup:
2004
+
2005
+ ```text
2006
+ Control button = sends selected mode
2007
+ LED / indicator = shows actual pump feedback
2008
+ ```
2009
+
2010
+ ---
2011
+
2012
+ ## Updating Setpoints Safely
2013
+
2014
+ When using Smart Local Control, changing Low Start or High Stop should be saved using the SCADA Canvas Save button.
2015
+
2016
+ Recommended behaviour:
2017
+
2018
+ ```text
2019
+ Change setpoint
2020
+ Press Save
2021
+ Layout saves
2022
+ configStore updates
2023
+ Mode stays AUTO
2024
+ No need to press ON/OFF/AUTO again
2025
+ ```
2026
+
2027
+ Avoid changing setpoints by pressing OFF then AUTO on a live pump, because that can affect field equipment.
2028
+
2029
+ ---
2030
+
2031
+ # Typical Flows
2032
+
2033
+ ## Sending telemetry to 3DM.space
2034
+
2035
+ ```text
2036
+ Mako RF / PLC / Sensor Data
2037
+ ↓
2038
+ Function Node
2039
+ ↓
2040
+ 3DM Out
2041
+ ↓
2042
+ 3DM.space
2043
+ ```
2044
+
2045
+ ---
2046
+
2047
+ ## Receiving a simple command
2048
+
2049
+ ```text
2050
+ 3DM.space
2051
+ ↓
2052
+ 3DM In
2053
+ ↓
2054
+ Function Node
2055
+ ↓
2056
+ PLC / Relay / Output Logic
2057
+ ```
2058
+
2059
+ ---
2060
+
2061
+ ## Receiving saved settings
2062
+
2063
+ ```text
2064
+ 3DM.space
2065
+ ↓
2066
+ 3DM In
2067
+ ↓
2068
+ 3DM Config Store
2069
+ ↓
2070
+ Local Outputs
2071
+ ```
2072
+
2073
+ ---
2074
+
2075
+ ## Smart local pump control
2076
+
2077
+ ```text
2078
+ 3DM SCADA Canvas
2079
+ ↓
2080
+ configStore
2081
+ ↓
2082
+ 3DM In
2083
+ ↓
2084
+ 3DM Config Store
2085
+ ↓
2086
+ Output 1
2087
+ ↓
2088
+ Pump logic / PLC / Mako RF command
2089
+ ```
2090
+
2091
+ ---
2092
+
2093
+ # Example Function Node Before 3DM Out
2094
+
2095
+ Use this type of structure before 3DM Out:
2096
+
2097
+ ```js
2098
+ msg.payload = {
2099
+ "tank_level": 65.2,
2100
+ "pump_run": true,
2101
+ "dc_voltage": 24.4
2102
+ };
2103
+
2104
+ return msg;
2105
+ ```
2106
+
2107
+ Do not send a raw value directly into 3DM Out.
2108
+
2109
+ ---
2110
+
2111
+ # Example Function Node For Config Store Testing
2112
+
2113
+ Use this to test a Config Store AUTO control watching `tank`:
2114
+
2115
+ ```js
2116
+ msg.payload = {
2117
+ tank: Number(msg.payload)
2118
+ };
2119
+
2120
+ return msg;
2121
+ ```
2122
+
2123
+ Then inject:
2124
+
2125
+ ```text
2126
+ 30
2127
+ ```
2128
+
2129
+ to test low start.
2130
+
2131
+ Then inject:
2132
+
2133
+ ```text
2134
+ 110
2135
+ ```
2136
+
2137
+ to test high stop.
2138
+
2139
+ ---
2140
+
2141
+ # Troubleshooting
2142
+
2143
+ ---
2144
+
2145
+ ## 3DM Out says storing offline
2146
+
2147
+ Check:
2148
+
2149
+ - Internet connection
2150
+ - 3DM Cloud Login credentials
2151
+ - 3DM.space device credentials
2152
+ - Correct login selected in the 3DM Out node
2153
+ - Node-RED has been restarted after installing the package
2154
+
2155
+ Also check the Node-RED log.
2156
+
2157
+ ---
2158
+
2159
+ ## 3DM Out says bad payload
2160
+
2161
+ The payload is not a JSON object.
2162
+
2163
+ Correct:
2164
+
2165
+ ```json
2166
+ {
2167
+ "level": 123
2168
+ }
2169
+ ```
2170
+
2171
+ Incorrect:
2172
+
2173
+ ```json
2174
+ 123
2175
+ ```
2176
+
2177
+ ---
2178
+
2179
+ ## 3DM Out says rate limited
2180
+
2181
+ The input is sending too fast.
2182
+
2183
+ Slow the data down to one message every 60 seconds or slower.
2184
+
2185
+ ---
2186
+
2187
+ ## Password disappears after deploy
2188
+
2189
+ This can be normal.
2190
+
2191
+ Node-RED hides password fields.
2192
+
2193
+ Check whether the node still connects.
2194
+
2195
+ ---
2196
+
2197
+ ## Unknown node appears in Node-RED
2198
+
2199
+ This usually means the package did not load correctly.
2200
+
2201
+ Check:
2202
+
2203
+ - The package was installed properly
2204
+ - The `.html` and `.js` files are named correctly
2205
+ - `package.json` points to the right files
2206
+ - Node-RED was restarted after install
2207
+ - Browser was refreshed with Ctrl+F5
2208
+
2209
+ ---
2210
+
2211
+ ## Config Store says waiting for configStore
2212
+
2213
+ The node has not received config yet.
2214
+
2215
+ Check:
2216
+
2217
+ - 3DM In is connected
2218
+ - 3DM In Attribute Key is blank
2219
+ - The SCADA Canvas has sent the config
2220
+ - The correct device is selected in 3DM.space
2221
+ - The config is saved as shared attributes
2222
+
2223
+ ---
2224
+
2225
+ ## Config Store says configStore ignored
2226
+
2227
+ The Config Name does not match.
2228
+
2229
+ Example:
2230
+
2231
+ ```text
2232
+ Node-RED Config Name: b2
2233
+ Incoming config only contains: b1
2234
+ ```
2235
+
2236
+ Fix by matching the names.
2237
+
2238
+ ---
2239
+
2240
+ ## Config Store says output1 skipped
2241
+
2242
+ The config matched, but the node could not calculate the output.
2243
+
2244
+ Check:
2245
+
2246
+ - Remote Key To Watch is correct
2247
+ - The live payload is reaching the Config Store node
2248
+ - The live value is numeric
2249
+ - Low Start is set
2250
+ - High Stop is set
2251
+ - Use `.value` if the payload is wrapped
2252
+
2253
+ ---
2254
+
2255
+ ## AUTO mode does not turn on
2256
+
2257
+ For Pump In / Fill mode, the value must go below or equal to Low Start.
2258
+
2259
+ Example:
2260
+
2261
+ ```text
2262
+ Value: 30
2263
+ Low Start: 40
2264
+ Result: ON
2265
+ ```
2266
+
2267
+ ---
2268
+
2269
+ ## AUTO mode does not turn off
2270
+
2271
+ For Pump In / Fill mode, the value must go above or equal to High Stop.
2272
+
2273
+ Example:
2274
+
2275
+ ```text
2276
+ Value: 95
2277
+ High Stop: 90
2278
+ Result: OFF
2279
+ ```
2280
+
2281
+ ---
2282
+
2283
+ ## Value is between setpoints and nothing changes
2284
+
2285
+ This is normal.
2286
+
2287
+ AUTO mode holds the last state while inside the setpoint band.
2288
+
2289
+ Example:
2290
+
2291
+ ```text
2292
+ Low Start: 40
2293
+ High Stop: 90
2294
+ Current Value: 60
2295
+ Result: hold last output state
2296
+ ```
2297
+
2298
+ ---
2299
+
2300
+ ## Two Config Store nodes respond together
2301
+
2302
+ Use Config Name filtering.
2303
+
2304
+ Example:
2305
+
2306
+ ```text
2307
+ Node 1 Config Name: b1
2308
+ Node 2 Config Name: b2
2309
+ ```
2310
+
2311
+ Also use:
2312
+
2313
+ ```text
2314
+ Output Mode: Only when output changes
2315
+ ```
2316
+
2317
+ Use:
2318
+
2319
+ ```text
2320
+ Output Mode: Every check
2321
+ ```
2322
+
2323
+ only when repeated output messages are required.
2324
+
2325
+ ---
2326
+
2327
+ ## Deleted SCADA control still remains in configStore
2328
+
2329
+ Deleting a control from the SCADA Canvas layout may not automatically remove it from the saved `configStore`.
2330
+
2331
+ Current clean-up method:
2332
+
2333
+ ```text
2334
+ Device
2335
+ ↓
2336
+ Attributes
2337
+ ↓
2338
+ Shared attributes
2339
+ ↓
2340
+ Delete configStore
2341
+ ```
2342
+
2343
+ Then press Save or resend the remaining Smart Controls from the SCADA Canvas.
2344
+
2345
+ ---
2346
+
2347
+ # Notes
2348
+
2349
+ - Use **3DM Out** to send live telemetry to 3DM.space.
2350
+ - Use **3DM In** to receive commands and settings from 3DM.space.
2351
+ - Use **3DM Config Store** to save settings and run local control logic.
2352
+ - Device credentials should be copied directly from the PassPort device in 3DM.space.
2353
+ - Node Name fields are optional and are only used inside Node-RED.
2354
+ - Store and forward is handled automatically.
2355
+ - Saved settings are stored locally on the PassPort.
2356
+ - Live telemetry should be sent no faster than one message every 30 seconds.
2357
+ - The Mako RF node should send a JSON object into 3DM Out.
2358
+ - For Config Store AUTO mode, the Remote Key To Watch must match the incoming local payload key.
2359
+ - For wrapped values, use `.value` in the Remote Key To Watch field.
2360
+
2361
+ ---
2362
+
2363
+ # Author
2364
+
2365
+ Smithtek
2366
+
2367
+ ---
236
2368
 
237
- ## License
2369
+ # License
238
2370
 
239
2371
  GPL-3.0-or-later