@ncd-io/node-red-enterprise-sensors 1.0.3 → 1.0.5

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.
@@ -142,7 +142,7 @@ module.exports = class WirelessSensor{
142
142
  }
143
143
  }
144
144
  // #OTF
145
- var otf_devices = [23,26,39,45,48,52,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];
145
+ var otf_devices = [23,26,39,45,48,52,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];
146
146
  var device_type = msbLsb(frame.data[6], frame.data[7]);
147
147
  // var device_type = frame.data[7];
148
148
 
@@ -294,7 +294,7 @@ module.exports = class WirelessSensor{
294
294
  };
295
295
 
296
296
  // #OTF
297
- var otf_devices = [23,26,39,45,48,52,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];
297
+ var otf_devices = [23,26,39,45,48,52,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];
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) {
@@ -1407,28 +1407,51 @@ module.exports = class WirelessSensor{
1407
1407
  }
1408
1408
  config_set_current_calibration_13(sensor_mac, calib){
1409
1409
  console.log('config_set_current_calibration_13');
1410
+ calib = calib * 100;
1410
1411
  var packet = [244, 1, 0, 0, 0];
1411
- var cal_val = int2Bytes(calib, 2);
1412
+ var cal_val = int2Bytes(calib, 4);
1412
1413
  packet.push(...cal_val);
1413
1414
  console.log(packet);
1414
1415
  return this.config_send(sensor_mac, packet);
1415
1416
  }
1416
1417
  config_set_current_calibration_ch2_19(sensor_mac, calib){
1417
1418
  console.log('config_set_current_calibration_ch2_19');
1419
+ calib = calib * 100;
1418
1420
  var packet = [244, 3, 0, 0, 0];
1419
- var cal_val = int2Bytes(calib, 2);
1421
+ var cal_val = int2Bytes(calib, 4);
1420
1422
  packet.push(...cal_val);
1421
1423
  console.log(packet);
1422
1424
  return this.config_send(sensor_mac, packet);
1423
1425
  }
1424
1426
  config_set_current_calibration_ch3_28(sensor_mac, calib){
1425
1427
  console.log('cconfig_set_current_calibration_ch3_28');
1428
+ calib = calib * 100;
1426
1429
  var packet = [244, 5, 0, 0, 0];
1427
- var cal_val = int2Bytes(calib, 2);
1430
+ var cal_val = int2Bytes(calib, 4);
1428
1431
  packet.push(...cal_val);
1429
1432
  console.log(packet);
1430
1433
  return this.config_send(sensor_mac, packet);
1431
1434
  }
1435
+ config_set_rx485_timeout_1011(sensor_mac, value){
1436
+ console.log('config_set_Rx485_timeout_1011');
1437
+ var packet = [244, 48, 0, 0, 23, value];
1438
+ console.log(packet);
1439
+ return this.config_send(sensor_mac, packet);
1440
+ }
1441
+ config_set_mode_1011(sensor_mac, value){
1442
+ console.log('config_set_mode_1011');
1443
+ var packet = [244, 38, 0, 0, 23, value];
1444
+ console.log(packet);
1445
+ return this.config_send(sensor_mac, packet);
1446
+ }
1447
+ config_set_auto_address_timeout_1011(sensor_mac, value){
1448
+ console.log('config_set_auto_address_timeout_1011');
1449
+ var packet = [244, 40, 0, 0, 23];
1450
+ var time_val = int2Bytes(value, 2);
1451
+ packet.push(...time_val);
1452
+ console.log(packet);
1453
+ return this.config_send(sensor_mac, packet);
1454
+ }
1432
1455
  config_get_delay(sensor_mac){
1433
1456
  return new Promise((fulfill, reject) => {
1434
1457
  this.config_send(sensor_mac, [247, 21, 0, 0, 0]).then((res) => {
@@ -5599,12 +5622,12 @@ function sensor_types(parent){
5599
5622
  return error;
5600
5623
  }
5601
5624
  return {
5602
- digital_input_1_counter: d.slice(0, 4).reduce(msbLsb),
5603
- digital_input_1_uptime: d.slice(4, 8).reduce(msbLsb),
5604
- digital_input_2_counter: d.slice(8, 12).reduce(msbLsb),
5605
- digital_input_2_uptime: d.slice(12, 16).reduce(msbLsb),
5606
- digital_input_3_counter: d.slice(16, 20).reduce(msbLsb),
5607
- digital_input_3_uptime: d.slice(20, 24).reduce(msbLsb),
5625
+ digital_input_counter: d.slice(0, 4).reduce(msbLsb),
5626
+ digital_input_uptime: d.slice(4, 8).reduce(msbLsb),
5627
+ ct_input_counter: d.slice(8, 12).reduce(msbLsb),
5628
+ ct_input_uptime: d.slice(12, 16).reduce(msbLsb),
5629
+ opto_input_counter: d.slice(16, 20).reduce(msbLsb),
5630
+ opto_input_uptime: d.slice(20, 24).reduce(msbLsb),
5608
5631
  accelerometer_counter: d.slice(24, 28).reduce(msbLsb),
5609
5632
  accelerometer_uptime: d.slice(28, 32).reduce(msbLsb),
5610
5633
  magnetometer_counter: d.slice(32, 36).reduce(msbLsb),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ncd-io/node-red-enterprise-sensors",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wireless.html CHANGED
@@ -196,18 +196,19 @@
196
196
  pan_id_active: {value: ""},
197
197
  pan_id: {value: '7FFF', validate: NCD_validators.number_range(0, 0x7FFF, 16)},//(0 - 0x7FFF)
198
198
 
199
+ change_detection_t3_active: {value: ""},
199
200
  change_enabled: {value: ""},
200
201
  change_pr: {value: "0", validate: NCD_validators.number_range(0, 255)},
201
202
  change_interval: {value: "0", validate: NCD_validators.number_range(0, 16712198)},
202
203
 
203
204
  current_calibration_13_active: {value: ""},
204
- current_calibration_13: {value: "606", validate: NCD_validators.number_range(0, 65535)},
205
+ current_calibration_13: {value: "606", validate: NCD_validators.number_range(0, 42949672)},
205
206
 
206
207
  current_calibration_ch2_19_active: {value: ""},
207
- current_calibration_ch2_19: {value: "606", validate: NCD_validators.number_range(0, 65535)},
208
+ current_calibration_ch2_19: {value: "606", validate: NCD_validators.number_range(0, 42949672)},
208
209
 
209
210
  current_calibration_ch3_28_active: {value: ""},
210
- current_calibration_ch3_28: {value: "606", validate: NCD_validators.number_range(0, 65535)},
211
+ current_calibration_ch3_28: {value: "606", validate: NCD_validators.number_range(0, 42949672)},
211
212
 
212
213
  bp_altitude: {value: "0", validate: NCD_validators.number_range(0, 65535)},
213
214
  bp_pressure: {value: "0", validate: NCD_validators.number_range(0, 14000)},
@@ -442,7 +443,17 @@
442
443
  smart_interval_110: {value: 0, validate: NCD_validators.number_range(0, 255)},
443
444
 
444
445
  smart_threshold_110_active:{value:""},
445
- smart_threshold_110: {value:0, validate: NCD_validators.number_range(0, 65534)}
446
+ smart_threshold_110: {value:0, validate: NCD_validators.number_range(0, 65534)},
447
+
448
+ rx485_timeout_1011_active:{value:""},
449
+ rx485_timeout_1011:{value: 0, validate: NCD_validators.number_range(0, 255)},
450
+
451
+ mode_1011_active:{value:""},
452
+ mode_1011:{value: 0},
453
+
454
+ auto_address_timeout_1011_active:{value:""},
455
+ auto_address_timeout_1011:{value:0, validate: NCD_validators.number_range(0, 65534)}
456
+
446
457
  },
447
458
  inputs: 0,
448
459
  outputs: 1,
@@ -562,6 +573,8 @@
562
573
  "538": "538 - Custom One Channel Vibration Plus",
563
574
  "539": "539 - RS-485 Modbus Wireless Converter",
564
575
  "540": "540 - Wireless Ultrasonic Flow Meter FD-Q32C",
576
+ "1010": "1010 - RS-232 Wireless Converter 1010",
577
+ "1011": "1011 - RS-485 Wireless Converter 1011",
565
578
  "10000": "10000 - 4-Channel Relay",
566
579
  "10006": "10006 - 4-Channel 4-20 mA Input",
567
580
  "10007": "10007 - 4-Channel Current Monitor",
@@ -850,6 +863,8 @@
850
863
  <option value="538">538 - Custom One Channel Vibration Plus</option>
851
864
  <option value="539">539 - RS-485 Modbus Wireless Converter</option>
852
865
  <option value="540">540 - Wireless Ultrasonic Flow Meter FD-Q32C</option>
866
+ <option value="1010">1010 - RS-232 Wireless Converter 1010</option>
867
+ <option value="1011">1011 - RS-485 Wireless Converter 1011</option>
853
868
  <option value="10000">10000 - 4-Channel Relay</option>
854
869
  <option value="10006">10006 - 4-Channel 4-20 mA Input</option>
855
870
  <option value="10007">10007 - 4-Channel Current Monitor</option>
@@ -863,7 +878,7 @@
863
878
  <label for="node-input-auto_config"><i class="icon-tag"></i> Auto Config</label>
864
879
  <input class="section-control" type="checkbox" id="node-input-auto_config" value="1">
865
880
  </div>
866
- <div class="form-row ncd-dependent" data-sensor-23 data-sensor-26 data-sensor-39 data-sensor-45 data-sensor-48 data-sensor-52 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-540>
881
+ <div class="form-row ncd-dependent" data-sensor-23 data-sensor-26 data-sensor-39 data-sensor-45 data-sensor-48 data-sensor-52 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>
867
882
  <hr>
868
883
  <label for="node-input-on_the_fly_enable"><i class="icon-tag"></i> OTF Config*</label>
869
884
  <input type="checkbox" id="node-input-on_the_fly_enable" value="1">
@@ -957,18 +972,25 @@
957
972
  <input type="text" id="node-input-retries">
958
973
  </div>
959
974
  </div>
960
- <div class="ncd-dependent" data-sensor-13 data-sensor-10 data-sensor-3>
961
- <div class="form-row">
962
- <label for="node-input-change_enabled"><i class="icon-tag"></i> Enable Percentage Change Detection</label>
963
- <input type="checkbox" id="node-input-change_enabled" value="1">
964
- </div>
965
- <div class="form-row">
966
- <label for="node-input-change_pr"><i class="icon-tag"></i> Percentage Change Threshold (0-255)</label>
967
- <input type="text" id="node-input-change_pr">
968
- </div>
969
- <div class="form-row">
970
- <label for="node-input-change_interval"><i class="icon-tag"></i> Percentage Change Interval (seconds)</label>
971
- <input type="text" id="node-input-change_interval">
975
+ <div class="ncd-dependent" data-sensor-3 data-sensor-10 data-sensor-13>
976
+ <div class="form-row ncd-active-check">
977
+ <strong>Percentage Change Detection</strong>
978
+ <div>
979
+ <label for="node-input-change_detection_t3_active">Active:</label>
980
+ <input type="checkbox" id="node-input-change_detection_t3_active" class="ncd-config-toggle" data-target-class="change_detection_t3" value="1">
981
+ </div>
982
+ <div class="form-row">
983
+ <label for="node-input-change_enabled"><i class="icon-tag"></i>Enable:</label>
984
+ <input type="checkbox" id="node-input-change_enabled" class="change_detection_t3" value="1">
985
+ </div>
986
+ <div class="form-row">
987
+ <label for="node-input-change_pr"><i class="icon-tag"></i>Percentage Change Threshold (0-255)</label>
988
+ <input type="text" id="node-input-change_pr" class="change_detection_t3">
989
+ </div>
990
+ <div class="form-row">
991
+ <label for="node-input-change_interval"><i class="icon-tag"></i>Percentage Change Interval (seconds)</label>
992
+ <input type="text" id="node-input-change_interval" class="change_detection_t3">
993
+ </div>
972
994
  </div>
973
995
  </div>
974
996
  <!-- Current Monitor Options -->
@@ -981,7 +1003,7 @@
981
1003
  <input type="checkbox" id="node-input-current_calibration_13_active" class="ncd-config-toggle" data-target-id="node-input-current_calibration_13_active" value="1">
982
1004
  </div>
983
1005
  <div>
984
- <label for="node-input-current_calibration_13"><i class="icon-tag"></i> Calibration Option (1 - 65535)</label>
1006
+ <label for="node-input-current_calibration_13"><i class="icon-tag"></i> Value:</label>
985
1007
  <input type="text" id="node-input-current_calibration_13">
986
1008
  </div>
987
1009
  </div>
@@ -994,7 +1016,7 @@
994
1016
  <input type="checkbox" id="node-input-current_calibration_ch2_19_active" class="ncd-config-toggle" data-target-id="node-input-current_calibration_ch2_19_active" value="1">
995
1017
  </div>
996
1018
  <div>
997
- <label for="node-input-current_calibration_ch2_19"><i class="icon-tag"></i> Calibration Option (1 - 65535)</label>
1019
+ <label for="node-input-current_calibration_ch2_19"><i class="icon-tag"></i> Value:</label>
998
1020
  <input type="text" id="node-input-current_calibration_ch2_19">
999
1021
  </div>
1000
1022
  </div>
@@ -1007,7 +1029,7 @@
1007
1029
  <input type="checkbox" id="node-input-current_calibration_ch3_28_active" class="ncd-config-toggle" data-target-id="node-input-current_calibration_ch3_28_active" value="1">
1008
1030
  </div>
1009
1031
  <div>
1010
- <label for="node-input-current_calibration_ch3_28"><i class="icon-tag"></i> Calibration Option (1 - 65535)</label>
1032
+ <label for="node-input-current_calibration_ch3_28"><i class="icon-tag"></i> Value:</label>
1011
1033
  <input type="text" id="node-input-current_calibration_ch3_28">
1012
1034
  </div>
1013
1035
  </div>
@@ -2016,7 +2038,7 @@
2016
2038
  </div>
2017
2039
  </div>
2018
2040
  <div class="form-row ncd-active-check">
2019
- <strong>Set Input One</strong>
2041
+ <strong>Set Contact Closure Detection</strong>
2020
2042
  <div>
2021
2043
  <label for="node-input-input_one_108_active">Active:</label>
2022
2044
  <input type="checkbox" id="node-input-input_one_108_active" class="ncd-config-toggle" data-target-id="node-input-input_one_108" value="1">
@@ -2024,13 +2046,13 @@
2024
2046
  <div>
2025
2047
  <label for="node-input-input_one_108"><i class="icon-tag"></i>Value:</label>
2026
2048
  <select id="node-input-input_one_108">
2027
- <option value="0">Falling Edge trigger</option>
2028
- <option value="1">Rising Edge trigger</option>
2049
+ <option value="0">Falling Edge Trigger</option>
2050
+ <option value="1" selected>Rising Edge Trigger</option>
2029
2051
  </select>
2030
2052
  </div>
2031
2053
  </div>
2032
2054
  <div class="form-row ncd-active-check">
2033
- <strong>Set Input Two</strong>
2055
+ <strong>Set Current Transducer Detection</strong>
2034
2056
  <div>
2035
2057
  <label for="node-input-input_two_108_active">Active:</label>
2036
2058
  <input type="checkbox" id="node-input-input_two_108_active" class="ncd-config-toggle" data-target-id="node-input-input_two_108" value="1">
@@ -2038,13 +2060,13 @@
2038
2060
  <div>
2039
2061
  <label for="node-input-input_two_108"><i class="icon-tag"></i>Value:</label>
2040
2062
  <select id="node-input-input_two_108">
2041
- <option value="0">Falling Edge trigger</option>
2042
- <option value="1">Rising Edge trigger</option>
2063
+ <option value="0">Falling Edge Trigger</option>
2064
+ <option value="1" selected>Rising Edge Trigger</option>
2043
2065
  </select>
2044
2066
  </div>
2045
2067
  </div>
2046
2068
  <div class="form-row ncd-active-check">
2047
- <strong>Set Input Three</strong>
2069
+ <strong>Set Wet Contact/Optical Sensor Detection</strong>
2048
2070
  <div>
2049
2071
  <label for="node-input-input_three_108_active">Active:</label>
2050
2072
  <input type="checkbox" id="node-input-input_three_108_active" class="ncd-config-toggle" data-target-id="node-input-input_three_108" value="1">
@@ -2052,8 +2074,8 @@
2052
2074
  <div>
2053
2075
  <label for="node-input-input_three_108"><i class="icon-tag"></i>Value:</label>
2054
2076
  <select id="node-input-input_three_108">
2055
- <option value="0">Falling Edge trigger</option>
2056
- <option value="1">Rising Edge trigger</option>
2077
+ <option value="0" selected>Falling Edge Trigger</option>
2078
+ <option value="1">Rising Edge Trigger</option>
2057
2079
  </select>
2058
2080
  </div>
2059
2081
  </div>
@@ -2167,7 +2189,7 @@
2167
2189
  </div>
2168
2190
  </div>
2169
2191
  </div>
2170
- <div class="ncd-dependent" data-sensor-539>
2192
+ <div class="ncd-dependent" data-sensor-539 data-sensor-1010 data-sensor-1011>
2171
2193
  <div class="form-row ncd-active-check">
2172
2194
  <strong>Set Stay On Mode</strong>
2173
2195
  <div>
@@ -2199,6 +2221,8 @@
2199
2221
  </select>
2200
2222
  </div>
2201
2223
  </div>
2224
+ </div>
2225
+ <div class="ncd-dependent" data-sensor-539>
2202
2226
  <div class="form-row ncd-active-check">
2203
2227
  <strong>Set Rx Timeout</strong>
2204
2228
  <div>
@@ -2210,6 +2234,47 @@
2210
2234
  <input type="text" id="node-input-rx_timeout_539" placeholder="10" value="10">
2211
2235
  </div>
2212
2236
  </div>
2237
+ </div>
2238
+ <div class="ncd-dependent" data-sensor-1011>
2239
+ <div class="form-row ncd-active-check">
2240
+ <strong>Set rs485 Timeout</strong>
2241
+ <div>
2242
+ <label for="node-input-rx485_timeout_1011_active">Active:</label>
2243
+ <input type="checkbox" id="node-input-rx485_timeout_1011_active" class="ncd-config-toggle" data-target-id="node-input-rx485_timeout_1011" value="1">
2244
+ </div>
2245
+ <div>
2246
+ <label for="node-input-rx485_timeout_1011"><i class="icon-tag"></i>Value:</label>
2247
+ <input type="text" id="node-input-rx485_timeout_1011" placeholder="10" value="10">
2248
+ </div>
2249
+ </div>
2250
+ <div class="form-row ncd-active-check">
2251
+ <strong>Set Mode</strong>
2252
+ <div>
2253
+ <label for="node-input-mode_1011_active">Active:</label>
2254
+ <input type="checkbox" id="node-input-mode_1011_active" class="ncd-config-toggle" data-target-id="node-input-mode_1011" value="1">
2255
+ </div>
2256
+ <div>
2257
+ <label for="node-input-mode_1011"><i class="icon-tag"></i>Value:</label>
2258
+ <select id="node-input-mode_1011">
2259
+ <option selected="selected" value="0">Auto Encoder</option>
2260
+ <option value="1">Transparent</option>
2261
+ <option value="2">NCD Emulator</option>
2262
+ </select>
2263
+ </div>
2264
+ </div>
2265
+ <div class="form-row ncd-active-check">
2266
+ <strong>Set Auto Address Timeout</strong>
2267
+ <div>
2268
+ <label for="node-input-auto_address_timeout_1011_active">Active:</label>
2269
+ <input type="checkbox" id="node-input-auto_address_timeout_1011_active" class="ncd-config-toggle" data-target-id="node-input-rauto_address_timeout_1011" value="1">
2270
+ </div>
2271
+ <div>
2272
+ <label for="node-input-auto_address_timeout_1011"><i class="icon-tag"></i>Value:</label>
2273
+ <input type="text" id="node-input-auto_address_timeout_1011" placeholder="10" value="10">
2274
+ </div>
2275
+ </div>
2276
+ </div>
2277
+ <div class="ncd-dependent" data-sensor-539>
2213
2278
  <div class="form-row ncd-active-check">
2214
2279
  <strong>Set Bootup Time</strong>
2215
2280
  <div>
@@ -2334,45 +2399,6 @@
2334
2399
  </div>
2335
2400
  </div>
2336
2401
 
2337
- <div class="ncd-dependent" data-sensor-110 data-sensor-111 data-sensor-112 data-sensor-114>
2338
- <div class="form-row ncd-active-check">
2339
- <strong>Set Auto Raw Interval</strong>
2340
- <div>
2341
- <label for="node-input-auto_raw_interval_110_active">Active:</label>
2342
- <input type="checkbox" id="node-input-auto_raw_interval_110_active" class="ncd-config-toggle" data-target-id="node-input-auto_raw_interval_110" value="1">
2343
- </div>
2344
- <div>
2345
- <label for="node-input-auto_raw_interval_110"><i class="icon-tag"></i>Address:</label>
2346
- <input type="text" id="node-input-auto_raw_interval_110" value="0">
2347
- </div>
2348
- </div>
2349
- <div class="form-row ncd-active-check">
2350
- <strong>Set Auto Raw Destination Address</strong>
2351
- <div>
2352
- <label for="node-input-auto_raw_destination_110_active">Active:</label>
2353
- <input type="checkbox" id="node-input-auto_raw_destination_110_active" class="ncd-config-toggle" data-target-id="node-input-auto_raw_destination_110" value="1">
2354
- </div>
2355
- <div>
2356
- <label for="node-input-auto_raw_destination_110"><i class="icon-tag"></i>Address:</label>
2357
- <input type="text" id="node-input-auto_raw_destination_110" value="0000FFFF">
2358
- </div>
2359
- <p class="caption">
2360
- Default value: 0000FFFF for Broadcast Mode<br>
2361
- Example of targeted address: 41D5EC37
2362
- </p>
2363
- </div>
2364
- <div class="form-row ncd-active-check">
2365
- <strong>Set Smart Mode Threshold</strong>
2366
- <div>
2367
- <label for="node-input-smart_threshold_110_active">Active:</label>
2368
- <input type="checkbox" id="node-input-smart_threshold_110_active" class="ncd-config-toggle" data-target-id="node-input-smart_threshold_110" value="1">
2369
- </div>
2370
- <div>
2371
- <label for="node-input-smart_threshold_110"><i class="icon-tag"></i>Value:</label>
2372
- <input type="text" id="node-input-smart_threshold_110" value="1">
2373
- </div>
2374
- </div>
2375
- </div>
2376
2402
  <div class="ncd-dependent" data-sensor-114>
2377
2403
  <div class="form-row ncd-active-check">
2378
2404
  <strong>Clear Probe Uptimers</strong>
package/wireless.js CHANGED
@@ -806,10 +806,7 @@ module.exports = function(RED) {
806
806
  if(config.retries_active){
807
807
  promises.retries = node.config_gateway.config_set_retries(mac, parseInt(config.retries));
808
808
  }
809
- var change_detection = [13, 10, 3];
810
- if(change_detection.indexOf(sensor.type) > -1){
811
- promises.change_detection = node.config_gateway.config_set_change_detection(mac, config.change_enabled ? 1 : 0, parseInt(config.change_pr), parseInt(config.change_interval));
812
- }
809
+
813
810
  switch(sensor.type){
814
811
  case 2:
815
812
  if(config.debounce_time_2_active){
@@ -826,6 +823,9 @@ module.exports = function(RED) {
826
823
  if(config.high_calibration_420ma_active){
827
824
  promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
828
825
  }
826
+ if(config.change_detection_t3_active){
827
+ promises.change_detection = node.config_gateway.config_set_change_detection(mac, config.change_enabled ? 1 : 0, parseInt(config.change_pr), parseInt(config.change_interval));
828
+ }
829
829
  break;
830
830
  case 5:
831
831
  promises.acceleration_range = node.config_gateway.config_set_amgt_accel(mac, parseInt(config.amgt_accel));
@@ -856,6 +856,11 @@ module.exports = function(RED) {
856
856
  // promises.impact_threshold = node.config_gateway.config_set_impact_threshold(mac, parseInt(config.impact_threshold));
857
857
  // promises.impact_duration = node.config_gateway.config_set_impact_duration(mac, parseInt(config.impact_duration));
858
858
  break;
859
+ case 10:
860
+ if(config.change_detection_t3_active){
861
+ promises.change_detection = node.config_gateway.config_set_change_detection(mac, config.change_enabled ? 1 : 0, parseInt(config.change_pr), parseInt(config.change_interval));
862
+ }
863
+ break;
859
864
  case 13:
860
865
  if(config.current_calibration_13_active){
861
866
  var cali = parseInt(config.current_calibration_13);
@@ -863,6 +868,9 @@ module.exports = function(RED) {
863
868
  promises.current_calibration_13 = node.config_gateway.config_set_current_calibration_13(mac, cali);
864
869
  }
865
870
  }
871
+ if(config.change_detection_t3_active){
872
+ promises.change_detection = node.config_gateway.config_set_change_detection(mac, config.change_enabled ? 1 : 0, parseInt(config.change_pr), parseInt(config.change_interval));
873
+ }
866
874
  break;
867
875
  case 14:
868
876
  if(config.sensor_boot_time_420ma_active){
@@ -2035,6 +2043,34 @@ module.exports = function(RED) {
2035
2043
  promises.high_calibration_420ma = node.config_gateway.config_set_high_calibration_420ma(mac, parseInt(config.high_calibration_420ma));
2036
2044
  }
2037
2045
  break;
2046
+ case 1010:
2047
+ if(config.stay_on_mode_539_active){
2048
+ promises.stay_on_mode_539 = node.config_gateway.config_set_stay_on_mode_539(mac, parseInt(config.stay_on_mode_539));
2049
+ }
2050
+ if(config.baudrate_539_active){
2051
+ promises.baudrate_539 = node.config_gateway.config_set_baudrate_539(mac, parseInt(config.baudrate_539));
2052
+ }
2053
+ if(config.rx_timeout_539_active){
2054
+ promises.rx_timeout_539 = node.config_gateway.config_set_rx_timeout_539(mac, parseInt(config.rx_timeout_539));
2055
+ }
2056
+ break;
2057
+ case 1011:
2058
+ if(config.stay_on_mode_539_active){
2059
+ promises.stay_on_mode_539 = node.config_gateway.config_set_stay_on_mode_539(mac, parseInt(config.stay_on_mode_539));
2060
+ }
2061
+ if(config.baudrate_539_active){
2062
+ promises.baudrate_539 = node.config_gateway.config_set_baudrate_539(mac, parseInt(config.baudrate_539));
2063
+ }
2064
+ if(config.rx485_timeout_1011_active){
2065
+ promises.rx485_timeout_1011 = node.config_gateway.config_set_rx485_timeout_1011(mac, parseInt(config.rx485_timeout_1011));
2066
+ }
2067
+ if(config.mode_1011_active){
2068
+ promises.mode_1011 = node.config_gateway.config_set_mode_1011(mac, parseInt(config.mode_1011));
2069
+ }
2070
+ if(config.auto_address_timeout_1011_active){
2071
+ promises.auto_address_timeout_1011 = node.config_gateway.config_set_auto_address_timeout_1011(mac, parseInt(config.auto_address_timeout_1011));
2072
+ }
2073
+ break;
2038
2074
  }
2039
2075
  }
2040
2076
  // These sensors listed in original_otf_devices use a different OTF code.
@@ -2252,9 +2288,14 @@ module.exports = function(RED) {
2252
2288
  // _send_otn_request(sensor);
2253
2289
  // Sensors having issues seeing OTN request sent too quickly
2254
2290
  // Added timeout to fix issue
2255
- var tout = setTimeout(() => {
2256
- _send_otn_request(sensor);
2257
- }, 100);
2291
+ if(config.sensor_type == 1010 || config.sensor_type == 1011){
2292
+ _config(sensor, true);
2293
+ }else{
2294
+ var tout = setTimeout(() => {
2295
+ _send_otn_request(sensor);
2296
+ }, 100);
2297
+ }
2298
+
2258
2299
  }else if(config.auto_config && config.on_the_fly_enable && sensor.mode == "OTN"){
2259
2300
  if(config.sensor_type == 101 || config.sensor_type == 102){
2260
2301
  if(this.gateway.hasOwnProperty('fly_101_in_progress') && this.gateway.fly_101_in_progress == false || !this.gateway.hasOwnProperty('fly_101_in_progress')){