@ncd-io/node-red-enterprise-sensors 1.0.7 → 1.0.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 +45 -24
- package/package.json +1 -1
- package/wireless.html +146 -17
- package/wireless.js +48 -44
package/lib/WirelessGateway.js
CHANGED
|
@@ -142,13 +142,13 @@ module.exports = class WirelessSensor{
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
// #OTF
|
|
145
|
-
var otf_devices = [23,26,33,39,45,48,52,58,74,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
145
|
+
var otf_devices = [23,26,32,33,39,44,45,48,52,53,58,74,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,202,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
146
146
|
var device_type = msbLsb(frame.data[6], frame.data[7]);
|
|
147
147
|
// var device_type = frame.data[7];
|
|
148
148
|
|
|
149
149
|
if(mode == "RUN"){
|
|
150
150
|
if(frame.data[9] == 70 && frame.data[10] == 76 && frame.data[11] == 89) {
|
|
151
|
-
var broadcast_otf_devices = [101,102];
|
|
151
|
+
var broadcast_otf_devices = [101,102,202];
|
|
152
152
|
mode = "FLY";
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -294,7 +294,7 @@ module.exports = class WirelessSensor{
|
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// #OTF
|
|
297
|
-
var otf_devices = [23,26,33,39,45,48,52,58,74,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
297
|
+
var otf_devices = [23,26,32,33,39,44,45,48,52,53,58,74,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,202,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
298
298
|
if(otf_devices.includes(parsed.sensor_type)){
|
|
299
299
|
// If the message says FLY and there is not FLY timer in progress.
|
|
300
300
|
if(payload[8] == 70 && payload[9] == 76 && payload[10] == 89) {
|
|
@@ -712,7 +712,7 @@ module.exports = class WirelessSensor{
|
|
|
712
712
|
data: payload.slice(8)
|
|
713
713
|
};
|
|
714
714
|
// #OTF
|
|
715
|
-
}else if(parsed.sensor_type == 33 || parsed.sensor_type == 80 || parsed.sensor_type == 81 || parsed.sensor_type == 82 || parsed.sensor_type == 84 || parsed.sensor_type == 180 || parsed.sensor_type == 181 || parsed.sensor_type == 515 || parsed.sensor_type == 519 || parsed.sensor_type == 531 || parsed.sensor_type == 537 || parsed.sensor_type == 538){
|
|
715
|
+
}else if(parsed.sensor_type == 33 || parsed.sensor_type == 80 || parsed.sensor_type == 81 || parsed.sensor_type == 82 || parsed.sensor_type == 84 || parsed.sensor_type == 110 || parsed.sensor_type == 111 || parsed.sensor_type == 112 || parsed.sensor_type == 114 || parsed.sensor_type == 180 || parsed.sensor_type == 181 || parsed.sensor_type == 515 || parsed.sensor_type == 519 || parsed.sensor_type == 531 || parsed.sensor_type == 537 || parsed.sensor_type == 538){
|
|
716
716
|
parsed.sensor_data = this.sensor_types[parsed.sensor_type].parse(payload, parsed, frame.mac);
|
|
717
717
|
if(!parsed.sensor_data){
|
|
718
718
|
return;
|
|
@@ -1031,6 +1031,12 @@ module.exports = class WirelessSensor{
|
|
|
1031
1031
|
console.log(packet);
|
|
1032
1032
|
return this.config_send(sensor_mac, packet);
|
|
1033
1033
|
}
|
|
1034
|
+
config_set_sampling_interval_202(sensor_mac, sampling_interval){
|
|
1035
|
+
console.log('config_set_sampling_interval_202');
|
|
1036
|
+
var packet = [244, 0, 0, 0, 0, sampling_interval];
|
|
1037
|
+
console.log(packet);
|
|
1038
|
+
return this.config_send(sensor_mac, packet);
|
|
1039
|
+
}
|
|
1034
1040
|
config_get_sampling_interval_101(sensor_mac, sampling_interval){
|
|
1035
1041
|
console.log('config_get_sampling_interval_101');
|
|
1036
1042
|
var packet = [244, 79, 0, 0, 101, 7];
|
|
@@ -1172,6 +1178,15 @@ module.exports = class WirelessSensor{
|
|
|
1172
1178
|
delete this.fly_101_in_progress;
|
|
1173
1179
|
return this.config_send(sensor_mac, packet);
|
|
1174
1180
|
}
|
|
1181
|
+
config_set_rtc_202(sensor_mac){
|
|
1182
|
+
console.log('config_set_rtc_202');
|
|
1183
|
+
console.log(sensor_mac);
|
|
1184
|
+
var date = new Date();
|
|
1185
|
+
var packet = [244, 8, 0, 0, 0, date.getHours(), date.getMinutes(), date.getSeconds()];
|
|
1186
|
+
console.log(packet);
|
|
1187
|
+
delete this.fly_101_in_progress;
|
|
1188
|
+
return this.config_send(sensor_mac, packet);
|
|
1189
|
+
}
|
|
1175
1190
|
config_set_roll_threshold_47(sensor_mac, threshold){
|
|
1176
1191
|
console.log('config_set_roll_threshold_47');
|
|
1177
1192
|
var packet = [244, 1, 0, 0, 47, 0, threshold];
|
|
@@ -1563,6 +1578,26 @@ module.exports = class WirelessSensor{
|
|
|
1563
1578
|
console.log(packet);
|
|
1564
1579
|
return this.config_send(sensor_mac, packet);
|
|
1565
1580
|
}
|
|
1581
|
+
config_set_fly_interval_110(sensor_mac, value){
|
|
1582
|
+
console.log('config_set_fly_interval');
|
|
1583
|
+
var packet = [244, 79, 0, 0, 101, 81];
|
|
1584
|
+
let value_ = int2Bytes((value), 2);
|
|
1585
|
+
packet.push(...value_);
|
|
1586
|
+
console.log(packet);
|
|
1587
|
+
return this.config_send(sensor_mac, packet);
|
|
1588
|
+
}
|
|
1589
|
+
config_set_scd_skip_samples_44(sensor_mac, value){
|
|
1590
|
+
console.log('config_set_scd_skip_samples');
|
|
1591
|
+
var packet = [244, 34, 0, 0, 53, value];
|
|
1592
|
+
console.log(packet);
|
|
1593
|
+
return this.config_send(sensor_mac, packet);
|
|
1594
|
+
}
|
|
1595
|
+
config_set_sps_skip_samples_32(sensor_mac, value){
|
|
1596
|
+
console.log('config_set_scd_skip_samples');
|
|
1597
|
+
var packet = [244, 32, 0, 0, 53, value];
|
|
1598
|
+
console.log(packet);
|
|
1599
|
+
return this.config_send(sensor_mac, packet);
|
|
1600
|
+
}
|
|
1566
1601
|
config_get_delay(sensor_mac){
|
|
1567
1602
|
return new Promise((fulfill, reject) => {
|
|
1568
1603
|
this.config_send(sensor_mac, [247, 21, 0, 0, 0]).then((res) => {
|
|
@@ -2672,12 +2707,8 @@ function sensor_types(parent){
|
|
|
2672
2707
|
return {
|
|
2673
2708
|
adc1: adc1,
|
|
2674
2709
|
adc2: adc2,
|
|
2675
|
-
mA1: adc1 * 0.0006863,
|
|
2676
|
-
mA2: adc2 * 0.0006863
|
|
2677
|
-
byteOne: d[0],
|
|
2678
|
-
byteTwo: d[1],
|
|
2679
|
-
byteThree: d[2],
|
|
2680
|
-
byteFour: d[3]
|
|
2710
|
+
mA1: parseFloat((adc1 * 0.0006863).toFixed(2)),
|
|
2711
|
+
mA2: parseFloat((adc2 * 0.0006863).toFixed(2))
|
|
2681
2712
|
};
|
|
2682
2713
|
},
|
|
2683
2714
|
'parse_fly': (frame) => {
|
|
@@ -2758,12 +2789,8 @@ function sensor_types(parent){
|
|
|
2758
2789
|
return {
|
|
2759
2790
|
adc1: adc1,
|
|
2760
2791
|
adc2: adc2,
|
|
2761
|
-
VDC1: adc1 * 0.00034122,
|
|
2762
|
-
VDC2: adc2 * 0.00034122
|
|
2763
|
-
byteOne: d[0],
|
|
2764
|
-
byteTwo: d[1],
|
|
2765
|
-
byteThree: d[2],
|
|
2766
|
-
byteFour: d[3]
|
|
2792
|
+
VDC1: parseFloat((adc1 * 0.00034122).toFixed(2)),
|
|
2793
|
+
VDC2: parseFloat((adc2 * 0.00034122).toFixed(2))
|
|
2767
2794
|
};
|
|
2768
2795
|
}
|
|
2769
2796
|
},
|
|
@@ -8503,15 +8530,9 @@ function sensor_types(parent){
|
|
|
8503
8530
|
adc1: adc1,
|
|
8504
8531
|
adc2: adc2,
|
|
8505
8532
|
dac1: dac1,
|
|
8506
|
-
mA1: adc1/100.00,
|
|
8533
|
+
mA1: parseFloat((adc1/100.00).toFixed(2)),
|
|
8507
8534
|
raw_adc: adc2,
|
|
8508
|
-
raw_dac: dac1
|
|
8509
|
-
byteOne: d[0],
|
|
8510
|
-
byteTwo: d[1],
|
|
8511
|
-
byteThree: d[2],
|
|
8512
|
-
byteFour: d[3],
|
|
8513
|
-
byteFive: d[4],
|
|
8514
|
-
byteSix: d[5]
|
|
8535
|
+
raw_dac: dac1
|
|
8515
8536
|
};
|
|
8516
8537
|
}
|
|
8517
8538
|
},
|
package/package.json
CHANGED
package/wireless.html
CHANGED
|
@@ -323,6 +323,7 @@
|
|
|
323
323
|
acceleration_interrupt_threshold_84: {},
|
|
324
324
|
|
|
325
325
|
set_rtc_101:{value:0},
|
|
326
|
+
set_rtc_202:{value:0},
|
|
326
327
|
|
|
327
328
|
current_calibration_82:{Value:0},
|
|
328
329
|
current_calibration_82_active:{Value:""},
|
|
@@ -347,6 +348,8 @@
|
|
|
347
348
|
sampling_duration_101: {value: 1, validate: NCD_validators.number_range(1, 255)},
|
|
348
349
|
sampling_interval_101_active: {value: ""},
|
|
349
350
|
sampling_interval_101: {value: 1},
|
|
351
|
+
sampling_interval_202_active: {value: ""},
|
|
352
|
+
sampling_interval_202: {value: 1},
|
|
350
353
|
full_scale_range_101_active: {value: ""},
|
|
351
354
|
full_scale_range_101: {value: 1},
|
|
352
355
|
full_scale_range_101_m2_active: {value: ""},
|
|
@@ -489,7 +492,7 @@
|
|
|
489
492
|
smart_interval_110: {value: 0, validate: NCD_validators.number_range(0, 255)},
|
|
490
493
|
|
|
491
494
|
smart_threshold_110_active:{value:""},
|
|
492
|
-
smart_threshold_110: {value:
|
|
495
|
+
smart_threshold_110: {value: 1, validate: NCD_validators.number_range(1, 65534)},
|
|
493
496
|
|
|
494
497
|
rx485_timeout_1011_active:{value:""},
|
|
495
498
|
rx485_timeout_1011:{value: 0, validate: NCD_validators.number_range(0, 255)},
|
|
@@ -520,7 +523,19 @@
|
|
|
520
523
|
set_parity_1011_active:{value: ""},
|
|
521
524
|
set_parity_1011:{value:0},
|
|
522
525
|
|
|
523
|
-
reboot_1011:{value:0}
|
|
526
|
+
reboot_1011:{value:0},
|
|
527
|
+
|
|
528
|
+
fly_interval_110_active:{value: ""},
|
|
529
|
+
fly_interval_110:{value: 60},
|
|
530
|
+
|
|
531
|
+
scd_skip_samples_44_active:{value: ""},
|
|
532
|
+
scd_skip_samples_44:{value: 1, validate: NCD_validators.number_range(1, 10)},
|
|
533
|
+
|
|
534
|
+
sps_skip_samples_32_active:{value: ""},
|
|
535
|
+
sps_skip_samples_32:{value: 1, validate: NCD_validators.number_range(1, 10)},
|
|
536
|
+
|
|
537
|
+
sampling_interval_110_active:{value: ""},
|
|
538
|
+
sampling_interval_110: {value: 1, validate: NCD_validators.number_range(0, 8)}
|
|
524
539
|
},
|
|
525
540
|
inputs: 0,
|
|
526
541
|
outputs: 1,
|
|
@@ -949,7 +964,7 @@
|
|
|
949
964
|
<label for="node-input-auto_config"><i class="icon-tag"></i> Auto Config</label>
|
|
950
965
|
<input class="section-control" type="checkbox" id="node-input-auto_config" value="1">
|
|
951
966
|
</div>
|
|
952
|
-
<div class="form-row ncd-dependent" data-sensor-23 data-sensor-26 data-sensor-33 data-sensor-39 data-sensor-45 data-sensor-48 data-sensor-52 data-sensor-58 data-sensor-74 data-sensor-76 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-90 data-sensor-91 data-sensor-101 data-sensor-102 data-sensor-105 data-sensor-106 data-sensor-107 data-sensor-108 data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-520 data-sensor-521 data-sensor-531 data-sensor-535 data-sensor-537 data-sensor-538 data-sensor-539 data-sensor-540 data-sensor-1010 data-sensor-1011>
|
|
967
|
+
<div class="form-row ncd-dependent" data-sensor-23 data-sensor-26 data-sensor-32 data-sensor-33 data-sensor-39 data-sensor-44 data-sensor-45 data-sensor-48 data-sensor-52 data-sensor-53 data-sensor-58 data-sensor-74 data-sensor-76 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-90 data-sensor-91 data-sensor-101 data-sensor-102 data-sensor-105 data-sensor-106 data-sensor-107 data-sensor-108 data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114 data-sensor-180 data-sensor-181 data-sensor-202 data-sensor-519 data-sensor-520 data-sensor-521 data-sensor-531 data-sensor-535 data-sensor-537 data-sensor-538 data-sensor-539 data-sensor-540 data-sensor-1010 data-sensor-1011>
|
|
953
968
|
<hr>
|
|
954
969
|
<label for="node-input-on_the_fly_enable"><i class="icon-tag"></i> OTF Config*</label>
|
|
955
970
|
<input type="checkbox" id="node-input-on_the_fly_enable" value="1">
|
|
@@ -1510,7 +1525,7 @@
|
|
|
1510
1525
|
</div>
|
|
1511
1526
|
</div>
|
|
1512
1527
|
|
|
1513
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-
|
|
1528
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537 data-sensor-538>
|
|
1514
1529
|
<hr>
|
|
1515
1530
|
<div class="form-row ncd-active-check">
|
|
1516
1531
|
<strong>Mode</strong>
|
|
@@ -1590,8 +1605,7 @@
|
|
|
1590
1605
|
</div>
|
|
1591
1606
|
</div>
|
|
1592
1607
|
</div>
|
|
1593
|
-
|
|
1594
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-102 data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537 data-sensor-538>
|
|
1608
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-102 ata-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537 data-sensor-538>
|
|
1595
1609
|
<hr>
|
|
1596
1610
|
<div class="form-row ncd-active-check">
|
|
1597
1611
|
<strong>Sampling Interval</strong>
|
|
@@ -1614,6 +1628,32 @@
|
|
|
1614
1628
|
</select>
|
|
1615
1629
|
</div>
|
|
1616
1630
|
</div>
|
|
1631
|
+
</div>
|
|
1632
|
+
<div class="ncd-dependent" data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114>
|
|
1633
|
+
<hr>
|
|
1634
|
+
<div class="form-row ncd-active-check">
|
|
1635
|
+
<strong>Sampling Interval</strong>
|
|
1636
|
+
<div>
|
|
1637
|
+
<label for="node-input-sampling_interval_110_active">Active: </label>
|
|
1638
|
+
<input type="checkbox" id="node-input-sampling_interval_110_active" class="ncd-config-toggle" data-target-id="node-input-sampling_interval_110" value="1">
|
|
1639
|
+
</div>
|
|
1640
|
+
<div>
|
|
1641
|
+
<label for="node-input-sampling_interval_110"><i class="icon-tag"></i>Value:</label>
|
|
1642
|
+
<select id="node-input-sampling_interval_110">
|
|
1643
|
+
<option value="8">1 Minute</option>
|
|
1644
|
+
<option value="0">5 Minutes</option>
|
|
1645
|
+
<option value="1">10 Minutes</option>
|
|
1646
|
+
<option value="2">15 Minutes</option>
|
|
1647
|
+
<option value="3">20 Minutes</option>
|
|
1648
|
+
<option value="4">30 Minutes</option>
|
|
1649
|
+
<option value="5">60 Minutes</option>
|
|
1650
|
+
<option value="6">120 Minutes</option>
|
|
1651
|
+
<option value="7">180 Minutes</option>
|
|
1652
|
+
</select>
|
|
1653
|
+
</div>
|
|
1654
|
+
</div>
|
|
1655
|
+
</div>
|
|
1656
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-102 data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537 data-sensor-538>
|
|
1617
1657
|
<div class="form-row ncd-active-check">
|
|
1618
1658
|
<strong>Set RTC</strong>
|
|
1619
1659
|
<div>
|
|
@@ -1623,6 +1663,38 @@
|
|
|
1623
1663
|
</div>
|
|
1624
1664
|
</div>
|
|
1625
1665
|
|
|
1666
|
+
<div class="ncd-dependent" data-sensor-202>
|
|
1667
|
+
<hr>
|
|
1668
|
+
<div class="form-row ncd-active-check">
|
|
1669
|
+
<strong>Sampling Interval</strong>
|
|
1670
|
+
<div>
|
|
1671
|
+
<label for="node-input-sampling_interval_202_active">Active: </label>
|
|
1672
|
+
<input type="checkbox" id="node-input-sampling_interval_202_active" class="ncd-config-toggle" data-target-id="node-input-sampling_interval_202" value="1">
|
|
1673
|
+
</div>
|
|
1674
|
+
<div>
|
|
1675
|
+
<label for="node-input-sampling_interval_202"><i class="icon-tag"></i>Value:</label>
|
|
1676
|
+
<select id="node-input-sampling_interval_202">
|
|
1677
|
+
<option value="1">5 Minutes</option>
|
|
1678
|
+
<option value="2">10 Minutes</option>
|
|
1679
|
+
<option value="3">15 Minutes</option>
|
|
1680
|
+
<option value="4">20 Minutes</option>
|
|
1681
|
+
<option value="5">30 Minutes</option>
|
|
1682
|
+
<option value="6">60 Minutes</option>
|
|
1683
|
+
<option value="7">120 Minutes</option>
|
|
1684
|
+
<option value="8">180 Minutes</option>
|
|
1685
|
+
<!-- <option value="9">1 Minute</option> -->
|
|
1686
|
+
</select>
|
|
1687
|
+
</div>
|
|
1688
|
+
</div>
|
|
1689
|
+
<div class="form-row ncd-active-check">
|
|
1690
|
+
<strong>Set RTC</strong>
|
|
1691
|
+
<div>
|
|
1692
|
+
<label for="node-input-set_rtc_202"><i class="icon-tag"></i>Active:</label>
|
|
1693
|
+
<input type="checkbox" id="node-input-set_rtc_202" value="1">
|
|
1694
|
+
</div>
|
|
1695
|
+
</div>
|
|
1696
|
+
</div>
|
|
1697
|
+
|
|
1626
1698
|
<div class="ncd-dependent" data-sensor-81 data-sensor-111 data-sensor-181>
|
|
1627
1699
|
<hr>
|
|
1628
1700
|
<div class="form-row ncd-active-check">
|
|
@@ -2070,8 +2142,7 @@
|
|
|
2070
2142
|
</div>
|
|
2071
2143
|
</div>
|
|
2072
2144
|
</div>
|
|
2073
|
-
|
|
2074
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-110 data-sensor-111 data-sensor-180 data-sensor-181 data-sensor-505 data-sensor-506 data-sensor-538>
|
|
2145
|
+
<div class="ncd-dependent" data-sensor-505 data-sensor-506>
|
|
2075
2146
|
<div class="form-row ncd-active-check">
|
|
2076
2147
|
<strong>Channel 1 Current Calibration Value</strong>
|
|
2077
2148
|
<p class="caption">
|
|
@@ -2088,8 +2159,7 @@
|
|
|
2088
2159
|
</div>
|
|
2089
2160
|
</div>
|
|
2090
2161
|
</div>
|
|
2091
|
-
|
|
2092
|
-
<div class="ncd-dependent" data-sensor-81 data-sensor-111 data-sensor-181 data-sensor-506>
|
|
2162
|
+
<div class="ncd-dependent" data-sensor-506>
|
|
2093
2163
|
<div class="form-row ncd-active-check">
|
|
2094
2164
|
<strong>Channel 2 Current Calibration Value</strong>
|
|
2095
2165
|
<p class="caption">
|
|
@@ -2106,7 +2176,6 @@
|
|
|
2106
2176
|
</div>
|
|
2107
2177
|
</div>
|
|
2108
2178
|
</div>
|
|
2109
|
-
|
|
2110
2179
|
<div class="ncd-dependent" data-sensor-506>
|
|
2111
2180
|
<div class="form-row ncd-active-check">
|
|
2112
2181
|
<strong>Channel 3 Current Calibration Value</strong>
|
|
@@ -2183,7 +2252,7 @@
|
|
|
2183
2252
|
</div>
|
|
2184
2253
|
</div>
|
|
2185
2254
|
<div class="ncd-dependent" data-sensor-108>
|
|
2186
|
-
<div class="form-row">
|
|
2255
|
+
<div class="form-row ncd-active-check">
|
|
2187
2256
|
<label for="node-input-clear_all_counters_108"><i class="icon-tag"></i>Clear All Counters</label>
|
|
2188
2257
|
<input type="checkbox" id="node-input-clear_all_counters_108" value="1">
|
|
2189
2258
|
</div>
|
|
@@ -2873,8 +2942,7 @@
|
|
|
2873
2942
|
</div>
|
|
2874
2943
|
</div>
|
|
2875
2944
|
</div>
|
|
2876
|
-
|
|
2877
|
-
<div class="ncd-dependent" data-sensor-114>
|
|
2945
|
+
<div class="ncd-dependent" data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114>
|
|
2878
2946
|
<div class="form-row ncd-active-check">
|
|
2879
2947
|
<strong>Clear Probe Uptimers</strong>
|
|
2880
2948
|
<div>
|
|
@@ -2890,7 +2958,6 @@
|
|
|
2890
2958
|
</div>
|
|
2891
2959
|
</div>
|
|
2892
2960
|
</div>
|
|
2893
|
-
|
|
2894
2961
|
<div class="ncd-dependent" data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114>
|
|
2895
2962
|
<div class="form-row ncd-active-check">
|
|
2896
2963
|
<strong>Set Auto Raw Interval</strong>
|
|
@@ -2918,7 +2985,7 @@
|
|
|
2918
2985
|
Example of targeted address: 41D5EC37
|
|
2919
2986
|
</p>
|
|
2920
2987
|
</div>
|
|
2921
|
-
<div class="form-row ncd-active-check">
|
|
2988
|
+
<!-- <div class="form-row ncd-active-check">
|
|
2922
2989
|
<strong>Clear Probe Uptimers</strong>
|
|
2923
2990
|
<div>
|
|
2924
2991
|
<label for="node-input-clear_probe_uptimers_110_active">Active:</label>
|
|
@@ -2931,9 +2998,10 @@
|
|
|
2931
2998
|
<option value="1">Enabled</option>
|
|
2932
2999
|
</select>
|
|
2933
3000
|
</div>
|
|
2934
|
-
</div>
|
|
3001
|
+
</div> -->
|
|
2935
3002
|
<div class="form-row ncd-active-check">
|
|
2936
3003
|
<strong>Set Smart Mode Threshold</strong>
|
|
3004
|
+
<p>If RMS acceleration is above this in any axis, it will send data. This will be an integer value that increments the interrupt threshold by 50 mg. A value of 1 means to wake the sensor if acceleration is above 50 mg, 2 means 100 mg, etc.</p>
|
|
2937
3005
|
<div>
|
|
2938
3006
|
<label for="node-input-smart_threshold_110_active">Active:</label>
|
|
2939
3007
|
<input type="checkbox" id="node-input-smart_threshold_110_active" class="ncd-config-toggle" data-target-id="node-input-smart_threshold_110" value="1">
|
|
@@ -2943,6 +3011,37 @@
|
|
|
2943
3011
|
<input type="text" id="node-input-smart_threshold_110" value="1">
|
|
2944
3012
|
</div>
|
|
2945
3013
|
</div>
|
|
3014
|
+
<div class="form-row ncd-active-check">
|
|
3015
|
+
<strong>Set Smart Mode Skip Interval</strong>
|
|
3016
|
+
<p>Sensor will skip sending data this many times if vibration is below the smart threshold.</p>
|
|
3017
|
+
<div>
|
|
3018
|
+
<label for="node-input-smart_interval_110_active">Active:</label>
|
|
3019
|
+
<input type="checkbox" id="node-input-smart_interval_110_active" class="ncd-config-toggle" data-target-id="node-input-smart_interval_110" value="1">
|
|
3020
|
+
</div>
|
|
3021
|
+
<div>
|
|
3022
|
+
<label for="node-input-smart_interval_110"><i class="icon-tag"></i>Value:</label>
|
|
3023
|
+
<input type="text" id="node-input-smart_interval_110" value="1">
|
|
3024
|
+
</div>
|
|
3025
|
+
</div>
|
|
3026
|
+
<div class="form-row ncd-active-check">
|
|
3027
|
+
<strong>Set FLY Interval</strong>
|
|
3028
|
+
<div>
|
|
3029
|
+
<label for="node-input-fly_interval_110_active">Active:</label>
|
|
3030
|
+
<input type="checkbox" id="node-input-fly_interval_110_active" class="ncd-config-toggle" data-target-id="node-input-fly_interval_110" value="1">
|
|
3031
|
+
</div>
|
|
3032
|
+
<div>
|
|
3033
|
+
<label for="node-input-fly_interval_110"><i class="icon-tag"></i>Value:</label>
|
|
3034
|
+
<select id="node-input-fly_interval_110">
|
|
3035
|
+
<option value="60">1 Hour</option>
|
|
3036
|
+
<option value="120">2 Hours</option>
|
|
3037
|
+
<option value="240">4 Hours</option>
|
|
3038
|
+
<option value="480">8 Hours</option>
|
|
3039
|
+
<option value="720">12 Hours</option>
|
|
3040
|
+
<option value="1080">18 Hours</option>
|
|
3041
|
+
<option value="1440">24 Hours</option>
|
|
3042
|
+
</select>
|
|
3043
|
+
</div>
|
|
3044
|
+
</div>
|
|
2946
3045
|
</div>
|
|
2947
3046
|
<div class="ncd-dependent" data-sensor-531>
|
|
2948
3047
|
<hr>
|
|
@@ -2989,6 +3088,36 @@
|
|
|
2989
3088
|
</div>
|
|
2990
3089
|
</div>
|
|
2991
3090
|
</div>
|
|
3091
|
+
<div class="ncd-dependent" data-sensor-44 data-sensor-53>
|
|
3092
|
+
<hr>
|
|
3093
|
+
<div class="form-row ncd-active-check">
|
|
3094
|
+
<strong>Set Skip Samples (CO2)</strong>
|
|
3095
|
+
<p>Valid Range: 1 - 10 </p>
|
|
3096
|
+
<div>
|
|
3097
|
+
<label for="node-input-scd_skip_samples_44_active">Active:</label>
|
|
3098
|
+
<input type="checkbox" id="node-input-scd_skip_samples_44_active" class="ncd-config-toggle" data-target-id="node-input-scd_skip_samples_44" value="1">
|
|
3099
|
+
</div>
|
|
3100
|
+
<div>
|
|
3101
|
+
<label for="node-scd_skip_samples_44"><i class="icon-tag"></i> Value:</label>
|
|
3102
|
+
<input type="text" id="node-input-scd_skip_samples_44">
|
|
3103
|
+
</div>
|
|
3104
|
+
</div>
|
|
3105
|
+
</div>
|
|
3106
|
+
<div class="ncd-dependent" data-sensor-32 data-sensor-53>
|
|
3107
|
+
<hr>
|
|
3108
|
+
<div class="form-row ncd-active-check">
|
|
3109
|
+
<strong>Set Skip Samples (Particulate)</strong>
|
|
3110
|
+
<p>Valid Range: 1 - 10 </p>
|
|
3111
|
+
<div>
|
|
3112
|
+
<label for="node-input-sps_skip_samples_32_active">Active:</label>
|
|
3113
|
+
<input type="checkbox" id="node-input-sps_skip_samples_32_active" class="ncd-config-toggle" data-target-id="node-input-sps_skip_samples_32" value="1">
|
|
3114
|
+
</div>
|
|
3115
|
+
<div>
|
|
3116
|
+
<label for="node-sps_skip_samples_32"><i class="icon-tag"></i> Value:</label>
|
|
3117
|
+
<input type="text" id="node-input-sps_skip_samples_32">
|
|
3118
|
+
</div>
|
|
3119
|
+
</div>
|
|
3120
|
+
</div>
|
|
2992
3121
|
</div>
|
|
2993
3122
|
</div>
|
|
2994
3123
|
</script>
|
package/wireless.js
CHANGED
|
@@ -679,7 +679,7 @@ module.exports = function(RED) {
|
|
|
679
679
|
|
|
680
680
|
var promises = {};
|
|
681
681
|
// This command is used for OTF on types 53, 80,81,82,83,84, 101, 102, 110, 111, 518, 519
|
|
682
|
-
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 180, 181, 518, 519, 520, 538];
|
|
682
|
+
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 110, 111, 112, 114, 180, 181, 518, 519, 520, 538];
|
|
683
683
|
if(original_otf_devices.includes(sensor.type)){
|
|
684
684
|
// This command is used for OTF on types 53, 80, 81, 82, 83, 84, 101, 102, 110, 111, 518, 519
|
|
685
685
|
promises.config_enter_otn_mode = node.config_gateway.config_enter_otn_mode(sensor.mac);
|
|
@@ -726,6 +726,7 @@ module.exports = function(RED) {
|
|
|
726
726
|
var promises = {};
|
|
727
727
|
|
|
728
728
|
promises.broadcast_rtc = node.config_gateway.config_set_rtc_101('00:00:00:00:00:00:FF:FF');
|
|
729
|
+
promises.broadcast_rtc_202 = node.config_gateway.config_set_rtc_202('00:00:00:00:00:00:FF:FF');
|
|
729
730
|
|
|
730
731
|
promises.finish = new Promise((fulfill, reject) => {
|
|
731
732
|
node.config_gateway.queue.add(() => {
|
|
@@ -1007,6 +1008,11 @@ module.exports = function(RED) {
|
|
|
1007
1008
|
promises.change_detection_ch3 = node.config_gateway.config_set_change_detection_ch3(mac, config.change_enabled_ch3 ? 1 : 0, parseInt(config.change_pr_ch3), parseInt(config.change_interval_ch3));
|
|
1008
1009
|
}
|
|
1009
1010
|
break;
|
|
1011
|
+
case 32:
|
|
1012
|
+
if(config.sps_skip_samples_32_active){
|
|
1013
|
+
promises.sps_skip_samples_32 = node.config_gateway.config_set_sps_skip_samples_32(mac, parseInt(config.sps_skip_samples_32));
|
|
1014
|
+
}
|
|
1015
|
+
break;
|
|
1010
1016
|
case 33:
|
|
1011
1017
|
if(config.clear_counter_33){
|
|
1012
1018
|
promises.clear_counter_33 = node.config_gateway.config_set_clear_counter_33(mac);
|
|
@@ -1053,6 +1059,9 @@ module.exports = function(RED) {
|
|
|
1053
1059
|
if(config.temperature_offset_44_active){
|
|
1054
1060
|
promises.temperature_offset_44 = node.config_gateway.config_set_sensor_temperature_offset_44(mac, parseInt(config.temperature_offset_44));
|
|
1055
1061
|
}
|
|
1062
|
+
if(config.scd_skip_samples_44_active){
|
|
1063
|
+
promises.scd_skip_samples_44 = node.config_gateway.config_set_scd_skip_samples_44(mac, parseInt(config.scd_skip_samples_44));
|
|
1064
|
+
}
|
|
1056
1065
|
break;
|
|
1057
1066
|
case 45:
|
|
1058
1067
|
if(config.sensor_boot_time_420ma_active){
|
|
@@ -1109,6 +1118,11 @@ module.exports = function(RED) {
|
|
|
1109
1118
|
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
1110
1119
|
}
|
|
1111
1120
|
break;
|
|
1121
|
+
case 53:
|
|
1122
|
+
if(config.scd_skip_samples_44_active){
|
|
1123
|
+
promises.scd_skip_samples_44 = node.config_gateway.config_set_scd_skip_samples_44(mac, parseInt(config.scd_skip_samples_44));
|
|
1124
|
+
}
|
|
1125
|
+
break;
|
|
1112
1126
|
case 56:
|
|
1113
1127
|
if(config.sensor_boot_time_420ma_active){
|
|
1114
1128
|
promises.sensor_boot_time_420ma = node.config_gateway.config_set_sensor_boot_time_420ma(mac, parseInt(config.sensor_boot_time_420ma));
|
|
@@ -1147,9 +1161,6 @@ module.exports = function(RED) {
|
|
|
1147
1161
|
promises.sensor_boot_time_78 = node.config_gateway.config_set_sensor_boot_time_78(mac, parseInt(config.sensor_boot_time_78));
|
|
1148
1162
|
}
|
|
1149
1163
|
case 80:
|
|
1150
|
-
if(config.current_calibration_c1_80_active){
|
|
1151
|
-
promises.current_calibration_c1_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
1152
|
-
}
|
|
1153
1164
|
if(config.output_data_rate_101_active){
|
|
1154
1165
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
1155
1166
|
}
|
|
@@ -1194,12 +1205,6 @@ module.exports = function(RED) {
|
|
|
1194
1205
|
}
|
|
1195
1206
|
break;
|
|
1196
1207
|
case 81:
|
|
1197
|
-
if(config.current_calibration_c1_80_active){
|
|
1198
|
-
promises.current_calibration_c1_80_active = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
1199
|
-
}
|
|
1200
|
-
if(config.current_calibration_c2_80_active){
|
|
1201
|
-
promises.current_calibration_c2_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c2_80), 3);
|
|
1202
|
-
}
|
|
1203
1208
|
if(config.output_data_rate_p1_81_active){
|
|
1204
1209
|
promises.output_data_rate_p1_81 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_p1_81));
|
|
1205
1210
|
}
|
|
@@ -1498,9 +1503,6 @@ module.exports = function(RED) {
|
|
|
1498
1503
|
}
|
|
1499
1504
|
break;
|
|
1500
1505
|
case 110:
|
|
1501
|
-
if(config.current_calibration_c1_80_active){
|
|
1502
|
-
promises.current_calibration_c1_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
1503
|
-
}
|
|
1504
1506
|
if(config.output_data_rate_101_active){
|
|
1505
1507
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
1506
1508
|
}
|
|
@@ -1510,8 +1512,8 @@ module.exports = function(RED) {
|
|
|
1510
1512
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1511
1513
|
promises.axis_enabled_101 = node.config_gateway.config_set_axis_enabled_101(mac, config.x_axis_101, config.y_axis_101, config.z_axis_101);
|
|
1512
1514
|
}
|
|
1513
|
-
if(config.
|
|
1514
|
-
promises.
|
|
1515
|
+
if(config.sampling_interval_110_active){
|
|
1516
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1515
1517
|
}
|
|
1516
1518
|
if(config.full_scale_range_101_active){
|
|
1517
1519
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1558,14 +1560,11 @@ module.exports = function(RED) {
|
|
|
1558
1560
|
if(config.smart_threshold_110_active){
|
|
1559
1561
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1560
1562
|
}
|
|
1563
|
+
if(config.fly_interval_110_active){
|
|
1564
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1565
|
+
}
|
|
1561
1566
|
break;
|
|
1562
1567
|
case 111:
|
|
1563
|
-
if(config.current_calibration_c1_80_active){
|
|
1564
|
-
promises.current_calibration_c1_80_active = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
1565
|
-
}
|
|
1566
|
-
if(config.current_calibration_c2_80_active){
|
|
1567
|
-
promises.current_calibration_c2_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c2_80), 3);
|
|
1568
|
-
}
|
|
1569
1568
|
if(config.output_data_rate_p1_81_active){
|
|
1570
1569
|
promises.output_data_rate_p1_81 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_p1_81));
|
|
1571
1570
|
}
|
|
@@ -1581,8 +1580,8 @@ module.exports = function(RED) {
|
|
|
1581
1580
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1582
1581
|
promises.axis_enabled_101 = node.config_gateway.config_set_axis_enabled_101(mac, config.x_axis_101, config.y_axis_101, config.z_axis_101);
|
|
1583
1582
|
}
|
|
1584
|
-
if(config.
|
|
1585
|
-
promises.
|
|
1583
|
+
if(config.sampling_interval_110_active){
|
|
1584
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1586
1585
|
}
|
|
1587
1586
|
if(config.full_scale_range_101_active){
|
|
1588
1587
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1635,6 +1634,9 @@ module.exports = function(RED) {
|
|
|
1635
1634
|
if(config.smart_threshold_110_active){
|
|
1636
1635
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1637
1636
|
}
|
|
1637
|
+
if(config.fly_interval_110_active){
|
|
1638
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1639
|
+
}
|
|
1638
1640
|
break;
|
|
1639
1641
|
case 112:
|
|
1640
1642
|
if(config.current_calibration_82_active){
|
|
@@ -1649,8 +1651,8 @@ module.exports = function(RED) {
|
|
|
1649
1651
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1650
1652
|
promises.axis_enabled_101 = node.config_gateway.config_set_axis_enabled_101(mac, config.x_axis_101, config.y_axis_101, config.z_axis_101);
|
|
1651
1653
|
}
|
|
1652
|
-
if(config.
|
|
1653
|
-
promises.
|
|
1654
|
+
if(config.sampling_interval_110_active){
|
|
1655
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1654
1656
|
}
|
|
1655
1657
|
if(config.full_scale_range_101_active){
|
|
1656
1658
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1697,6 +1699,9 @@ module.exports = function(RED) {
|
|
|
1697
1699
|
if(config.smart_threshold_110_active){
|
|
1698
1700
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1699
1701
|
}
|
|
1702
|
+
if(config.fly_interval_110_active){
|
|
1703
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1704
|
+
}
|
|
1700
1705
|
break;
|
|
1701
1706
|
case 114:
|
|
1702
1707
|
if(config.output_data_rate_101_active){
|
|
@@ -1708,8 +1713,8 @@ module.exports = function(RED) {
|
|
|
1708
1713
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1709
1714
|
promises.axis_enabled_101 = node.config_gateway.config_set_axis_enabled_101(mac, config.x_axis_101, config.y_axis_101, config.z_axis_101);
|
|
1710
1715
|
}
|
|
1711
|
-
if(config.
|
|
1712
|
-
promises.
|
|
1716
|
+
if(config.sampling_interval_110_active){
|
|
1717
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1713
1718
|
}
|
|
1714
1719
|
if(config.full_scale_range_101_active){
|
|
1715
1720
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1768,11 +1773,11 @@ module.exports = function(RED) {
|
|
|
1768
1773
|
if(config.smart_threshold_110_active){
|
|
1769
1774
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1770
1775
|
}
|
|
1776
|
+
if(config.fly_interval_110_active){
|
|
1777
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1778
|
+
}
|
|
1771
1779
|
break;
|
|
1772
1780
|
case 180:
|
|
1773
|
-
if(config.current_calibration_c1_80_active){
|
|
1774
|
-
promises.current_calibration_c1_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
1775
|
-
}
|
|
1776
1781
|
if(config.output_data_rate_101_active){
|
|
1777
1782
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
1778
1783
|
}
|
|
@@ -1817,12 +1822,6 @@ module.exports = function(RED) {
|
|
|
1817
1822
|
}
|
|
1818
1823
|
break;
|
|
1819
1824
|
case 181:
|
|
1820
|
-
if(config.current_calibration_c1_80_active){
|
|
1821
|
-
promises.current_calibration_c1_80_active = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
1822
|
-
}
|
|
1823
|
-
if(config.current_calibration_c2_80_active){
|
|
1824
|
-
promises.current_calibration_c2_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c2_80), 3);
|
|
1825
|
-
}
|
|
1826
1825
|
if(config.output_data_rate_p1_81_active){
|
|
1827
1826
|
promises.output_data_rate_p1_81 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_p1_81));
|
|
1828
1827
|
}
|
|
@@ -1889,6 +1888,14 @@ module.exports = function(RED) {
|
|
|
1889
1888
|
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
1890
1889
|
}
|
|
1891
1890
|
break;
|
|
1891
|
+
case 202:
|
|
1892
|
+
if(config.sampling_interval_202_active){
|
|
1893
|
+
promises.sampling_interval_202 = node.config_gateway.config_set_sampling_interval_202(mac, parseInt(config.sampling_interval_202));
|
|
1894
|
+
}
|
|
1895
|
+
if(config.set_rtc_202){
|
|
1896
|
+
promises.set_rtc_202 = node.config_gateway.config_set_rtc_202(mac);
|
|
1897
|
+
}
|
|
1898
|
+
break;
|
|
1892
1899
|
case 505:
|
|
1893
1900
|
if(config.current_calibration_c1_80_active){
|
|
1894
1901
|
promises.current_calibration_c1_80_active = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
@@ -2031,9 +2038,6 @@ module.exports = function(RED) {
|
|
|
2031
2038
|
}
|
|
2032
2039
|
break;
|
|
2033
2040
|
case 538:
|
|
2034
|
-
if(config.current_calibration_c1_80_active){
|
|
2035
|
-
promises.current_calibration_c1_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
2036
|
-
}
|
|
2037
2041
|
if(config.output_data_rate_101_active){
|
|
2038
2042
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
2039
2043
|
}
|
|
@@ -2187,7 +2191,7 @@ module.exports = function(RED) {
|
|
|
2187
2191
|
}
|
|
2188
2192
|
}
|
|
2189
2193
|
// These sensors listed in original_otf_devices use a different OTF code.
|
|
2190
|
-
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 180, 181, 518, 519, 520, 538];
|
|
2194
|
+
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 110, 111, 112, 114, 180, 181, 518, 519, 520, 538];
|
|
2191
2195
|
// If we changed the network ID reboot the sensor to take effect.
|
|
2192
2196
|
// TODO if we add the encryption key command to node-red we need to reboot for it as well.
|
|
2193
2197
|
if(reboot){
|
|
@@ -2299,7 +2303,7 @@ module.exports = function(RED) {
|
|
|
2299
2303
|
_send_otn_request(sensor);
|
|
2300
2304
|
}, 100);
|
|
2301
2305
|
}else if(config.auto_config && config.on_the_fly_enable && sensor.mode == "OTN"){
|
|
2302
|
-
if(config.sensor_type == 101 || config.sensor_type == 102){
|
|
2306
|
+
if(config.sensor_type == 101 || config.sensor_type == 102 || config.sensor_type == 202){
|
|
2303
2307
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2304
2308
|
this.gateway.fly_101_in_progress = true;
|
|
2305
2309
|
node.warn('Starting RTC Timer' + Date.now());
|
|
@@ -2321,7 +2325,7 @@ module.exports = function(RED) {
|
|
|
2321
2325
|
}else{
|
|
2322
2326
|
_config(sensor, true);
|
|
2323
2327
|
}
|
|
2324
|
-
} else if(config.sensor_type == 101 && sensor.mode == "FLY" || config.sensor_type == 102 && sensor.mode == "FLY"){
|
|
2328
|
+
} else if(config.sensor_type == 101 && sensor.mode == "FLY" || config.sensor_type == 102 && sensor.mode == "FLY" || config.sensor_type == 202 && sensor.mode == "FLY"){
|
|
2325
2329
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2326
2330
|
this.gateway.fly_101_in_progress = true;
|
|
2327
2331
|
node.warn('Starting RTC Timer' + Date.now());
|
|
@@ -2410,7 +2414,7 @@ module.exports = function(RED) {
|
|
|
2410
2414
|
}
|
|
2411
2415
|
|
|
2412
2416
|
}else if(config.auto_config && config.on_the_fly_enable && sensor.mode == "OTN"){
|
|
2413
|
-
if(config.sensor_type == 101 || config.sensor_type == 102){
|
|
2417
|
+
if(config.sensor_type == 101 || config.sensor_type == 102 || config.sensor_type == 202){
|
|
2414
2418
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2415
2419
|
this.gateway.fly_101_in_progress = true;
|
|
2416
2420
|
node.warn('Starting RTC Timer' + Date.now());
|
|
@@ -2432,7 +2436,7 @@ module.exports = function(RED) {
|
|
|
2432
2436
|
_config(sensor, true);
|
|
2433
2437
|
}
|
|
2434
2438
|
|
|
2435
|
-
}else if(sensor.mode == "FLY" && config.sensor_type == 101 || sensor.mode == "FLY" && config.sensor_type == 102){
|
|
2439
|
+
}else if(sensor.mode == "FLY" && config.sensor_type == 101 || sensor.mode == "FLY" && config.sensor_type == 102 || sensor.mode == "FLY" && config.sensor_type == 202){
|
|
2436
2440
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2437
2441
|
this.gateway.fly_101_in_progress = true;
|
|
2438
2442
|
node.warn('Starting RTC Timer' + Date.now());
|