@ncd-io/node-red-enterprise-sensors 1.4.1 → 1.4.2
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 +2090 -868
- package/package.json +1 -1
- package/wireless.html +731 -27
- package/wireless.js +229 -27
package/wireless.js
CHANGED
|
@@ -142,28 +142,32 @@ module.exports = function(RED) {
|
|
|
142
142
|
// IF we receive an FON message with success
|
|
143
143
|
if(Object.hasOwn(res, 'data') && res.data[0] == 70 && res.data[1] == 79 && res.data[2] == 78 && res.result == 255){
|
|
144
144
|
manifest_data.enter_ota_fota_version = res.original.data[5];
|
|
145
|
-
|
|
145
|
+
manifest_data.enter_ota_success = true;
|
|
146
146
|
console.log(res);
|
|
147
|
+
}else{
|
|
148
|
+
manifest_data.enter_ota_success = false;
|
|
147
149
|
}
|
|
148
150
|
console.log(name);
|
|
149
151
|
} else{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if(manifest_data.enter_ota_fota_version > 16){
|
|
154
|
-
console.log('V17 PROCESS');
|
|
152
|
+
if(manifest_data.enter_ota_success){
|
|
153
|
+
// enter ota mode
|
|
154
|
+
node.gateway.digi.send.at_command("ID", [0x7a, 0xaa]).then().catch().then(() => {
|
|
155
155
|
console.log(manifest_data);
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
if(manifest_data.enter_ota_fota_version > 16){
|
|
157
|
+
console.log('V17 PROCESS');
|
|
158
|
+
console.log(manifest_data);
|
|
159
|
+
node.start_firmware_update_v17(manifest_data, firmware_data);
|
|
160
|
+
}else if(manifest_data.enter_ota_fota_version > 12){
|
|
161
|
+
console.log('V13 PROCESS');
|
|
162
|
+
console.log(manifest_data);
|
|
163
|
+
node.start_firmware_update_v13(manifest_data, firmware_data);
|
|
164
|
+
}else{
|
|
165
|
+
console.log('OLD PROCESSS');
|
|
166
|
+
console.log(manifest_data);
|
|
167
|
+
node.start_firmware_update(manifest_data, firmware_data);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
167
171
|
}
|
|
168
172
|
}).catch((err) => {
|
|
169
173
|
console.log(err);
|
|
@@ -1043,7 +1047,7 @@ module.exports = function(RED) {
|
|
|
1043
1047
|
|
|
1044
1048
|
var promises = {};
|
|
1045
1049
|
// This command is used for OTF on types 53, 80,81,82,83,84, 101, 102, 110, 111, 518, 519
|
|
1046
|
-
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 110, 111, 112, 114, 117, 180, 181, 518, 519, 520, 538];
|
|
1050
|
+
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];
|
|
1047
1051
|
if(original_otf_devices.includes(sensor.type)){
|
|
1048
1052
|
// This command is used for OTF on types 53, 80, 81, 82, 83, 84, 101, 102, 110, 111, 518, 519
|
|
1049
1053
|
promises.config_enter_otn_mode = node.config_gateway.config_enter_otn_mode(sensor.mac);
|
|
@@ -1675,6 +1679,9 @@ module.exports = function(RED) {
|
|
|
1675
1679
|
if(config.sampling_rate_duration_active){
|
|
1676
1680
|
promises.sampling_rate_duration = node.config_gateway.config_set_sampling_rate_duration(mac, parseInt(config.sampling_rate_duration));
|
|
1677
1681
|
}
|
|
1682
|
+
if(config.start_sps30_fan_cleaning_53){
|
|
1683
|
+
promises.start_sps30_fan_cleaning_53 = node.config_gateway.config_set_start_sps30_fan_cleaning_53(mac);
|
|
1684
|
+
}
|
|
1678
1685
|
break;
|
|
1679
1686
|
case 56:
|
|
1680
1687
|
if(config.sensor_boot_time_420ma_active){
|
|
@@ -1761,8 +1768,8 @@ module.exports = function(RED) {
|
|
|
1761
1768
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1762
1769
|
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);
|
|
1763
1770
|
}
|
|
1764
|
-
if(config.
|
|
1765
|
-
promises.
|
|
1771
|
+
if(config.sampling_interval_80_active){
|
|
1772
|
+
promises.sampling_interval = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_80));
|
|
1766
1773
|
}
|
|
1767
1774
|
if(config.full_scale_range_101_active){
|
|
1768
1775
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1811,8 +1818,8 @@ module.exports = function(RED) {
|
|
|
1811
1818
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1812
1819
|
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);
|
|
1813
1820
|
}
|
|
1814
|
-
if(config.
|
|
1815
|
-
promises.
|
|
1821
|
+
if(config.sampling_interval_80_active){
|
|
1822
|
+
promises.sampling_interval = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_80));
|
|
1816
1823
|
}
|
|
1817
1824
|
if(config.full_scale_range_101_active){
|
|
1818
1825
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1864,8 +1871,8 @@ module.exports = function(RED) {
|
|
|
1864
1871
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1865
1872
|
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);
|
|
1866
1873
|
}
|
|
1867
|
-
if(config.
|
|
1868
|
-
promises.
|
|
1874
|
+
if(config.sampling_interval_80_active){
|
|
1875
|
+
promises.sampling_interval = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_80));
|
|
1869
1876
|
}
|
|
1870
1877
|
if(config.full_scale_range_101_active){
|
|
1871
1878
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1908,8 +1915,8 @@ module.exports = function(RED) {
|
|
|
1908
1915
|
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
1909
1916
|
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);
|
|
1910
1917
|
}
|
|
1911
|
-
if(config.
|
|
1912
|
-
promises.
|
|
1918
|
+
if(config.sampling_interval_80_active){
|
|
1919
|
+
promises.sampling_interval = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_80));
|
|
1913
1920
|
}
|
|
1914
1921
|
if(config.full_scale_range_101_active){
|
|
1915
1922
|
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
@@ -1980,6 +1987,26 @@ module.exports = function(RED) {
|
|
|
1980
1987
|
promises.always_on_420ma = node.config_gateway.config_set_always_on_420ma(mac, parseInt(config.always_on_420ma));
|
|
1981
1988
|
}
|
|
1982
1989
|
break;
|
|
1990
|
+
case 87:
|
|
1991
|
+
if(config.ct_constant_87_active){
|
|
1992
|
+
promises.ct_constant_87 = node.config_gateway.config_set_ct_constant_87(mac, parseInt(config.ct_constant_87));
|
|
1993
|
+
}
|
|
1994
|
+
if(config.deadband_87_active){
|
|
1995
|
+
promises.deadband_87 = node.config_gateway.config_set_deadband_87(mac, parseInt(config.deadband_87));
|
|
1996
|
+
}
|
|
1997
|
+
if(config.sampling_frequency_87_active){
|
|
1998
|
+
promises.sampling_frequency_87 = node.config_gateway.config_set_sampling_frequency_87(mac, parseInt(config.sampling_frequency_87));
|
|
1999
|
+
}
|
|
2000
|
+
if(config.raw_length_87_active){
|
|
2001
|
+
promises.raw_length_87 = node.config_gateway.config_set_raw_length_87(mac, parseInt(config.raw_length_87));
|
|
2002
|
+
}
|
|
2003
|
+
if(config.stay_on_mode_539_active){
|
|
2004
|
+
promises.stay_on_mode_87 = node.config_gateway.config_set_stay_on_mode_539(mac, parseInt(config.stay_on_mode_539));
|
|
2005
|
+
}
|
|
2006
|
+
if(config.quality_of_service_121_active){
|
|
2007
|
+
promises.quality_of_service_87 = node.config_gateway.config_set_quality_of_service_121(mac, parseInt(config.quality_of_service_121));
|
|
2008
|
+
}
|
|
2009
|
+
break;
|
|
1983
2010
|
case 88:
|
|
1984
2011
|
if(config.sensor_boot_time_420ma_active){
|
|
1985
2012
|
promises.sensor_boot_time_420ma = node.config_gateway.config_set_sensor_boot_time_420ma(mac, parseInt(config.sensor_boot_time_420ma));
|
|
@@ -2202,6 +2229,35 @@ module.exports = function(RED) {
|
|
|
2202
2229
|
// }
|
|
2203
2230
|
// promises.set_rtc_101 = node.config_gateway.config_set_rtc_101(mac);
|
|
2204
2231
|
break;
|
|
2232
|
+
case 103:
|
|
2233
|
+
if(config.output_data_rate_103_active){
|
|
2234
|
+
promises.output_data_rate_103 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_103));
|
|
2235
|
+
}
|
|
2236
|
+
if(config.sampling_interval_101_active){
|
|
2237
|
+
promises.sampling_interval_103 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_101));
|
|
2238
|
+
}
|
|
2239
|
+
if(config.acc_threshold_103_active){
|
|
2240
|
+
promises.acc_threshold_103 = node.config_gateway.config_set_acc_threshold_103(mac, parseInt(config.acc_threshold_103));
|
|
2241
|
+
}
|
|
2242
|
+
if(config.enable_sensor_103_active){
|
|
2243
|
+
promises.enable_sensor_103 = node.config_gateway.config_set_enable_sensor_103(mac, parseInt(config.enable_sensor_103));
|
|
2244
|
+
}
|
|
2245
|
+
if(config.enable_hp_filter_cutoff_103_active){
|
|
2246
|
+
promises.enable_hp_filter_cutoff_103 = node.config_gateway.config_set_enable_hp_filter_cutoff_103(mac, parseInt(config.enable_hp_filter_cutoff_103));
|
|
2247
|
+
}
|
|
2248
|
+
if(config.gyro_fsr_103_active){
|
|
2249
|
+
promises.gyro_fsr_103 = node.config_gateway.config_set_gyro_fsr_103(mac, parseInt(config.gyro_fsr_103));
|
|
2250
|
+
}
|
|
2251
|
+
if(config.adxl_fsr_103_active){
|
|
2252
|
+
promises.adxl_fsr_103 = node.config_gateway.config_set_adxl_fsr_103(mac, parseInt(config.adxl_fsr_103));
|
|
2253
|
+
}
|
|
2254
|
+
if(config.sampling_duration_103_active){
|
|
2255
|
+
promises.sampling_duration_103 = node.config_gateway.config_set_sampling_duration_101(mac, parseInt(config.sampling_duration_103));
|
|
2256
|
+
}
|
|
2257
|
+
if(config.set_rtc_101){
|
|
2258
|
+
promises.set_rtc_103 = node.config_gateway.config_set_rtc_101(mac);
|
|
2259
|
+
}
|
|
2260
|
+
break;
|
|
2205
2261
|
case 105:
|
|
2206
2262
|
if(config.sensor_boot_time_420ma_active){
|
|
2207
2263
|
promises.sensor_boot_time_420ma = node.config_gateway.config_set_sensor_boot_time_420ma(mac, parseInt(config.sensor_boot_time_420ma));
|
|
@@ -2293,6 +2349,9 @@ module.exports = function(RED) {
|
|
|
2293
2349
|
if(config.debounce_time_108_active){
|
|
2294
2350
|
promises.debounce_time_108 = node.config_gateway.config_set_debounce_time_108(mac, parseInt(config.debounce_time_108));
|
|
2295
2351
|
}
|
|
2352
|
+
if(config.debounce_time_v10_108_active){
|
|
2353
|
+
promises.debounce_time_v10_108 = node.config_gateway.config_set_debounce_time_v10_108(mac, parseInt(config.debounce_time_v10_108));
|
|
2354
|
+
}
|
|
2296
2355
|
if(config.input_one_108_active){
|
|
2297
2356
|
promises.input_one_108 = node.config_gateway.config_set_input_one_108(mac, parseInt(config.input_one_108));
|
|
2298
2357
|
}
|
|
@@ -2344,6 +2403,9 @@ module.exports = function(RED) {
|
|
|
2344
2403
|
if(config.sample_rate_108_active){
|
|
2345
2404
|
promises.sample_rate_108 = node.config_gateway.config_set_sample_rate_108(mac, parseInt(config.sample_rate_108));
|
|
2346
2405
|
}
|
|
2406
|
+
if(config.interrupt_timeout_108_active){
|
|
2407
|
+
promises.interrupt_timeout_108 = node.config_gateway.config_set_interrupt_timeout_108(mac, parseInt(config.interrupt_timeout_108));
|
|
2408
|
+
}
|
|
2347
2409
|
break;
|
|
2348
2410
|
case 110:
|
|
2349
2411
|
if(config.odr_p1_110_active){
|
|
@@ -2412,6 +2474,12 @@ module.exports = function(RED) {
|
|
|
2412
2474
|
if(config.max_raw_sample_110_active){
|
|
2413
2475
|
promises.max_raw_sample_110 = node.config_gateway.config_set_max_raw_sample_110(mac, parseInt(config.max_raw_sample_110));
|
|
2414
2476
|
}
|
|
2477
|
+
if(config.motion_to_sampling_delay_110_active){
|
|
2478
|
+
promises.motion_to_sampling_delay_110 = node.config_gateway.config_set_motion_to_sampling_delay_110(mac, parseInt(config.motion_to_sampling_delay_110));
|
|
2479
|
+
}
|
|
2480
|
+
if(config.max_num_motion_tx_delay_110_active){
|
|
2481
|
+
promises.max_num_motion_tx_delay_110 = node.config_gateway.config_set_max_num_motion_tx_delay_110(mac, parseInt(config.max_num_motion_tx_delay_110));
|
|
2482
|
+
}
|
|
2415
2483
|
break;
|
|
2416
2484
|
case 111:
|
|
2417
2485
|
if(config.odr_p1_110_active){
|
|
@@ -2498,6 +2566,12 @@ module.exports = function(RED) {
|
|
|
2498
2566
|
if(config.max_raw_sample_110_active){
|
|
2499
2567
|
promises.max_raw_sample_110 = node.config_gateway.config_set_max_raw_sample_110(mac, parseInt(config.max_raw_sample_110));
|
|
2500
2568
|
}
|
|
2569
|
+
if(config.motion_to_sampling_delay_110_active){
|
|
2570
|
+
promises.motion_to_sampling_delay_111 = node.config_gateway.config_set_motion_to_sampling_delay_110(mac, parseInt(config.motion_to_sampling_delay_110));
|
|
2571
|
+
}
|
|
2572
|
+
if(config.max_num_motion_tx_delay_110_active){
|
|
2573
|
+
promises.max_num_motion_tx_delay_111 = node.config_gateway.config_set_max_num_motion_tx_delay_110(mac, parseInt(config.max_num_motion_tx_delay_110));
|
|
2574
|
+
}
|
|
2501
2575
|
break;
|
|
2502
2576
|
case 112:
|
|
2503
2577
|
if(config.current_calibration_82_active){
|
|
@@ -2590,6 +2664,12 @@ module.exports = function(RED) {
|
|
|
2590
2664
|
if(config.max_raw_sample_110_active){
|
|
2591
2665
|
promises.max_raw_sample_110 = node.config_gateway.config_set_max_raw_sample_110(mac, parseInt(config.max_raw_sample_110));
|
|
2592
2666
|
}
|
|
2667
|
+
if(config.motion_to_sampling_delay_110_active){
|
|
2668
|
+
promises.motion_to_sampling_delay_112 = node.config_gateway.config_set_motion_to_sampling_delay_110(mac, parseInt(config.motion_to_sampling_delay_110));
|
|
2669
|
+
}
|
|
2670
|
+
if(config.max_num_motion_tx_delay_110_active){
|
|
2671
|
+
promises.max_num_motion_tx_delay_112 = node.config_gateway.config_set_max_num_motion_tx_delay_110(mac, parseInt(config.max_num_motion_tx_delay_110));
|
|
2672
|
+
}
|
|
2593
2673
|
break;
|
|
2594
2674
|
case 114:
|
|
2595
2675
|
if(config.odr_p1_110_active){
|
|
@@ -2667,6 +2747,12 @@ module.exports = function(RED) {
|
|
|
2667
2747
|
if(config.max_raw_sample_110_active){
|
|
2668
2748
|
promises.max_raw_sample_110 = node.config_gateway.config_set_max_raw_sample_110(mac, parseInt(config.max_raw_sample_110));
|
|
2669
2749
|
}
|
|
2750
|
+
if(config.motion_to_sampling_delay_110_active){
|
|
2751
|
+
promises.motion_to_sampling_delay_114 = node.config_gateway.config_set_motion_to_sampling_delay_110(mac, parseInt(config.motion_to_sampling_delay_110));
|
|
2752
|
+
}
|
|
2753
|
+
if(config.max_num_motion_tx_delay_110_active){
|
|
2754
|
+
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));
|
|
2755
|
+
}
|
|
2670
2756
|
break;
|
|
2671
2757
|
case 118:
|
|
2672
2758
|
if(config.pressure_sensor_fs_ch1_118_active){
|
|
@@ -2736,6 +2822,62 @@ module.exports = function(RED) {
|
|
|
2736
2822
|
promises.always_on_420ma = node.config_gateway.config_set_always_on_420ma(mac, parseInt(config.always_on_420ma));
|
|
2737
2823
|
}
|
|
2738
2824
|
break;
|
|
2825
|
+
case 123:
|
|
2826
|
+
if(config.clear_timers_123_active){
|
|
2827
|
+
promises.clear_timers_123 = node.config_gateway.config_set_clear_timers_108(mac, parseInt(config.clear_timers_123));
|
|
2828
|
+
}
|
|
2829
|
+
if(config.debounce_time_123_active){
|
|
2830
|
+
promises.debounce_time_123 = node.config_gateway.config_set_debounce_time_v10_108(mac, parseInt(config.debounce_time_123));
|
|
2831
|
+
}
|
|
2832
|
+
if(config.input_one_123_active){
|
|
2833
|
+
promises.input_one_123 = node.config_gateway.config_set_input_one_108(mac, parseInt(config.input_one_123));
|
|
2834
|
+
}
|
|
2835
|
+
if(config.input_two_123_active){
|
|
2836
|
+
promises.input_two_123 = node.config_gateway.config_set_input_two_108(mac, parseInt(config.input_two_123));
|
|
2837
|
+
}
|
|
2838
|
+
if(config.input_three_123_active){
|
|
2839
|
+
promises.input_three_123 = node.config_gateway.config_set_input_three_108(mac, parseInt(config.input_three_123));
|
|
2840
|
+
}
|
|
2841
|
+
if(config.counter_threshold_108_active){
|
|
2842
|
+
promises.counter_threshold_123 = node.config_gateway.config_set_counter_threshold_108(mac, parseInt(config.counter_threshold_108));
|
|
2843
|
+
}
|
|
2844
|
+
if(config.push_notification_123_active){
|
|
2845
|
+
promises.push_notification_123 = node.config_gateway.config_set_push_notification_108(mac, parseInt(config.push_notification_123));
|
|
2846
|
+
}
|
|
2847
|
+
if(config.reset_timeout_108_active){
|
|
2848
|
+
promises.reset_timeout_123 = node.config_gateway.config_set_reset_timeout_108(mac, parseInt(config.reset_timeout_108));
|
|
2849
|
+
}
|
|
2850
|
+
if(config.reset_mode_to_disabled_108_active){
|
|
2851
|
+
promises.reset_mode_123 = node.config_gateway.config_set_reset_mode_to_disabled_108(mac, parseInt(config.reset_mode_to_disabled_108));
|
|
2852
|
+
}
|
|
2853
|
+
if(config.rtc_108){
|
|
2854
|
+
promises.rtc_123 = node.config_gateway.config_set_rtc_108(mac);
|
|
2855
|
+
}
|
|
2856
|
+
if(config.transmission_interval_108_active){
|
|
2857
|
+
promises.transmission_interval_123 = node.config_gateway.config_set_transmission_interval_108(mac, parseInt(config.transmission_interval_108));
|
|
2858
|
+
}
|
|
2859
|
+
if(config.shift_one_108_active){
|
|
2860
|
+
promises.shift_time1_123 = node.config_gateway.config_set_shift_one_108(mac, parseInt(config.shift_one_hours_108), parseInt(config.shift_one_minutes_108));
|
|
2861
|
+
}
|
|
2862
|
+
if(config.shift_two_108_active){
|
|
2863
|
+
promises.shift_time2_123 = node.config_gateway.config_set_shift_two_108(mac, parseInt(config.shift_two_hours_108), parseInt(config.shift_two_minutes_108));
|
|
2864
|
+
}
|
|
2865
|
+
if(config.shift_three_108_active){
|
|
2866
|
+
promises.shift_time3_123 = node.config_gateway.config_set_shift_three_108(mac, parseInt(config.shift_three_hours_108), parseInt(config.shift_three_minutes_108));
|
|
2867
|
+
}
|
|
2868
|
+
if(config.shift_four_108_active){
|
|
2869
|
+
promises.shift_time4_123 = node.config_gateway.config_set_shift_four_108(mac, parseInt(config.shift_four_hours_108), parseInt(config.shift_four_minutes_108));
|
|
2870
|
+
}
|
|
2871
|
+
if(config.quality_of_service_108_active){
|
|
2872
|
+
promises.quality_of_service_123 = node.config_gateway.config_set_quality_of_service_108(mac, parseInt(config.quality_of_service_108));
|
|
2873
|
+
}
|
|
2874
|
+
if(config.fly_interval_108_active){
|
|
2875
|
+
promises.fly_interval_123 = node.config_gateway.config_set_fly_interval_108(mac, parseInt(config.fly_interval_108));
|
|
2876
|
+
}
|
|
2877
|
+
if(config.interrupt_timeout_108_active){
|
|
2878
|
+
promises.interrupt_timeout_123 = node.config_gateway.config_set_interrupt_timeout_108(mac, parseInt(config.interrupt_timeout_108));
|
|
2879
|
+
}
|
|
2880
|
+
break;
|
|
2739
2881
|
case 180:
|
|
2740
2882
|
if(config.output_data_rate_101_active){
|
|
2741
2883
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
@@ -2864,6 +3006,17 @@ module.exports = function(RED) {
|
|
|
2864
3006
|
promises.probe_boot_time_202 = node.config_gateway.config_set_probe_boot_time_202(mac, parseInt(config.probe_boot_time_202));
|
|
2865
3007
|
}
|
|
2866
3008
|
break;
|
|
3009
|
+
case 211:
|
|
3010
|
+
if(config.oxygen_rate_211_active){
|
|
3011
|
+
promises.oxygen_rate_211 = node.config_gateway.config_set_oxygen_rate_211(mac, parseInt(config.oxygen_rate_211));
|
|
3012
|
+
}
|
|
3013
|
+
if(config.oxygen_timeout_211_active){
|
|
3014
|
+
promises.oxygen_timeout_211 = node.config_gateway.config_set_oxygen_timeout_211(mac, parseInt(config.oxygen_timeout_211));
|
|
3015
|
+
}
|
|
3016
|
+
if(config.oxygen_threshold_211_active){
|
|
3017
|
+
promises.oxygen_threshold_211 = node.config_gateway.config_set_oxygen_threshold_211(mac, parseInt(config.oxygen_threshold_211));
|
|
3018
|
+
}
|
|
3019
|
+
break;
|
|
2867
3020
|
case 217:
|
|
2868
3021
|
if(config.tare_the_scale_217){
|
|
2869
3022
|
promises.tare_the_scale_217 = node.config_gateway.config_set_tare_the_scale_217(mac);
|
|
@@ -2872,6 +3025,23 @@ module.exports = function(RED) {
|
|
|
2872
3025
|
promises.weight_calib_217 = node.config_gateway.config_set_weight_calib_217(mac, parseInt(config.weight_calib_217));
|
|
2873
3026
|
}
|
|
2874
3027
|
break;
|
|
3028
|
+
case 270:
|
|
3029
|
+
// if(config.do_read_rate_270_active){
|
|
3030
|
+
// promises.sensors_read_rate_270 = node.config_gateway.config_set_do_read_rate_270(mac, parseInt(config.do_read_rate_270));
|
|
3031
|
+
// }
|
|
3032
|
+
if(config.do_boot_time_270_active){
|
|
3033
|
+
promises.do_boot_time_270 = node.config_gateway.config_set_do_boot_time_270(mac, parseInt(config.do_boot_time_270));
|
|
3034
|
+
}
|
|
3035
|
+
if(config.do_dev_id_270_active){
|
|
3036
|
+
promises.do_dev_id_270 = node.config_gateway.config_set_do_dev_id_270(mac, parseInt(config.do_dev_id_1_270), parseInt(config.do_dev_id_2_270), parseInt(config.do_dev_id_3_270), parseInt(config.do_dev_id_4_270));
|
|
3037
|
+
}
|
|
3038
|
+
if(config.ec_boot_time_270_active){
|
|
3039
|
+
promises.ec_boot_time_270 = node.config_gateway.config_set_ec_boot_time_270(mac, parseInt(config.ec_boot_time_270));
|
|
3040
|
+
}
|
|
3041
|
+
if(config.ec_dev_id_270_active){
|
|
3042
|
+
promises.ec_dev_id_270 = node.config_gateway.config_set_ec_dev_id_270(mac, parseInt(config.ec_dev_id_1_270), parseInt(config.ec_dev_id_2_270), parseInt(config.ec_dev_id_3_270), parseInt(config.ec_dev_id_4_270));
|
|
3043
|
+
}
|
|
3044
|
+
break;
|
|
2875
3045
|
case 505:
|
|
2876
3046
|
if(config.current_calibration_c1_80_active){
|
|
2877
3047
|
promises.current_calibration_c1_80_active = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
@@ -3122,6 +3292,38 @@ module.exports = function(RED) {
|
|
|
3122
3292
|
promises.always_on_420ma = node.config_gateway.config_set_always_on_420ma(mac, parseInt(config.always_on_420ma));
|
|
3123
3293
|
}
|
|
3124
3294
|
break;
|
|
3295
|
+
case 541:
|
|
3296
|
+
if(config.sensor_boot_time_420ma_active){
|
|
3297
|
+
promises.sensor_boot_time_420ma = node.config_gateway.config_set_sensor_boot_time_420ma(mac, parseInt(config.sensor_boot_time_420ma));
|
|
3298
|
+
}
|
|
3299
|
+
if(config.low_calibration_420ma_active){
|
|
3300
|
+
promises.low_calibration_420ma = node.config_gateway.config_set_low_calibration_420ma(mac, parseInt(config.low_calibration_420ma));
|
|
3301
|
+
}
|
|
3302
|
+
if(config.mid_calibration_420ma_active){
|
|
3303
|
+
promises.mid_calibration_420ma = node.config_gateway.config_set_mid_calibration_420ma(mac, parseInt(config.mid_calibration_420ma));
|
|
3304
|
+
}
|
|
3305
|
+
if(config.high_calibration_420ma_active){
|
|
3306
|
+
promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
|
|
3307
|
+
}
|
|
3308
|
+
if(config.auto_check_interval_88_active){
|
|
3309
|
+
promises.auto_check_interval_88 = node.config_gateway.config_set_auto_check_interval_88(mac, parseInt(config.auto_check_interval_88));
|
|
3310
|
+
}
|
|
3311
|
+
if(config.auto_check_threshold_88_active){
|
|
3312
|
+
promises.auto_check_threshold_88 = node.config_gateway.config_set_auto_check_threshold_88(mac, parseInt(config.auto_check_threshold_88));
|
|
3313
|
+
}
|
|
3314
|
+
if(config.fsr_420ma_active){
|
|
3315
|
+
promises.fsr_420ma = node.config_gateway.config_set_fsr_420ma(mac, parseInt(config.fsr_420ma));
|
|
3316
|
+
}
|
|
3317
|
+
if(config.always_on_420ma_active){
|
|
3318
|
+
promises.always_on_420ma = node.config_gateway.config_set_always_on_420ma(mac, parseInt(config.always_on_420ma));
|
|
3319
|
+
}
|
|
3320
|
+
if(config.max_flow_541_active){
|
|
3321
|
+
promises.max_flow_541 = node.config_gateway.config_set_max_flow_541(mac, parseInt(config.max_flow_541));
|
|
3322
|
+
}
|
|
3323
|
+
if(config.min_flow_541_active){
|
|
3324
|
+
promises.min_flow_541 = node.config_gateway.config_set_min_flow_541(mac, parseInt(config.min_flow_541));
|
|
3325
|
+
}
|
|
3326
|
+
break;
|
|
3125
3327
|
case 1010:
|
|
3126
3328
|
if(config.stay_on_mode_539_active){
|
|
3127
3329
|
promises.stay_on_mode_539 = node.config_gateway.config_set_stay_on_mode_539(mac, parseInt(config.stay_on_mode_539));
|
|
@@ -3171,7 +3373,7 @@ module.exports = function(RED) {
|
|
|
3171
3373
|
}
|
|
3172
3374
|
}
|
|
3173
3375
|
// These sensors listed in original_otf_devices use a different OTF code.
|
|
3174
|
-
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 110, 111, 112, 114, 117, 180, 181, 518, 519, 520, 538];
|
|
3376
|
+
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];
|
|
3175
3377
|
// If we changed the network ID reboot the sensor to take effect.
|
|
3176
3378
|
// TODO if we add the encryption key command to node-red we need to reboot for it as well.
|
|
3177
3379
|
if(reboot){
|