@ncd-io/node-red-enterprise-sensors 1.0.7 → 1.0.9
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 +262 -81
- package/package.json +1 -1
- package/wireless.html +287 -30
- package/wireless.js +74 -52
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,12 +1008,17 @@ 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);
|
|
1013
1019
|
}
|
|
1014
|
-
if(config.
|
|
1015
|
-
promises.
|
|
1020
|
+
if(config.input_two_33_active){
|
|
1021
|
+
promises.input_two_33 = node.config_gateway.config_set_input_two_108(mac, parseInt(config.input_two_33));
|
|
1016
1022
|
}
|
|
1017
1023
|
if(config.counter_threshold_108_active){
|
|
1018
1024
|
promises.counter_threshold_108 = node.config_gateway.config_set_counter_threshold_108(mac, parseInt(config.counter_threshold_108));
|
|
@@ -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
|
}
|
|
@@ -1472,8 +1477,8 @@ module.exports = function(RED) {
|
|
|
1472
1477
|
if(config.accelerometer_state_108_active){
|
|
1473
1478
|
promises.accelerometer_state_108 = node.config_gateway.config_set_accelerometer_state_108(mac, parseInt(config.accelerometer_state_108));
|
|
1474
1479
|
}
|
|
1475
|
-
if(config.
|
|
1476
|
-
promises.
|
|
1480
|
+
if(config.clear_timers_108_active){
|
|
1481
|
+
promises.clear_timers_108 = node.config_gateway.config_set_clear_timers_108(mac, parseInt(config.clear_timers_108));
|
|
1477
1482
|
}
|
|
1478
1483
|
if(config.accelerometer_threshold_108_active){
|
|
1479
1484
|
promises.accelerometer_threshold_108 = node.config_gateway.config_set_accelerometer_threshold_108(mac, parseInt(config.accelerometer_threshold_108));
|
|
@@ -1496,11 +1501,26 @@ module.exports = function(RED) {
|
|
|
1496
1501
|
if(config.push_notification_108_active){
|
|
1497
1502
|
promises.push_notification_108 = node.config_gateway.config_set_push_notification_108(mac, parseInt(config.push_notification_108));
|
|
1498
1503
|
}
|
|
1504
|
+
if(config.qos_108_active){
|
|
1505
|
+
promises.qos_108 = node.config_gateway.config_set_qos_108(mac, parseInt(config.qos_108));
|
|
1506
|
+
}
|
|
1507
|
+
if(config.deactivate_activate_accelero_108_active){
|
|
1508
|
+
promises.deactivate_activate_accelero_108 = node.config_gateway.config_set_deactivate_activate_accelero_108(mac, parseInt(config.deactivate_activate_accelero_108));
|
|
1509
|
+
}
|
|
1510
|
+
if(config.reset_timeout_108_active){
|
|
1511
|
+
promises.reset_timeout_108 = node.config_gateway.config_set_reset_timeout_108(mac, parseInt(config.reset_timeout_108));
|
|
1512
|
+
}
|
|
1513
|
+
if(config.reset_mode_to_disabled_108_active){
|
|
1514
|
+
promises.reset_mode_to_disabled_108 = node.config_gateway.config_set_reset_mode_to_disabled_108(mac, parseInt(config.reset_mode_to_disabled_108));
|
|
1515
|
+
}
|
|
1516
|
+
if(config.rtc_108){
|
|
1517
|
+
promises.rtc_108 = node.config_gateway.config_set_rtc_108(mac);
|
|
1518
|
+
}
|
|
1519
|
+
if(config.rtc_interval_108_active){
|
|
1520
|
+
promises.rtc_interval_108 = node.config_gateway.config_set_rtc_interval_108(mac, parseInt(config.rtc_interval_108));
|
|
1521
|
+
}
|
|
1499
1522
|
break;
|
|
1500
1523
|
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
1524
|
if(config.output_data_rate_101_active){
|
|
1505
1525
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
1506
1526
|
}
|
|
@@ -1510,8 +1530,8 @@ module.exports = function(RED) {
|
|
|
1510
1530
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1511
1531
|
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
1532
|
}
|
|
1513
|
-
if(config.
|
|
1514
|
-
promises.
|
|
1533
|
+
if(config.sampling_interval_110_active){
|
|
1534
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1515
1535
|
}
|
|
1516
1536
|
if(config.full_scale_range_101_active){
|
|
1517
1537
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1547,7 +1567,7 @@ module.exports = function(RED) {
|
|
|
1547
1567
|
promises.auto_raw_interval_110 = node.config_gateway.config_set_auto_raw_interval_110(mac, parseInt(config.auto_raw_interval_110));
|
|
1548
1568
|
}
|
|
1549
1569
|
if(config.auto_raw_destination_110_active){
|
|
1550
|
-
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110));
|
|
1570
|
+
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110, 16));
|
|
1551
1571
|
}
|
|
1552
1572
|
if(config.clear_probe_uptimers_110_active){
|
|
1553
1573
|
promises.clear_probe_uptimers_110 = node.config_gateway.config_set_clear_probe_uptimers_110(mac, parseInt(config.clear_probe_uptimers_110));
|
|
@@ -1558,14 +1578,11 @@ module.exports = function(RED) {
|
|
|
1558
1578
|
if(config.smart_threshold_110_active){
|
|
1559
1579
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1560
1580
|
}
|
|
1581
|
+
if(config.fly_interval_110_active){
|
|
1582
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1583
|
+
}
|
|
1561
1584
|
break;
|
|
1562
1585
|
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
1586
|
if(config.output_data_rate_p1_81_active){
|
|
1570
1587
|
promises.output_data_rate_p1_81 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_p1_81));
|
|
1571
1588
|
}
|
|
@@ -1581,8 +1598,8 @@ module.exports = function(RED) {
|
|
|
1581
1598
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1582
1599
|
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
1600
|
}
|
|
1584
|
-
if(config.
|
|
1585
|
-
promises.
|
|
1601
|
+
if(config.sampling_interval_110_active){
|
|
1602
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1586
1603
|
}
|
|
1587
1604
|
if(config.full_scale_range_101_active){
|
|
1588
1605
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1624,7 +1641,7 @@ module.exports = function(RED) {
|
|
|
1624
1641
|
promises.auto_raw_interval_110 = node.config_gateway.config_set_auto_raw_interval_110(mac, parseInt(config.auto_raw_interval_110));
|
|
1625
1642
|
}
|
|
1626
1643
|
if(config.auto_raw_destination_110_active){
|
|
1627
|
-
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110));
|
|
1644
|
+
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110, 16));
|
|
1628
1645
|
}
|
|
1629
1646
|
if(config.clear_probe_uptimers_110_active){
|
|
1630
1647
|
promises.clear_probe_uptimers_110 = node.config_gateway.config_set_clear_probe_uptimers_110(mac, parseInt(config.clear_probe_uptimers_110));
|
|
@@ -1635,6 +1652,9 @@ module.exports = function(RED) {
|
|
|
1635
1652
|
if(config.smart_threshold_110_active){
|
|
1636
1653
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1637
1654
|
}
|
|
1655
|
+
if(config.fly_interval_110_active){
|
|
1656
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1657
|
+
}
|
|
1638
1658
|
break;
|
|
1639
1659
|
case 112:
|
|
1640
1660
|
if(config.current_calibration_82_active){
|
|
@@ -1649,8 +1669,8 @@ module.exports = function(RED) {
|
|
|
1649
1669
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1650
1670
|
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
1671
|
}
|
|
1652
|
-
if(config.
|
|
1653
|
-
promises.
|
|
1672
|
+
if(config.sampling_interval_110_active){
|
|
1673
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1654
1674
|
}
|
|
1655
1675
|
if(config.full_scale_range_101_active){
|
|
1656
1676
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1686,7 +1706,7 @@ module.exports = function(RED) {
|
|
|
1686
1706
|
promises.auto_raw_interval_110 = node.config_gateway.config_set_auto_raw_interval_110(mac, parseInt(config.auto_raw_interval_110));
|
|
1687
1707
|
}
|
|
1688
1708
|
if(config.auto_raw_destination_110_active){
|
|
1689
|
-
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110));
|
|
1709
|
+
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110, 16));
|
|
1690
1710
|
}
|
|
1691
1711
|
if(config.clear_probe_uptimers_110_active){
|
|
1692
1712
|
promises.clear_probe_uptimers_110 = node.config_gateway.config_set_clear_probe_uptimers_110(mac, parseInt(config.clear_probe_uptimers_110));
|
|
@@ -1697,6 +1717,9 @@ module.exports = function(RED) {
|
|
|
1697
1717
|
if(config.smart_threshold_110_active){
|
|
1698
1718
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1699
1719
|
}
|
|
1720
|
+
if(config.fly_interval_110_active){
|
|
1721
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1722
|
+
}
|
|
1700
1723
|
break;
|
|
1701
1724
|
case 114:
|
|
1702
1725
|
if(config.output_data_rate_101_active){
|
|
@@ -1708,8 +1731,8 @@ module.exports = function(RED) {
|
|
|
1708
1731
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1709
1732
|
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
1733
|
}
|
|
1711
|
-
if(config.
|
|
1712
|
-
promises.
|
|
1734
|
+
if(config.sampling_interval_110_active){
|
|
1735
|
+
promises.sampling_interval_110 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_110));
|
|
1713
1736
|
}
|
|
1714
1737
|
if(config.full_scale_range_101_active){
|
|
1715
1738
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1757,7 +1780,7 @@ module.exports = function(RED) {
|
|
|
1757
1780
|
promises.auto_raw_interval_110 = node.config_gateway.config_set_auto_raw_interval_110(mac, parseInt(config.auto_raw_interval_110));
|
|
1758
1781
|
}
|
|
1759
1782
|
if(config.auto_raw_destination_110_active){
|
|
1760
|
-
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110));
|
|
1783
|
+
promises.auto_raw_destination_110 = node.config_gateway.config_set_auto_raw_destination_110(mac, parseInt(config.auto_raw_destination_110, 16));
|
|
1761
1784
|
}
|
|
1762
1785
|
if(config.clear_probe_uptimers_110_active){
|
|
1763
1786
|
promises.clear_probe_uptimers_110 = node.config_gateway.config_set_clear_probe_uptimers_110(mac, parseInt(config.clear_probe_uptimers_110));
|
|
@@ -1768,11 +1791,11 @@ module.exports = function(RED) {
|
|
|
1768
1791
|
if(config.smart_threshold_110_active){
|
|
1769
1792
|
promises.smart_threshold_110 = node.config_gateway.config_set_smart_threshold_110(mac, parseInt(config.smart_threshold_110));
|
|
1770
1793
|
}
|
|
1794
|
+
if(config.fly_interval_110_active){
|
|
1795
|
+
promises.fly_interval_110 = node.config_gateway.config_set_fly_interval_110(mac, parseInt(config.fly_interval_110));
|
|
1796
|
+
}
|
|
1771
1797
|
break;
|
|
1772
1798
|
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
1799
|
if(config.output_data_rate_101_active){
|
|
1777
1800
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
1778
1801
|
}
|
|
@@ -1817,12 +1840,6 @@ module.exports = function(RED) {
|
|
|
1817
1840
|
}
|
|
1818
1841
|
break;
|
|
1819
1842
|
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
1843
|
if(config.output_data_rate_p1_81_active){
|
|
1827
1844
|
promises.output_data_rate_p1_81 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_p1_81));
|
|
1828
1845
|
}
|
|
@@ -1889,6 +1906,14 @@ module.exports = function(RED) {
|
|
|
1889
1906
|
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
1890
1907
|
}
|
|
1891
1908
|
break;
|
|
1909
|
+
case 202:
|
|
1910
|
+
if(config.sampling_interval_202_active){
|
|
1911
|
+
promises.sampling_interval_202 = node.config_gateway.config_set_sampling_interval_202(mac, parseInt(config.sampling_interval_202));
|
|
1912
|
+
}
|
|
1913
|
+
if(config.set_rtc_202){
|
|
1914
|
+
promises.set_rtc_202 = node.config_gateway.config_set_rtc_202(mac);
|
|
1915
|
+
}
|
|
1916
|
+
break;
|
|
1892
1917
|
case 505:
|
|
1893
1918
|
if(config.current_calibration_c1_80_active){
|
|
1894
1919
|
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 +2056,6 @@ module.exports = function(RED) {
|
|
|
2031
2056
|
}
|
|
2032
2057
|
break;
|
|
2033
2058
|
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
2059
|
if(config.output_data_rate_101_active){
|
|
2038
2060
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
2039
2061
|
}
|
|
@@ -2187,7 +2209,7 @@ module.exports = function(RED) {
|
|
|
2187
2209
|
}
|
|
2188
2210
|
}
|
|
2189
2211
|
// 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];
|
|
2212
|
+
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 110, 111, 112, 114, 180, 181, 518, 519, 520, 538];
|
|
2191
2213
|
// If we changed the network ID reboot the sensor to take effect.
|
|
2192
2214
|
// TODO if we add the encryption key command to node-red we need to reboot for it as well.
|
|
2193
2215
|
if(reboot){
|
|
@@ -2299,7 +2321,7 @@ module.exports = function(RED) {
|
|
|
2299
2321
|
_send_otn_request(sensor);
|
|
2300
2322
|
}, 100);
|
|
2301
2323
|
}else if(config.auto_config && config.on_the_fly_enable && sensor.mode == "OTN"){
|
|
2302
|
-
if(config.sensor_type == 101 || config.sensor_type == 102){
|
|
2324
|
+
if(config.sensor_type == 101 || config.sensor_type == 102 || config.sensor_type == 202){
|
|
2303
2325
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2304
2326
|
this.gateway.fly_101_in_progress = true;
|
|
2305
2327
|
node.warn('Starting RTC Timer' + Date.now());
|
|
@@ -2321,7 +2343,7 @@ module.exports = function(RED) {
|
|
|
2321
2343
|
}else{
|
|
2322
2344
|
_config(sensor, true);
|
|
2323
2345
|
}
|
|
2324
|
-
} else if(config.sensor_type == 101 && sensor.mode == "FLY" || config.sensor_type == 102 && sensor.mode == "FLY"){
|
|
2346
|
+
} else if(config.sensor_type == 101 && sensor.mode == "FLY" || config.sensor_type == 102 && sensor.mode == "FLY" || config.sensor_type == 202 && sensor.mode == "FLY"){
|
|
2325
2347
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2326
2348
|
this.gateway.fly_101_in_progress = true;
|
|
2327
2349
|
node.warn('Starting RTC Timer' + Date.now());
|
|
@@ -2410,7 +2432,7 @@ module.exports = function(RED) {
|
|
|
2410
2432
|
}
|
|
2411
2433
|
|
|
2412
2434
|
}else if(config.auto_config && config.on_the_fly_enable && sensor.mode == "OTN"){
|
|
2413
|
-
if(config.sensor_type == 101 || config.sensor_type == 102){
|
|
2435
|
+
if(config.sensor_type == 101 || config.sensor_type == 102 || config.sensor_type == 202){
|
|
2414
2436
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2415
2437
|
this.gateway.fly_101_in_progress = true;
|
|
2416
2438
|
node.warn('Starting RTC Timer' + Date.now());
|
|
@@ -2432,7 +2454,7 @@ module.exports = function(RED) {
|
|
|
2432
2454
|
_config(sensor, true);
|
|
2433
2455
|
}
|
|
2434
2456
|
|
|
2435
|
-
}else if(sensor.mode == "FLY" && config.sensor_type == 101 || sensor.mode == "FLY" && config.sensor_type == 102){
|
|
2457
|
+
}else if(sensor.mode == "FLY" && config.sensor_type == 101 || sensor.mode == "FLY" && config.sensor_type == 102 || sensor.mode == "FLY" && config.sensor_type == 202){
|
|
2436
2458
|
if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){
|
|
2437
2459
|
this.gateway.fly_101_in_progress = true;
|
|
2438
2460
|
node.warn('Starting RTC Timer' + Date.now());
|