@ncd-io/node-red-enterprise-sensors 0.1.7 → 0.1.8
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/lib/WirelessGateway.js +759 -422
- package/package.json +1 -1
- package/wireless.html +100 -34
- package/wireless.js +41 -5
package/package.json
CHANGED
package/wireless.html
CHANGED
|
@@ -209,9 +209,13 @@
|
|
|
209
209
|
amgt_mag: {value: "0"},
|
|
210
210
|
amgt_gyro: {value: "0"},
|
|
211
211
|
|
|
212
|
+
impact_accel_active: {value: ""},
|
|
212
213
|
impact_accel: {value: "0"},
|
|
214
|
+
impact_data_rate_active: {value: ""},
|
|
213
215
|
impact_data_rate: {value: "4"},
|
|
216
|
+
impact_threshold_active: {value: ""},
|
|
214
217
|
impact_threshold: {value: 25, validate: NCD_validators.number_range(1, 127)},
|
|
218
|
+
impact_duration_active: {value: ""},
|
|
215
219
|
impact_duration: {value: 1, validate: NCD_validators.number_range(1, 127)},
|
|
216
220
|
|
|
217
221
|
activ_interr_x: {value: 1, validate: RED.validators.number()},
|
|
@@ -239,6 +243,9 @@
|
|
|
239
243
|
sensor_boot_time_420ma_active: {value: ""},
|
|
240
244
|
sensor_boot_time_420ma: {value: 0, validate: NCD_validators.number_range(0, 255)},
|
|
241
245
|
|
|
246
|
+
sensor_boot_time_78_active: {value: ""},
|
|
247
|
+
sensor_boot_time_78: {value: 0, validate: NCD_validators.number_range(0, 255)},
|
|
248
|
+
|
|
242
249
|
deadband_80_active: {value: ""},
|
|
243
250
|
deadband_80: {value: 0, validate: NCD_validators.number_range(0, 255)},
|
|
244
251
|
|
|
@@ -414,6 +421,7 @@
|
|
|
414
421
|
"84": "84 - Standalone Smart Vibration Sensor",
|
|
415
422
|
"88": "88 - 1 Channel Ultrasound Vibration Sensor",
|
|
416
423
|
"89": "89 - 2 Channel Ultrasound Vibration Sensor",
|
|
424
|
+
"91": "91 - Wireless Air Velocity Sensor HVAC",
|
|
417
425
|
"92": "92 - Sound Sensor",
|
|
418
426
|
"101": "101 - Pro Vibration",
|
|
419
427
|
"102": "102 - Strain Gauge",
|
|
@@ -427,6 +435,7 @@
|
|
|
427
435
|
"515": "515 - Custom_SAP_Current_48C",
|
|
428
436
|
"519": "519: Custom Vibration 1",
|
|
429
437
|
"520": "520: Custom 6 Channel Current Temperature & Humidity",
|
|
438
|
+
"521": "521 - Custom 3 Channel Light Sensor",
|
|
430
439
|
"10000": "10000 - 4-Channel Relay",
|
|
431
440
|
"10006": "10006 - 4-Channel 4-20 mA Input",
|
|
432
441
|
"10007": "10007 - 4-Channel Current Monitor",
|
|
@@ -657,6 +666,7 @@
|
|
|
657
666
|
<option value="84">84 - Standalone Smart Vibration Sensor</option>
|
|
658
667
|
<option value="88">88 - 1 Channel Ultrasound Vibration Sensor</option>
|
|
659
668
|
<option value="89">89 - 2 Channel Ultrasound Vibration Sensor</option>
|
|
669
|
+
<option value="91">91 - Wireless Air Velocity Sensor HVAC</option>
|
|
660
670
|
<option value="92">92 - Sound Sensor</option>
|
|
661
671
|
<option value="101">101 - Pro Vibration</option>
|
|
662
672
|
<option value="102">102 - Strain Gauge</option>
|
|
@@ -670,6 +680,7 @@
|
|
|
670
680
|
<option value="515">515 - Custom_SAP_Current_48C</option>
|
|
671
681
|
<option value="519">519 - Type 519: Custom Vibration 1</option>
|
|
672
682
|
<option value="520">520 - Type 520: Custom 6 Channel Current Temperature & Humidity</option>
|
|
683
|
+
<option value="521">521 - Custom 3 Channel Light Sensor</option>
|
|
673
684
|
<option value="10000">10000 - 4-Channel Relay</option>
|
|
674
685
|
<option value="10006">10006 - 4-Channel 4-20 mA Input</option>
|
|
675
686
|
<option value="10007">10007 - 4-Channel Current Monitor</option>
|
|
@@ -683,7 +694,7 @@
|
|
|
683
694
|
<label for="node-input-auto_config"><i class="icon-tag"></i> Auto Config</label>
|
|
684
695
|
<input class="section-control" type="checkbox" id="node-input-auto_config" value="1">
|
|
685
696
|
</div>
|
|
686
|
-
<div class="form-row ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-88 data-sensor-89 data-sensor-101 data-sensor-102 data-sensor-519 data-sensor-520>
|
|
697
|
+
<div class="form-row ncd-dependent" data-sensor-78 data-sensor-79 data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-88 data-sensor-89 data-sensor-91 data-sensor-101 data-sensor-102 data-sensor-519 data-sensor-520 data-sensor-521>
|
|
687
698
|
<hr>
|
|
688
699
|
<label for="node-input-on_the_fly_enable"><i class="icon-tag"></i> OTF Config*</label>
|
|
689
700
|
<input type="checkbox" id="node-input-on_the_fly_enable" value="1">
|
|
@@ -860,41 +871,79 @@
|
|
|
860
871
|
</div>
|
|
861
872
|
</div>
|
|
862
873
|
<div class="ncd-dependent" data-sensor-7 data-sensor-24>
|
|
863
|
-
<
|
|
864
|
-
|
|
865
|
-
<
|
|
866
|
-
<
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
<
|
|
870
|
-
|
|
874
|
+
<hr>
|
|
875
|
+
<div class="form-row ncd-active-check">
|
|
876
|
+
<div>
|
|
877
|
+
<strong>Acceleration Range</strong>
|
|
878
|
+
</div>
|
|
879
|
+
<div>
|
|
880
|
+
<label for="node-input-impact_accel_active">Active:</label>
|
|
881
|
+
<input type="checkbox" id="node-input-impact_accel_active" class="ncd-config-toggle" data-target-id="node-input-impact_accel" value="1">
|
|
882
|
+
</div>
|
|
883
|
+
<div>
|
|
884
|
+
<label for="node-input-impact_accel"><i class="icon-tag"></i>Value:</label>
|
|
885
|
+
<select id="node-input-impact_accel">
|
|
886
|
+
<option selected="selected" value="0">±2g</option>
|
|
887
|
+
<option value="1">±4g</option>
|
|
888
|
+
<option value="3">±8g</option>
|
|
889
|
+
<option value="4">±16g</option>
|
|
890
|
+
</select>
|
|
891
|
+
</div>
|
|
871
892
|
</div>
|
|
872
|
-
<div class="form-row">
|
|
873
|
-
<
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
<
|
|
878
|
-
<
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
<
|
|
882
|
-
<
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
893
|
+
<div class="form-row ncd-active-check">
|
|
894
|
+
<div>
|
|
895
|
+
<strong>Data Rate</strong>
|
|
896
|
+
</div>
|
|
897
|
+
<div>
|
|
898
|
+
<label for="node-input-impact_data_rate_active">Active:</label>
|
|
899
|
+
<input type="checkbox" id="node-input-impact_data_rate_active" class="ncd-config-toggle" data-target-id="node-input-impact_data_rate" value="1">
|
|
900
|
+
</div>
|
|
901
|
+
<div>
|
|
902
|
+
<label for="node-input-impact_data_rate"><i class="icon-tag"></i> Data Rate</label>
|
|
903
|
+
<select id="node-input-impact_data_rate">
|
|
904
|
+
<option selected="selected" value="0">Value:</option>
|
|
905
|
+
<option value="1">1</option>
|
|
906
|
+
<option value="2">10</option>
|
|
907
|
+
<option value="3">25</option>
|
|
908
|
+
<option value="4">50</option>
|
|
909
|
+
<option value="5">100</option>
|
|
910
|
+
<option value="6">200</option>
|
|
911
|
+
<option value="7">400</option>
|
|
912
|
+
<option value="8">1600</option>
|
|
913
|
+
<option value="9">5376</option>
|
|
914
|
+
</select>
|
|
915
|
+
</div>
|
|
886
916
|
</div>
|
|
887
|
-
<div class="form-row">
|
|
888
|
-
<
|
|
889
|
-
|
|
917
|
+
<div class="form-row ncd-active-check">
|
|
918
|
+
<div>
|
|
919
|
+
<strong>Threshold</strong>
|
|
920
|
+
<p>Accepted values from 1-127.</p>
|
|
921
|
+
</div>
|
|
922
|
+
<div>
|
|
923
|
+
<label for="node-input-impact_threshold_active">Active:</label>
|
|
924
|
+
<input type="checkbox" id="node-input-impact_threshold_active" class="ncd-config-toggle" data-target-id="node-input-impact_threshold" value="1">
|
|
925
|
+
</div>
|
|
926
|
+
<div>
|
|
927
|
+
<label for="node-input-impact_threshold"><i class="icon-tag"></i>Value:</label>
|
|
928
|
+
<input id="node-input-impact_threshold">
|
|
929
|
+
</div>
|
|
890
930
|
</div>
|
|
891
|
-
<div class="form-row">
|
|
892
|
-
<
|
|
893
|
-
|
|
931
|
+
<div class="form-row ncd-active-check">
|
|
932
|
+
<div>
|
|
933
|
+
<strong>Duration</strong>
|
|
934
|
+
<p>Accepted values from 1-127.</p>
|
|
935
|
+
</div>
|
|
936
|
+
<div>
|
|
937
|
+
<label for="node-input-impact_duration_active">Active:</label>
|
|
938
|
+
<input type="checkbox" id="node-input-impact_duration_active" class="ncd-config-toggle" data-target-id="node-input-impact_duration" value="1">
|
|
939
|
+
</div>
|
|
940
|
+
<div>
|
|
941
|
+
<label for="node-input-impact_duration"><i class="icon-tag"></i>Value:</label>
|
|
942
|
+
<input id="node-input-impact_duration">
|
|
943
|
+
</div>
|
|
894
944
|
</div>
|
|
895
945
|
</div>
|
|
896
946
|
<div class="ncd-dependent" data-sensor-24>
|
|
897
|
-
//activ_interr_x
|
|
898
947
|
<div class="form-row">
|
|
899
948
|
<label for="node-input-activ_interr_x"><i class="icon-tag"></i> Interrupt X-Axis</label>
|
|
900
949
|
<select id="node-input-activ_interr_x">
|
|
@@ -1115,7 +1164,7 @@
|
|
|
1115
1164
|
<option value="5">60 Minutes</option>
|
|
1116
1165
|
<option value="6">120 Minutes</option>
|
|
1117
1166
|
<option value="7">180 Minutes</option>
|
|
1118
|
-
<option value="8">1
|
|
1167
|
+
<!-- <option value="8">1 Minute</option> -->
|
|
1119
1168
|
</select>
|
|
1120
1169
|
</div>
|
|
1121
1170
|
</div>
|
|
@@ -1139,7 +1188,7 @@
|
|
|
1139
1188
|
<div>
|
|
1140
1189
|
<label for="node-input-output_data_rate_p1_81"><i class="icon-tag"></i>Value:</label>
|
|
1141
1190
|
<select id="node-input-output_data_rate_p1_81">
|
|
1142
|
-
<option value="6">50Hz</option>
|
|
1191
|
+
<!-- <option value="6">50Hz</option> -->
|
|
1143
1192
|
<option value="7">100Hz</option>
|
|
1144
1193
|
<option value="8">200Hz</option>
|
|
1145
1194
|
<option value="9">400Hz</option>
|
|
@@ -1172,7 +1221,7 @@
|
|
|
1172
1221
|
<div>
|
|
1173
1222
|
<label for="node-input-output_data_rate_p2_81"><i class="icon-tag"></i>Value:</label>
|
|
1174
1223
|
<select id="node-input-output_data_rate_p2_81">
|
|
1175
|
-
<option value="6">50Hz</option>
|
|
1224
|
+
<!-- <option value="6">50Hz</option> -->
|
|
1176
1225
|
<option value="7">100Hz</option>
|
|
1177
1226
|
<option value="8">200Hz</option>
|
|
1178
1227
|
<option value="9">400Hz</option>
|
|
@@ -1208,7 +1257,7 @@
|
|
|
1208
1257
|
<div>
|
|
1209
1258
|
<label for="node-input-output_data_rate_101"><i class="icon-tag"></i>Value:</label>
|
|
1210
1259
|
<select id="node-input-output_data_rate_101">
|
|
1211
|
-
|
|
1260
|
+
<!--<option value="6">50Hz</option>-->
|
|
1212
1261
|
<option value="7">100Hz</option>
|
|
1213
1262
|
<option value="8">200Hz</option>
|
|
1214
1263
|
<option value="9">400Hz</option>
|
|
@@ -1473,6 +1522,23 @@
|
|
|
1473
1522
|
</div>
|
|
1474
1523
|
</div>
|
|
1475
1524
|
|
|
1525
|
+
<div class="ncd-dependent" data-sensor-78 data-sensor-79 data-sensor-91>
|
|
1526
|
+
<div class="form-row ncd-active-check">
|
|
1527
|
+
<strong>Sensor Boot Time</strong>
|
|
1528
|
+
<p class="caption">
|
|
1529
|
+
This value represents the number of milliseconds to wait after applying power to the sensor before taking a reading.
|
|
1530
|
+
</p>
|
|
1531
|
+
<div>
|
|
1532
|
+
<label for="node-input-sensor_boot_time_78_active">Active:</label>
|
|
1533
|
+
<input type="checkbox" id="node-input-sensor_boot_time_78_active" class="ncd-config-toggle" data-target-id="node-input-sensor_boot_time_78" value="1">
|
|
1534
|
+
</div>
|
|
1535
|
+
<div>
|
|
1536
|
+
<label for="node-input-sensor_boot_time_78"><i class="icon-tag"></i>Value:</label>
|
|
1537
|
+
<input type="text" id="node-input-sensor_boot_time_78" placeholder="0" value="0">
|
|
1538
|
+
</div>
|
|
1539
|
+
</div>
|
|
1540
|
+
</div>
|
|
1541
|
+
|
|
1476
1542
|
<div class="ncd-dependent" data-sensor-3 data-sensor-14 data-sensor-45 data-sensor-48 data-sensor-52 data-sensor-88 data-sensor-89 data-sensor-200>
|
|
1477
1543
|
<div class="form-row ncd-active-check">
|
|
1478
1544
|
<strong>Low Calibration Point</strong>
|
package/wireless.js
CHANGED
|
@@ -396,10 +396,22 @@ module.exports = function(RED) {
|
|
|
396
396
|
promises.pressure_precision = node.config_gateway.config_set_bp_press_precision(mac, parseInt(config.bp_press_prec));
|
|
397
397
|
break;
|
|
398
398
|
case 7:
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
if(config.impact_accel_active){
|
|
400
|
+
promises.impact_accel = node.config_gateway.config_set_acceleration_range_24(mac, parseInt(config.impact_accel));
|
|
401
|
+
}
|
|
402
|
+
if(config.impact_data_rate_active){
|
|
403
|
+
promises.impact_data_rate = node.config_gateway.config_set_data_rate_24(mac, parseInt(config.impact_data_rate));
|
|
404
|
+
}
|
|
405
|
+
if(config.impact_threshold_active){
|
|
406
|
+
promises.impact_threshold = node.config_gateway.config_set_threshold_24(mac, parseInt(config.impact_threshold));
|
|
407
|
+
}
|
|
408
|
+
if(config.impact_duration_active){
|
|
409
|
+
promises.impact_duration = node.config_gateway.config_set_duration_24(mac, parseInt(config.impact_duration));
|
|
410
|
+
}
|
|
411
|
+
// promises.acceleration_range = node.config_gateway.config_set_impact_accel(mac, parseInt(config.impact_accel));
|
|
412
|
+
// promises.data_rate = node.config_gateway.config_set_impact_data_rate(mac, parseInt(config.impact_data_rate));
|
|
413
|
+
// promises.impact_threshold = node.config_gateway.config_set_impact_threshold(mac, parseInt(config.impact_threshold));
|
|
414
|
+
// promises.impact_duration = node.config_gateway.config_set_impact_duration(mac, parseInt(config.impact_duration));
|
|
403
415
|
break;
|
|
404
416
|
case 13:
|
|
405
417
|
var cali = parseFloat(config.cm_calibration);
|
|
@@ -421,8 +433,20 @@ module.exports = function(RED) {
|
|
|
421
433
|
}
|
|
422
434
|
break;
|
|
423
435
|
case 24:
|
|
436
|
+
if(config.impact_accel_active){
|
|
437
|
+
promises.impact_accel = node.config_gateway.config_set_acceleration_range_24(mac, parseInt(config.impact_accel));
|
|
438
|
+
}
|
|
439
|
+
if(config.impact_data_rate_active){
|
|
440
|
+
promises.impact_data_rate = node.config_gateway.config_set_data_rate_24(mac, parseInt(config.impact_data_rate));
|
|
441
|
+
}
|
|
442
|
+
if(config.impact_threshold_active){
|
|
443
|
+
promises.impact_threshold = node.config_gateway.config_set_threshold_24(mac, parseInt(config.impact_threshold));
|
|
444
|
+
}
|
|
445
|
+
if(config.impact_duration_active){
|
|
446
|
+
promises.impact_duration = node.config_gateway.config_set_duration_24(mac, parseInt(config.impact_duration));
|
|
447
|
+
}
|
|
424
448
|
var interr = parseInt(config.activ_interr_x) | parseInt(config.activ_interr_y) | parseInt(config.activ_interr_z) | parseInt(config.activ_interr_op);
|
|
425
|
-
promises.activity_interrupt = node.config_gateway.
|
|
449
|
+
promises.activity_interrupt = node.config_gateway.config_set_interrupt_24(mac, interr);
|
|
426
450
|
case 35:
|
|
427
451
|
if(config.counter_threshold_35_active){
|
|
428
452
|
promises.config_set_counter_threshold_35 = node.config_gateway.config_set_counter_threshold_35(mac, parseInt(config.counter_threshold_35));
|
|
@@ -499,6 +523,14 @@ module.exports = function(RED) {
|
|
|
499
523
|
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
500
524
|
}
|
|
501
525
|
break;
|
|
526
|
+
case 78:
|
|
527
|
+
if(config.sensor_boot_time_78_active){
|
|
528
|
+
promises.sensor_boot_time_78 = node.config_gateway.config_set_sensor_boot_time_78(mac, parseInt(config.sensor_boot_time_78));
|
|
529
|
+
}
|
|
530
|
+
case 79:
|
|
531
|
+
if(config.sensor_boot_time_78_active){
|
|
532
|
+
promises.sensor_boot_time_78 = node.config_gateway.config_set_sensor_boot_time_78(mac, parseInt(config.sensor_boot_time_78));
|
|
533
|
+
}
|
|
502
534
|
case 80:
|
|
503
535
|
if(config.current_calibration_c1_80_active){
|
|
504
536
|
promises.current_calibration_c1_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
@@ -739,6 +771,10 @@ module.exports = function(RED) {
|
|
|
739
771
|
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
740
772
|
}
|
|
741
773
|
break;
|
|
774
|
+
case 91:
|
|
775
|
+
if(config.sensor_boot_time_78_active){
|
|
776
|
+
promises.sensor_boot_time_78 = node.config_gateway.config_set_sensor_boot_time_78(mac, parseInt(config.sensor_boot_time_78));
|
|
777
|
+
}
|
|
742
778
|
case 101:
|
|
743
779
|
if(config.output_data_rate_101_m2_active){
|
|
744
780
|
promises.output_data_rate_101_m2 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101_m2));
|