@ncd-io/node-red-enterprise-sensors 2.0.2 → 2.0.4
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 +790 -3302
- package/lib/sensors/105.js +454 -0
- package/lib/sensors/106.js +472 -0
- package/lib/sensors/107.js +452 -0
- package/lib/sensors/110.js +55 -40
- package/lib/sensors/111.js +19 -2
- package/lib/sensors/112.js +1479 -0
- package/lib/sensors/115.js +292 -0
- package/lib/sensors/12.js +405 -0
- package/lib/sensors/122.js +461 -0
- package/lib/sensors/125.js +1 -1
- package/lib/sensors/126.js +1 -1
- package/lib/sensors/128.js +1 -1
- package/lib/sensors/15.js +439 -0
- package/lib/sensors/21.js +471 -0
- package/lib/sensors/23.js +404 -0
- package/lib/sensors/39.js +324 -0
- package/lib/sensors/4.js +403 -0
- package/lib/sensors/45.js +438 -0
- package/lib/sensors/47.js +295 -0
- package/lib/sensors/48.js +438 -0
- package/lib/sensors/52.js +508 -0
- package/lib/sensors/536.js +708 -0
- package/lib/sensors/539.js +963 -0
- package/lib/sensors/54.js +380 -0
- package/lib/sensors/540.js +439 -0
- package/lib/sensors/541.js +476 -0
- package/lib/sensors/545.js +478 -0
- package/lib/sensors/55.js +419 -0
- package/lib/sensors/554.js +1 -1
- package/lib/sensors/56.js +442 -0
- package/lib/sensors/75.js +469 -0
- package/lib/sensors/88.js +456 -0
- package/lib/sensors/89.js +459 -0
- package/lib/sensors/90.js +404 -0
- package/lib/sensors/95.js +438 -0
- package/lib/sensors/96.js +438 -0
- package/package.json +1 -1
- package/wireless.html +594 -153
- package/wireless.js +145 -35
package/wireless.js
CHANGED
|
@@ -1683,6 +1683,12 @@ module.exports = function(RED) {
|
|
|
1683
1683
|
if(config.measurement_type_thermocouple_active){
|
|
1684
1684
|
promises.measurement_type_thermocouple_4 = node.config_gateway.config_set_measurement_type_thermocouple(mac, parseInt(config.measurement_type_thermocouple));
|
|
1685
1685
|
}
|
|
1686
|
+
if(config.boot_time_4_active){
|
|
1687
|
+
promises.boot_time_4 = node.config_gateway.config_set_boot_time_4(mac, parseInt(config.boot_time_4));
|
|
1688
|
+
}
|
|
1689
|
+
if(config.operation_mode_4_active){
|
|
1690
|
+
promises.operation_mode_4 = node.config_gateway.config_set_operation_mode_4(mac, parseInt(config.operation_mode_4));
|
|
1691
|
+
}
|
|
1686
1692
|
break;
|
|
1687
1693
|
case 5:
|
|
1688
1694
|
promises.acceleration_range = node.config_gateway.config_set_amgt_accel(mac, parseInt(config.amgt_accel));
|
|
@@ -1737,6 +1743,12 @@ module.exports = function(RED) {
|
|
|
1737
1743
|
if(config.measurement_type_thermocouple_active){
|
|
1738
1744
|
promises.measurement_type_thermocouple_12 = node.config_gateway.config_set_measurement_type_thermocouple(mac, parseInt(config.measurement_type_thermocouple));
|
|
1739
1745
|
}
|
|
1746
|
+
if(config.boot_time_4_active){
|
|
1747
|
+
promises.boot_time_4 = node.config_gateway.config_set_boot_time_4(mac, parseInt(config.boot_time_4));
|
|
1748
|
+
}
|
|
1749
|
+
if(config.operation_mode_4_active){
|
|
1750
|
+
promises.operation_mode_4 = node.config_gateway.config_set_operation_mode_4(mac, parseInt(config.operation_mode_4));
|
|
1751
|
+
}
|
|
1740
1752
|
break;
|
|
1741
1753
|
case 13:
|
|
1742
1754
|
if(config.current_calibration_13_active){
|
|
@@ -1849,6 +1861,9 @@ module.exports = function(RED) {
|
|
|
1849
1861
|
if(config.pressure_sensor_range_AMS5915_21_active){
|
|
1850
1862
|
promises.pressure_sensor_range_AMS5915_21 = node.config_gateway.config_set_pressure_sensor_range_21(mac, parseInt(config.pressure_sensor_range_AMS5915_21));
|
|
1851
1863
|
}
|
|
1864
|
+
if(config.pressure_sensor_range_AMS5935_21_active){
|
|
1865
|
+
promises.pressure_sensor_range_AMS5935_21 = node.config_gateway.config_set_pressure_sensor_range_21(mac, parseInt(config.pressure_sensor_range_AMS5935_21));
|
|
1866
|
+
}
|
|
1852
1867
|
break;
|
|
1853
1868
|
case 23:
|
|
1854
1869
|
if(config.thermocouple_type_23_active){
|
|
@@ -1869,6 +1884,12 @@ module.exports = function(RED) {
|
|
|
1869
1884
|
if(config.measurement_type_thermocouple_active){
|
|
1870
1885
|
promises.measurement_type_thermocouple_23 = node.config_gateway.config_set_measurement_type_thermocouple(mac, parseInt(config.measurement_type_thermocouple));
|
|
1871
1886
|
}
|
|
1887
|
+
if(config.boot_time_4_active){
|
|
1888
|
+
promises.boot_time_4 = node.config_gateway.config_set_boot_time_4(mac, parseInt(config.boot_time_4));
|
|
1889
|
+
}
|
|
1890
|
+
if(config.operation_mode_4_active){
|
|
1891
|
+
promises.operation_mode_4 = node.config_gateway.config_set_operation_mode_4(mac, parseInt(config.operation_mode_4));
|
|
1892
|
+
}
|
|
1872
1893
|
break;
|
|
1873
1894
|
case 24:
|
|
1874
1895
|
if(config.impact_accel_active){
|
|
@@ -2159,11 +2180,20 @@ module.exports = function(RED) {
|
|
|
2159
2180
|
}
|
|
2160
2181
|
break;
|
|
2161
2182
|
case 47:
|
|
2162
|
-
if(config.roll_angle_threshold_47_active){
|
|
2163
|
-
|
|
2183
|
+
// if(config.roll_angle_threshold_47_active){
|
|
2184
|
+
// promises.roll_angle_threshold_47 = node.config_gateway.config_set_roll_threshold_47(mac, parseInt(config.roll_angle_threshold_47));
|
|
2185
|
+
// }
|
|
2186
|
+
// if(config.pitch_angle_threshold_47_active){
|
|
2187
|
+
// promises.pitch_angle_threshold_47 = node.config_gateway.config_set_pitch_threshold_47(mac, parseInt(config.pitch_angle_threshold_47));
|
|
2188
|
+
// }
|
|
2189
|
+
if(config.tilt_mode_47_active){
|
|
2190
|
+
promises.tilt_mode_47 = node.config_gateway.config_set_tilt_mode_47(mac, parseInt(config.tilt_mode_47));
|
|
2164
2191
|
}
|
|
2165
|
-
if(config.
|
|
2166
|
-
promises.
|
|
2192
|
+
if(config.tilt_angle_47_active){
|
|
2193
|
+
promises.tilt_angle_47 = node.config_gateway.config_set_tilt_angle_47(mac, parseInt(config.tilt_angle_47));
|
|
2194
|
+
}
|
|
2195
|
+
if(config.tilt_timer_47_active){
|
|
2196
|
+
promises.tilt_timer_47 = node.config_gateway.config_set_tilt_timer_47(mac, parseInt(config.tilt_timer_47));
|
|
2167
2197
|
}
|
|
2168
2198
|
break;
|
|
2169
2199
|
case 48:
|
|
@@ -2310,6 +2340,24 @@ module.exports = function(RED) {
|
|
|
2310
2340
|
if(config.auto_check_threshold_88_active){
|
|
2311
2341
|
promises.auto_check_threshold_88 = node.config_gateway.config_set_auto_check_threshold_88(mac, parseInt(config.auto_check_threshold_88));
|
|
2312
2342
|
}
|
|
2343
|
+
if(config.sensor_boot_time_420ma_active){
|
|
2344
|
+
promises.sensor_boot_time_420ma = node.config_gateway.config_set_sensor_boot_time_420ma(mac, parseInt(config.sensor_boot_time_420ma));
|
|
2345
|
+
}
|
|
2346
|
+
if(config.low_calibration_420ma_active){
|
|
2347
|
+
promises.low_calibration_420ma = node.config_gateway.config_set_low_calibration_420ma(mac, parseInt(config.low_calibration_420ma));
|
|
2348
|
+
}
|
|
2349
|
+
if(config.mid_calibration_420ma_active){
|
|
2350
|
+
promises.mid_calibration_420ma = node.config_gateway.config_set_mid_calibration_420ma(mac, parseInt(config.mid_calibration_420ma));
|
|
2351
|
+
}
|
|
2352
|
+
if(config.high_calibration_420ma_active){
|
|
2353
|
+
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
2354
|
+
}
|
|
2355
|
+
if(config.fsr_420ma_active){
|
|
2356
|
+
promises.fsr_420ma = node.config_gateway.config_set_fsr_420ma(mac, parseInt(config.fsr_420ma));
|
|
2357
|
+
}
|
|
2358
|
+
if(config.always_on_420ma_active){
|
|
2359
|
+
promises.always_on_420ma = node.config_gateway.config_set_always_on_420ma(mac, parseInt(config.always_on_420ma));
|
|
2360
|
+
}
|
|
2313
2361
|
break;
|
|
2314
2362
|
case 76:
|
|
2315
2363
|
if(config.periodic_check_rate_76_active){
|
|
@@ -2649,12 +2697,12 @@ module.exports = function(RED) {
|
|
|
2649
2697
|
if(config.low_calibration_420ma_active){
|
|
2650
2698
|
promises.low_calibration_420ma = node.config_gateway.config_set_low_calibration_420ma(mac, parseInt(config.low_calibration_420ma));
|
|
2651
2699
|
}
|
|
2652
|
-
if(config.mid_calibration_420ma_active){
|
|
2653
|
-
|
|
2654
|
-
}
|
|
2655
|
-
if(config.high_calibration_420ma_active){
|
|
2656
|
-
|
|
2657
|
-
}
|
|
2700
|
+
// if(config.mid_calibration_420ma_active){
|
|
2701
|
+
// promises.mid_calibration_420ma = node.config_gateway.config_set_mid_calibration_420ma(mac, parseInt(config.mid_calibration_420ma));
|
|
2702
|
+
// }
|
|
2703
|
+
// if(config.high_calibration_420ma_active){
|
|
2704
|
+
// promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
2705
|
+
// }
|
|
2658
2706
|
if(config.auto_check_interval_88_active){
|
|
2659
2707
|
promises.auto_check_interval_88 = node.config_gateway.config_set_auto_check_interval_88(mac, parseInt(config.auto_check_interval_88));
|
|
2660
2708
|
}
|
|
@@ -2888,18 +2936,21 @@ module.exports = function(RED) {
|
|
|
2888
2936
|
if(config.high_calibration_420ma_active){
|
|
2889
2937
|
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
2890
2938
|
}
|
|
2891
|
-
if(config.auto_check_interval_88_active){
|
|
2892
|
-
promises.auto_check_interval_88 = node.config_gateway.config_set_auto_check_interval_88(mac, parseInt(config.auto_check_interval_88));
|
|
2893
|
-
}
|
|
2894
|
-
if(config.auto_check_threshold_88_active){
|
|
2895
|
-
promises.auto_check_threshold_88 = node.config_gateway.config_set_auto_check_threshold_88(mac, parseInt(config.auto_check_threshold_88));
|
|
2896
|
-
}
|
|
2897
2939
|
if(config.fsr_420ma_active){
|
|
2898
2940
|
promises.fsr_420ma = node.config_gateway.config_set_fsr_420ma(mac, parseInt(config.fsr_420ma));
|
|
2899
2941
|
}
|
|
2900
2942
|
if(config.always_on_420ma_active){
|
|
2901
2943
|
promises.always_on_420ma = node.config_gateway.config_set_always_on_420ma(mac, parseInt(config.always_on_420ma));
|
|
2902
2944
|
}
|
|
2945
|
+
if(config.lube_on_time_1_105_active){
|
|
2946
|
+
promises.lube_on_time_1_105 = node.config_gateway.config_set_lube_on_time_1_105(mac, parseInt(config.lube_on_time_1_105));
|
|
2947
|
+
}
|
|
2948
|
+
if(config.faulty_level_105_active){
|
|
2949
|
+
promises.faulty_level_105 = node.config_gateway.config_set_faulty_level_105(mac, parseInt(config.faulty_level_105));
|
|
2950
|
+
}
|
|
2951
|
+
if(config.friction_level_105_active){
|
|
2952
|
+
promises.friction_level_105 = node.config_gateway.config_set_friction_level_105(mac, parseInt(config.friction_level_105));
|
|
2953
|
+
}
|
|
2903
2954
|
break;
|
|
2904
2955
|
case 106:
|
|
2905
2956
|
if(config.sensor_boot_time_420ma_active){
|
|
@@ -2914,18 +2965,24 @@ module.exports = function(RED) {
|
|
|
2914
2965
|
if(config.high_calibration_420ma_active){
|
|
2915
2966
|
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
2916
2967
|
}
|
|
2917
|
-
if(config.auto_check_interval_88_active){
|
|
2918
|
-
promises.auto_check_interval_88 = node.config_gateway.config_set_auto_check_interval_88(mac, parseInt(config.auto_check_interval_88));
|
|
2919
|
-
}
|
|
2920
|
-
if(config.auto_check_threshold_88_active){
|
|
2921
|
-
promises.auto_check_threshold_88 = node.config_gateway.config_set_auto_check_threshold_88(mac, parseInt(config.auto_check_threshold_88));
|
|
2922
|
-
}
|
|
2923
2968
|
if(config.fsr_420ma_active){
|
|
2924
2969
|
promises.fsr_420ma = node.config_gateway.config_set_fsr_420ma(mac, parseInt(config.fsr_420ma));
|
|
2925
2970
|
}
|
|
2926
2971
|
if(config.always_on_420ma_active){
|
|
2927
2972
|
promises.always_on_420ma = node.config_gateway.config_set_always_on_420ma(mac, parseInt(config.always_on_420ma));
|
|
2928
2973
|
}
|
|
2974
|
+
if(config.lube_on_time_1_105_active){
|
|
2975
|
+
promises.lube_on_time_1_105 = node.config_gateway.config_set_lube_on_time_1_105(mac, parseInt(config.lube_on_time_1_105));
|
|
2976
|
+
}
|
|
2977
|
+
if(config.lube_on_time_2_105_active){
|
|
2978
|
+
promises.lube_on_time_2_105 = node.config_gateway.config_set_lube_on_time_2_105(mac, parseInt(config.lube_on_time_2_105));
|
|
2979
|
+
}
|
|
2980
|
+
if(config.faulty_level_105_active){
|
|
2981
|
+
promises.faulty_level_105 = node.config_gateway.config_set_faulty_level_105(mac, parseInt(config.faulty_level_105));
|
|
2982
|
+
}
|
|
2983
|
+
if(config.friction_level_105_active){
|
|
2984
|
+
promises.friction_level_105 = node.config_gateway.config_set_friction_level_105(mac, parseInt(config.friction_level_105));
|
|
2985
|
+
}
|
|
2929
2986
|
break;
|
|
2930
2987
|
case 107:
|
|
2931
2988
|
if(config.sensor_boot_time_420ma_active){
|
|
@@ -3377,6 +3434,14 @@ module.exports = function(RED) {
|
|
|
3377
3434
|
promises.max_num_motion_tx_delay_114 = node.config_gateway.config_set_max_num_motion_tx_delay_110(mac, parseInt(config.max_num_motion_tx_delay_110));
|
|
3378
3435
|
}
|
|
3379
3436
|
break;
|
|
3437
|
+
case 115:
|
|
3438
|
+
if(config.vibration_mode_115_active){
|
|
3439
|
+
promises.vibration_mode_115 = node.config_gateway.config_set_vibration_mode_115(mac, parseInt(config.vibration_mode_115));
|
|
3440
|
+
}
|
|
3441
|
+
if(config.offset_mode_115_active){
|
|
3442
|
+
promises.offset_mode_115 = node.config_gateway.config_set_offset_mode_115(mac, parseInt(config.offset_mode_115));
|
|
3443
|
+
}
|
|
3444
|
+
break;
|
|
3380
3445
|
case 118:
|
|
3381
3446
|
if(config.pressure_sensor_fs_ch1_118_active){
|
|
3382
3447
|
promises.pressure_sensor_fs_ch1_118 = node.config_gateway.config_set_pressure_sensor_fs_ch1_118(mac, parseInt(config.pressure_sensor_fs_ch1_118));
|
|
@@ -4016,12 +4081,12 @@ module.exports = function(RED) {
|
|
|
4016
4081
|
if(config.flow_dev_addr_536_active){
|
|
4017
4082
|
promises.flow_dev_addr_536 = node.config_gateway.config_set_flow_dev_addr_536(mac, parseInt(config.flow_addr_1_536), parseInt(config.flow_addr_2_536), parseInt(config.flow_addr_3_536), parseInt(config.flow_addr_4_536));
|
|
4018
4083
|
}
|
|
4019
|
-
if(config.oxygen_rate_536_active){
|
|
4020
|
-
|
|
4021
|
-
}
|
|
4022
|
-
if(config.oxygen_timeout_536_active){
|
|
4023
|
-
|
|
4024
|
-
}
|
|
4084
|
+
// if(config.oxygen_rate_536_active){
|
|
4085
|
+
// promises.oxygen_rate_536 = node.config_gateway.config_set_oxygen_rate_536(mac, parseInt(config.oxygen_rate_536));
|
|
4086
|
+
// }
|
|
4087
|
+
// if(config.oxygen_timeout_536_active){
|
|
4088
|
+
// promises.oxygen_timeout_536 = node.config_gateway.config_set_oxygen_timeout_536(mac, parseInt(config.oxygen_timeout_536));
|
|
4089
|
+
// }
|
|
4025
4090
|
if(config.oxygen_max_threshold_s1_536_active){
|
|
4026
4091
|
promises.oxygen_max_threshold_s1_536 = node.config_gateway.config_set_oxygen_max_threshold_s1_536(mac, parseInt(config.oxygen_max_threshold_s1_536));
|
|
4027
4092
|
}
|
|
@@ -4046,6 +4111,24 @@ module.exports = function(RED) {
|
|
|
4046
4111
|
if(config.oxygen_min_threshold_s4_536_active){
|
|
4047
4112
|
promises.oxygen_min_threshold_s4_536 = node.config_gateway.config_set_oxygen_min_threshold_s4_536(mac, parseInt(config.oxygen_min_threshold_s4_536));
|
|
4048
4113
|
}
|
|
4114
|
+
if(config.flow_sensor_baud_rate_536_active){
|
|
4115
|
+
promises.flow_sensor_baud_rate_536 = node.config_gateway.config_set_flow_sensor_baud_rate_536(mac, parseInt(config.flow_sensor_baud_rate_536));
|
|
4116
|
+
}
|
|
4117
|
+
if(config.oxygen_sensor_baud_rate_536_active){
|
|
4118
|
+
promises.oxygen_sensor_baud_rate_536 = node.config_gateway.config_set_oxygen_sensor_baud_rate_536(mac, parseInt(config.oxygen_sensor_baud_rate_536));
|
|
4119
|
+
}
|
|
4120
|
+
if(config.flow_sensor_parity_bits_536_active){
|
|
4121
|
+
promises.flow_sensor_parity_bits_536 = node.config_gateway.config_set_flow_sensor_parity_bits_536(mac, parseInt(config.flow_sensor_parity_bits_536));
|
|
4122
|
+
}
|
|
4123
|
+
if(config.oxygen_sensor_parity_bits_536_active){
|
|
4124
|
+
promises.oxygen_sensor_parity_bits_536 = node.config_gateway.config_set_oxygen_sensor_parity_bits_536(mac, parseInt(config.oxygen_sensor_parity_bits_536));
|
|
4125
|
+
}
|
|
4126
|
+
if(config.flow_sensor_stop_bits_536_active){
|
|
4127
|
+
promises.flow_sensor_stop_bits_536 = node.config_gateway.config_set_flow_sensor_stop_bits_536(mac, parseInt(config.flow_sensor_stop_bits_536));
|
|
4128
|
+
}
|
|
4129
|
+
if(config.oxygen_sensor_stop_bits_536_active){
|
|
4130
|
+
promises.oxygen_sensor_stop_bits_536 = node.config_gateway.config_set_oxygen_sensor_stop_bits_536(mac, parseInt(config.oxygen_sensor_stop_bits_536));
|
|
4131
|
+
}
|
|
4049
4132
|
break;
|
|
4050
4133
|
case 537:
|
|
4051
4134
|
if(config.output_data_rate_101_active){
|
|
@@ -4319,6 +4402,13 @@ module.exports = function(RED) {
|
|
|
4319
4402
|
if(config.flow_unit_545_active){
|
|
4320
4403
|
promises.flow_unit_545 = node.config_gateway.config_set_flow_unit_545(mac, parseInt(config.flow_unit_545));
|
|
4321
4404
|
}
|
|
4405
|
+
if(config.reset_total_545_active){
|
|
4406
|
+
promises.reset_total_545 = node.config_gateway.config_set_reset_total_545(mac);
|
|
4407
|
+
}
|
|
4408
|
+
if(config.cal_validation_545_active){
|
|
4409
|
+
promises.cal_validation_545 = node.config_gateway.config_set_cal_validation_545(mac);
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4322
4412
|
if(config.gas_type_545_active){
|
|
4323
4413
|
promises.gas_type_545 = node.config_gateway.config_set_gas_type_545(mac, parseInt(config.gas_type_545));
|
|
4324
4414
|
}
|
|
@@ -4334,22 +4424,28 @@ module.exports = function(RED) {
|
|
|
4334
4424
|
break;
|
|
4335
4425
|
case 1010:
|
|
4336
4426
|
if(config.stay_on_mode_539_active){
|
|
4337
|
-
promises.
|
|
4427
|
+
promises.stay_on_mode_1010 = node.config_gateway.config_set_stay_on_mode_539(mac, parseInt(config.stay_on_mode_539));
|
|
4338
4428
|
}
|
|
4339
4429
|
if(config.baudrate_539_active){
|
|
4340
|
-
promises.
|
|
4430
|
+
promises.baudrate_1010 = node.config_gateway.config_set_baudrate_539(mac, parseInt(config.baudrate_539));
|
|
4341
4431
|
}
|
|
4342
|
-
if(config.
|
|
4343
|
-
promises.
|
|
4432
|
+
if(config.rx485_timeout_1011_active){
|
|
4433
|
+
promises.rx485_timeout_1010 = node.config_gateway.config_set_rx485_timeout_1011(mac, parseInt(config.rx485_timeout_1011));
|
|
4434
|
+
}
|
|
4435
|
+
if(config.mode_1011_active){
|
|
4436
|
+
promises.mode_1010 = node.config_gateway.config_set_mode_1011(mac, parseInt(config.mode_1011));
|
|
4437
|
+
}
|
|
4438
|
+
if(config.auto_address_timeout_1011_active){
|
|
4439
|
+
promises.auto_address_timeout_1010 = node.config_gateway.config_set_auto_address_timeout_1011(mac, parseInt(config.auto_address_timeout_1011));
|
|
4344
4440
|
}
|
|
4345
4441
|
if(config.stop_bit_1011_active){
|
|
4346
|
-
promises.
|
|
4442
|
+
promises.stop_bit_1010 = node.config_gateway.config_set_stop_bit_1011(mac, parseInt(config.stop_bit_1011));
|
|
4347
4443
|
}
|
|
4348
4444
|
if(config.set_parity_1011_active){
|
|
4349
|
-
promises.
|
|
4445
|
+
promises.set_parity_1010 = node.config_gateway.config_set_parity_1011(mac, parseInt(config.set_parity_1011));
|
|
4350
4446
|
}
|
|
4351
4447
|
if(config.reboot_1011){
|
|
4352
|
-
promises.
|
|
4448
|
+
promises.reboot_1010 = node.config_gateway.config_set_reboot_1011(mac);
|
|
4353
4449
|
}
|
|
4354
4450
|
break;
|
|
4355
4451
|
case 1011:
|
|
@@ -4481,10 +4577,14 @@ module.exports = function(RED) {
|
|
|
4481
4577
|
console.log(html_map);
|
|
4482
4578
|
|
|
4483
4579
|
let update_flag = false;
|
|
4580
|
+
let reboot = false;
|
|
4484
4581
|
for(let key in html_map){
|
|
4485
4582
|
if(html_map[key].html_value != node.gateway_node.sensor_configs[data.payload.address].reported_configs[key]){
|
|
4486
4583
|
// console.log('Comparing ' + html_map[key].html_value + ' to ' + node.gateway_node.sensor_configs[data.payload.address].reported_configs[key]);
|
|
4487
4584
|
// console.log('Value is different, updating config for ' + key);
|
|
4585
|
+
if(key == 'network_id'){
|
|
4586
|
+
reboot = true;
|
|
4587
|
+
}
|
|
4488
4588
|
update_flag = true;
|
|
4489
4589
|
break;
|
|
4490
4590
|
}
|
|
@@ -4502,6 +4602,16 @@ module.exports = function(RED) {
|
|
|
4502
4602
|
}, 20000);
|
|
4503
4603
|
promises.send_sync_configs = this.config_gateway.send_sync_config_wireless_node(data, html_map, node.gateway_node.sensor_configs[data.payload.address]);
|
|
4504
4604
|
|
|
4605
|
+
let original_otf_devices = [53, 80, 81, 82, 83, 84, 87, 101, 102, 103, 110, 111, 112, 114, 117, 180, 181, 518, 519, 520, 538];
|
|
4606
|
+
if(reboot){
|
|
4607
|
+
promises.reboot_sensor = node.gateway.config_reboot_sensor(data.payload.address);
|
|
4608
|
+
} else {
|
|
4609
|
+
if(original_otf_devices.includes(data.payload.sensor_type)){
|
|
4610
|
+
promises.exit_otn_mode = node.gateway.config_exit_otn_mode(data.payload.address);
|
|
4611
|
+
}else{
|
|
4612
|
+
promises.config_exit_otn_mode_common = node.gateway.config_exit_otn_mode_common(data.payload.address);
|
|
4613
|
+
}
|
|
4614
|
+
}
|
|
4505
4615
|
promises.finish = new Promise((fulfill, reject) => {
|
|
4506
4616
|
node.config_gateway.queue.add(() => {
|
|
4507
4617
|
return new Promise((f, r) => {
|