@ncd-io/node-red-enterprise-sensors 0.1.21 → 0.1.23
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 +111 -6
- package/package.json +1 -1
- package/wireless.html +201 -23
- package/wireless.js +155 -7
package/lib/WirelessGateway.js
CHANGED
|
@@ -137,7 +137,7 @@ module.exports = class WirelessSensor{
|
|
|
137
137
|
var new_mode = is_new;
|
|
138
138
|
var mode = (type == 'power_up') ? data.mode : ((type == 'sensor_data') ? 'RUN' : ((type == 'config_ack') ? 'ACK' : 'PGM'));
|
|
139
139
|
// #OTF
|
|
140
|
-
var otf_devices = [23,26,39,45,48,52,76,78,79,80,81,82,84,88,89,90,91,101,102,107,108,519,520,521,531,537];
|
|
140
|
+
var otf_devices = [23,26,39,45,48,52,76,78,79,80,81,82,84,88,89,90,91,101,102,107,108,180,181,519,520,521,531,535,537];
|
|
141
141
|
var device_type = msbLsb(frame.data[6], frame.data[7]);
|
|
142
142
|
// var device_type = frame.data[7];
|
|
143
143
|
|
|
@@ -289,7 +289,7 @@ module.exports = class WirelessSensor{
|
|
|
289
289
|
};
|
|
290
290
|
|
|
291
291
|
// #OTF
|
|
292
|
-
var otf_devices = [23,26,39,45,48,52,76,78,79,80,81,82,84,88,89,90,91,101,102,107,108,519,520,521,531,537];
|
|
292
|
+
var otf_devices = [23,26,39,45,48,52,76,78,79,80,81,82,84,88,89,90,91,101,102,107,108,180,181,519,520,521,531,535,537];
|
|
293
293
|
if(otf_devices.includes(parsed.sensor_type)){
|
|
294
294
|
// If the message says FLY and there is not FLY timer in progress.
|
|
295
295
|
if(payload[8] == 70 && payload[9] == 76 && payload[10] == 89) {
|
|
@@ -719,7 +719,7 @@ module.exports = class WirelessSensor{
|
|
|
719
719
|
data: payload.slice(8)
|
|
720
720
|
};
|
|
721
721
|
// #OTF
|
|
722
|
-
}else if(parsed.sensor_type == 80 || parsed.sensor_type == 81 || parsed.sensor_type == 82 || parsed.sensor_type == 84 || parsed.sensor_type == 515 || parsed.sensor_type == 519 || parsed.sensor_type == 537){
|
|
722
|
+
}else if(parsed.sensor_type == 80 || parsed.sensor_type == 81 || parsed.sensor_type == 82 || parsed.sensor_type == 84 || parsed.sensor_type == 180 || parsed.sensor_type == 181 || parsed.sensor_type == 515 || parsed.sensor_type == 519 || parsed.sensor_type == 537){
|
|
723
723
|
parsed.sensor_data = this.sensor_types[parsed.sensor_type].parse(payload, parsed, frame.mac);
|
|
724
724
|
if(!parsed.sensor_data){
|
|
725
725
|
return;
|
|
@@ -912,6 +912,13 @@ module.exports = class WirelessSensor{
|
|
|
912
912
|
packet.push(...cal_val);
|
|
913
913
|
return this.config_send(sensor_mac, packet);
|
|
914
914
|
}
|
|
915
|
+
config_set_sensor_forced_calibration_535(sensor_mac){
|
|
916
|
+
console.log('config_set_sensor_forced_calibration_535');
|
|
917
|
+
// convert before processing
|
|
918
|
+
var packet = [244, 32, 0, 0, 0];
|
|
919
|
+
console.log(packet);
|
|
920
|
+
return this.config_send(sensor_mac, packet);
|
|
921
|
+
}
|
|
915
922
|
config_set_sensor_temperature_offset_44(sensor_mac, value){
|
|
916
923
|
console.log('config_set_sensor_temperature_offset_44');
|
|
917
924
|
// convert before processing
|
|
@@ -1159,7 +1166,12 @@ module.exports = class WirelessSensor{
|
|
|
1159
1166
|
console.log(packet);
|
|
1160
1167
|
return this.config_send(sensor_mac, packet);
|
|
1161
1168
|
}
|
|
1162
|
-
|
|
1169
|
+
config_set_accelerometer_state_108(sensor_mac, value){
|
|
1170
|
+
console.log('config_set_accelerometer_state_108');
|
|
1171
|
+
var packet = [244, 37, 0, 0, 0, 7, value];
|
|
1172
|
+
console.log(packet);
|
|
1173
|
+
return this.config_send(sensor_mac, packet);
|
|
1174
|
+
}
|
|
1163
1175
|
config_set_sensor_boot_time_420ma(sensor_mac, value){
|
|
1164
1176
|
console.log('sensor_boot_time_420ma');
|
|
1165
1177
|
var packet = [244, 68, 0, 0, 45, value];
|
|
@@ -1236,7 +1248,64 @@ module.exports = class WirelessSensor{
|
|
|
1236
1248
|
console.log(packet);
|
|
1237
1249
|
return this.config_send(sensor_mac, packet);
|
|
1238
1250
|
}
|
|
1239
|
-
|
|
1251
|
+
config_set_debounce_time_2(sensor_mac, value){
|
|
1252
|
+
console.log('config_set_debounce_time_2');
|
|
1253
|
+
var packet = [244, 66, 0, 0, 2, value];
|
|
1254
|
+
console.log(packet);
|
|
1255
|
+
return this.config_send(sensor_mac, packet);
|
|
1256
|
+
}
|
|
1257
|
+
config_enable_stay_on_mode_539(sensor_mac, value){
|
|
1258
|
+
console.log('config_enable_stay_on_mode_539');
|
|
1259
|
+
var packet = [247, 50, 0, 0, 0, value];
|
|
1260
|
+
console.log(packet);
|
|
1261
|
+
return this.config_send(sensor_mac, packet);
|
|
1262
|
+
}
|
|
1263
|
+
config_set_baudrate_539(sensor_mac, value){
|
|
1264
|
+
console.log('config_set_baudrate_539');
|
|
1265
|
+
var packet = [244, 32, 0, 0, 23, 0];
|
|
1266
|
+
let baudrate = int2Bytes((value), 3);
|
|
1267
|
+
packet.push(...baudrate);
|
|
1268
|
+
console.log(packet);
|
|
1269
|
+
return this.config_send(sensor_mac, packet);
|
|
1270
|
+
}
|
|
1271
|
+
config_set_rx_timeout_539(sensor_mac, value){
|
|
1272
|
+
console.log('config_set_rx_timeout_539');
|
|
1273
|
+
var packet = [244, 34, 0, 0, 23, value];
|
|
1274
|
+
console.log(packet);
|
|
1275
|
+
return this.config_send(sensor_mac, packet);
|
|
1276
|
+
}
|
|
1277
|
+
config_set_bootup_time_539(sensor_mac, value){
|
|
1278
|
+
console.log('config_set_bootup_time_539');
|
|
1279
|
+
var packet = [244, 36, 0, 0, 23, value];
|
|
1280
|
+
console.log(packet);
|
|
1281
|
+
return this.config_send(sensor_mac, packet);
|
|
1282
|
+
}
|
|
1283
|
+
config_set_sensor_add_539(sensor_mac, value){
|
|
1284
|
+
console.log('config_set_sensor_add_539');
|
|
1285
|
+
var packet = [244, 38, 0, 0, 23, value];
|
|
1286
|
+
console.log(packet);
|
|
1287
|
+
return this.config_send(sensor_mac, packet);
|
|
1288
|
+
}
|
|
1289
|
+
config_set_rs_node_id_539(sensor_mac, value){
|
|
1290
|
+
console.log('config_set_rs_node_id_539');
|
|
1291
|
+
var packet = [244, 40, 0, 0, 23, value];
|
|
1292
|
+
console.log(packet);
|
|
1293
|
+
return this.config_send(sensor_mac, packet);
|
|
1294
|
+
}
|
|
1295
|
+
config_set_number_of_regs_to_rd_539(sensor_mac, value){
|
|
1296
|
+
console.log('config_set_number_of_regs_to_rd_539');
|
|
1297
|
+
var packet = [244, 51, 0, 0, 23, value];
|
|
1298
|
+
console.log(packet);
|
|
1299
|
+
return this.config_send(sensor_mac, packet);
|
|
1300
|
+
}
|
|
1301
|
+
config_set_reg_539(sensor_mac, value, register){
|
|
1302
|
+
console.log('config_set_reg_539');
|
|
1303
|
+
var packet = [244, 30 + register, 0, 0, 23];
|
|
1304
|
+
let value_reg = int2Bytes((value), 2);
|
|
1305
|
+
packet.push(...value_reg);
|
|
1306
|
+
console.log(packet);
|
|
1307
|
+
return this.config_send(sensor_mac, packet);
|
|
1308
|
+
}
|
|
1240
1309
|
config_get_delay(sensor_mac){
|
|
1241
1310
|
return new Promise((fulfill, reject) => {
|
|
1242
1311
|
this.config_send(sensor_mac, [247, 21, 0, 0, 0]).then((res) => {
|
|
@@ -5351,7 +5420,13 @@ function sensor_types(parent){
|
|
|
5351
5420
|
},
|
|
5352
5421
|
'108': {
|
|
5353
5422
|
name: 'Machine Uptime Monitoring Sensor',
|
|
5354
|
-
parse: (d) => {
|
|
5423
|
+
parse: (d, payload) => {
|
|
5424
|
+
if(payload[7] & 2 != 0){
|
|
5425
|
+
console.log('Error found');
|
|
5426
|
+
// parsed.data = {error: 'Error found, Acclerometer Probe may be unattached'};
|
|
5427
|
+
let error = {error: 'Error found, Acclerometer Probe may be unattached'};
|
|
5428
|
+
return error;
|
|
5429
|
+
}
|
|
5355
5430
|
return {
|
|
5356
5431
|
digital_input_1_counter: d.slice(0, 4).reduce(msbLsb),
|
|
5357
5432
|
digital_input_1_uptime: d.slice(4, 8).reduce(msbLsb),
|
|
@@ -5366,6 +5441,18 @@ function sensor_types(parent){
|
|
|
5366
5441
|
};
|
|
5367
5442
|
}
|
|
5368
5443
|
},
|
|
5444
|
+
'180': {
|
|
5445
|
+
name: 'C1D2 One Channel Vibration Plus',
|
|
5446
|
+
parse: (payload, parsed, mac) => {
|
|
5447
|
+
return parent.sensor_types[80].parse(payload, parsed, mac);
|
|
5448
|
+
}
|
|
5449
|
+
},
|
|
5450
|
+
'181': {
|
|
5451
|
+
name: 'C1D2 Two Channel Vibration Plus',
|
|
5452
|
+
parse: (payload, parsed, mac) => {
|
|
5453
|
+
return parent.sensor_types[81].parse(payload, parsed, mac);
|
|
5454
|
+
}
|
|
5455
|
+
},
|
|
5369
5456
|
'200': {
|
|
5370
5457
|
name: '4-20mA Pass Through',
|
|
5371
5458
|
parse: (d) => {
|
|
@@ -6332,6 +6419,16 @@ function sensor_types(parent){
|
|
|
6332
6419
|
}
|
|
6333
6420
|
}
|
|
6334
6421
|
},
|
|
6422
|
+
'535': {
|
|
6423
|
+
name: 'Custom Wireless CO2 Gas Sensor',
|
|
6424
|
+
parse: (d) => {
|
|
6425
|
+
return {
|
|
6426
|
+
humidity: msbLsb(d[0], d[1])/100,
|
|
6427
|
+
temperature: signInt((msbLsb(d[2], d[3])), 16)/100,
|
|
6428
|
+
co2: msbLsb(d[4], d[5])
|
|
6429
|
+
};
|
|
6430
|
+
}
|
|
6431
|
+
},
|
|
6335
6432
|
'537': {
|
|
6336
6433
|
name: 'Type 537 - Custom Standalone Smart Vibration Sensor',
|
|
6337
6434
|
parse: (payload, parsed, mac) => {
|
|
@@ -6942,6 +7039,14 @@ function sensor_types(parent){
|
|
|
6942
7039
|
}
|
|
6943
7040
|
}
|
|
6944
7041
|
},
|
|
7042
|
+
'539': {
|
|
7043
|
+
name: 'RS-485 Modbus Wireless Converter',
|
|
7044
|
+
parse: (d) => {
|
|
7045
|
+
return {
|
|
7046
|
+
data: d
|
|
7047
|
+
};
|
|
7048
|
+
},
|
|
7049
|
+
},
|
|
6945
7050
|
'10000': {
|
|
6946
7051
|
name: '4-Relay',
|
|
6947
7052
|
parse: (d) => {
|
package/package.json
CHANGED
package/wireless.html
CHANGED
|
@@ -226,6 +226,8 @@
|
|
|
226
226
|
force_calibration_co2_auto_config: {value: ""},
|
|
227
227
|
force_calibration_co2: {value: 400, validate: NCD_validators.number_range(400, 2000)},
|
|
228
228
|
|
|
229
|
+
force_calibration_co2_535_active: {value: ""},
|
|
230
|
+
|
|
229
231
|
temperature_offset_44_active: {value: ""},
|
|
230
232
|
temperature_offset_44: {value: 4, validate: NCD_validators.number_range(0, 25)},
|
|
231
233
|
|
|
@@ -340,6 +342,9 @@
|
|
|
340
342
|
pitch_angle_threshold_47:{value:0, validate: NCD_validators.number_range(0, 255)},
|
|
341
343
|
pitch_angle_threshold_47_active:{value:""},
|
|
342
344
|
|
|
345
|
+
accelerometer_state_108:{value:0},
|
|
346
|
+
accelerometer_state_108_active:{value:""},
|
|
347
|
+
|
|
343
348
|
clear_all_counters_108:{value:0},
|
|
344
349
|
accelerometer_threshold_108:{value:10, validate: NCD_validators.number_range(0, 255)},
|
|
345
350
|
accelerometer_threshold_108_active:{value:""},
|
|
@@ -364,6 +369,33 @@
|
|
|
364
369
|
|
|
365
370
|
thermocouple_type_23_active:{value:""},
|
|
366
371
|
thermocouple_type_23:{value: 0},
|
|
372
|
+
|
|
373
|
+
debounce_time_2_active:{value:""},
|
|
374
|
+
debounce_time_2:{value: 10, validate: NCD_validators.number_range(0, 255)},
|
|
375
|
+
|
|
376
|
+
stay_on_mode_539_active: {value:""},
|
|
377
|
+
stay_on_mode_539: {value:0},
|
|
378
|
+
|
|
379
|
+
baudrate_539_active:{value:""},
|
|
380
|
+
baudrate_539:{value: 9600},
|
|
381
|
+
|
|
382
|
+
rx_timeout_539_active:{value:""},
|
|
383
|
+
rx_timeout_539:{value: 10, validate: NCD_validators.number_range(0, 255)},
|
|
384
|
+
|
|
385
|
+
bootup_time_539_active:{value:""},
|
|
386
|
+
bootup_time_539:{value: 10, validate: NCD_validators.number_range(0, 255)},
|
|
387
|
+
|
|
388
|
+
sensor_add_539_active:{value:""},
|
|
389
|
+
sensor_add_539:{value: 10, validate: NCD_validators.number_range(0, 255)},
|
|
390
|
+
|
|
391
|
+
rs_node_id_539_active:{value:""},
|
|
392
|
+
rs_node_id_539:{value: 10, validate: NCD_validators.number_range(0, 255)},
|
|
393
|
+
|
|
394
|
+
number_of_regs_to_rd_539_active:{value:""},
|
|
395
|
+
number_of_regs_to_rd_539:{value: 10, validate: NCD_validators.number_range(0, 255)},
|
|
396
|
+
|
|
397
|
+
config_set_reg_active_539:{value:""},
|
|
398
|
+
config_set_reg_539:{value:50, validate: NCD_validators.number_range(0, 65534)},
|
|
367
399
|
},
|
|
368
400
|
inputs: 0,
|
|
369
401
|
outputs: 1,
|
|
@@ -457,6 +489,8 @@
|
|
|
457
489
|
"102": "102 - Strain Gauge",
|
|
458
490
|
"107": "107 - 4 Channel 4-20mA Receiver",
|
|
459
491
|
"108": "108 - Machine Uptime Monitoring Sensor",
|
|
492
|
+
"180": "180 - C1D2 One Channel Vibration Plus",
|
|
493
|
+
"181": "181 - C1D2 Two Channel Vibration Plus",
|
|
460
494
|
"200": "200 - 4-20mA Pass Through",
|
|
461
495
|
"202": "202 - Weather Station",
|
|
462
496
|
"502": "502 - C_50-27",
|
|
@@ -470,7 +504,9 @@
|
|
|
470
504
|
"521": "521 - Custom 3 Channel Light Sensor",
|
|
471
505
|
"524": "524 - SDI Multi Soil Probe",
|
|
472
506
|
"531": "531 - Custom Noise Sensor",
|
|
507
|
+
"535": "535 - Custom CO2 Sensor",
|
|
473
508
|
"537": "537 - Custom Standalone Smart Vibration Sensor",
|
|
509
|
+
"539": "539 - RS-485 Modbus Wireless Converter",
|
|
474
510
|
"10000": "10000 - 4-Channel Relay",
|
|
475
511
|
"10006": "10006 - 4-Channel 4-20 mA Input",
|
|
476
512
|
"10007": "10007 - 4-Channel Current Monitor",
|
|
@@ -710,6 +746,8 @@
|
|
|
710
746
|
<option value="102">102 - Strain Gauge</option>
|
|
711
747
|
<option value="107">107 - 4 Channel 4-20mA Receiver</option>
|
|
712
748
|
<option value="108">108 - Machine Uptime Monitoring Sensor</option>
|
|
749
|
+
<option value="180">180 - C1D2 One Channel Vibration Plus</option>
|
|
750
|
+
<option value="181">181 - C1D2 Two Channel Vibration Plus</option>
|
|
713
751
|
<option value="200">200 - 4-20mA Pass Through</option>
|
|
714
752
|
<option value="202">202 - Weather Station</option>
|
|
715
753
|
<option value="502">502 - C_50-27</option>
|
|
@@ -723,7 +761,9 @@
|
|
|
723
761
|
<option value="521">521 - Custom 3 Channel Light Sensor</option>
|
|
724
762
|
<option value="524">524 - SDI Multi Soil Probe</option>
|
|
725
763
|
<option value="531">531 - Custom Noise Sensor</option>
|
|
764
|
+
<option value="535">535 - Custom CO2 Sensor</option>
|
|
726
765
|
<option value="537">537 - Custom Standalone Smart Vibration Sensor</option>
|
|
766
|
+
<option value="539">539 - RS-485 Modbus Wireless Converter</option>
|
|
727
767
|
<option value="10000">10000 - 4-Channel Relay</option>
|
|
728
768
|
<option value="10006">10006 - 4-Channel 4-20 mA Input</option>
|
|
729
769
|
<option value="10007">10007 - 4-Channel Current Monitor</option>
|
|
@@ -737,7 +777,7 @@
|
|
|
737
777
|
<label for="node-input-auto_config"><i class="icon-tag"></i> Auto Config</label>
|
|
738
778
|
<input class="section-control" type="checkbox" id="node-input-auto_config" value="1">
|
|
739
779
|
</div>
|
|
740
|
-
<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-107 data-sensor-108 data-sensor-519 data-sensor-520 data-sensor-521 data-sensor-531 data-sensor-537>
|
|
780
|
+
<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-107 data-sensor-108 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-520 data-sensor-521 data-sensor-531 data-sensor-535 data-sensor-537>
|
|
741
781
|
<hr>
|
|
742
782
|
<label for="node-input-on_the_fly_enable"><i class="icon-tag"></i> OTF Config*</label>
|
|
743
783
|
<input type="checkbox" id="node-input-on_the_fly_enable" value="1">
|
|
@@ -1053,18 +1093,35 @@
|
|
|
1053
1093
|
</div>
|
|
1054
1094
|
<div class="ncd-dependent" data-sensor-44>
|
|
1055
1095
|
<hr>
|
|
1056
|
-
<div class="form-row">
|
|
1057
|
-
<
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
<
|
|
1062
|
-
|
|
1096
|
+
<div class="form-row ncd-active-check">
|
|
1097
|
+
<div class="form-row">
|
|
1098
|
+
<p><strong>Advanced: Set Sensor Forced Calibration</strong></p>
|
|
1099
|
+
<p>This command will take 3 minutes to execute as the sensor calibrates. Do not reboot the sensor during this time. The configuration completed command through the UI is referring to the receipt and acknowledgement of the configuration packet.</p>
|
|
1100
|
+
</div>
|
|
1101
|
+
<div class="form-row">
|
|
1102
|
+
<label for="node-input-force_calibration_co2_auto_config"><i class="icon-tag"></i> Auto Config</label>
|
|
1103
|
+
<input type="checkbox" id="node-input-force_calibration_co2_auto_config" class="ncd-config-toggle" data-target-id="node-input-force_calibration_co2" value="1">
|
|
1104
|
+
</div>
|
|
1105
|
+
<div class="form-row">
|
|
1106
|
+
<label for="node-input-force_calibration_co2"><i class="icon-tag"></i> Value</label>
|
|
1107
|
+
<input type="text" id="node-input-force_calibration_co2" placeholder="455" value="455">
|
|
1108
|
+
</div>
|
|
1063
1109
|
</div>
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1110
|
+
</div>
|
|
1111
|
+
<div class="ncd-dependent" data-sensor-535>
|
|
1112
|
+
<hr>
|
|
1113
|
+
<div class="form-row ncd-active-check">
|
|
1114
|
+
<div class="form-row">
|
|
1115
|
+
<p><strong>Advanced: Set Sensor Forced Calibration</strong></p>
|
|
1116
|
+
<p>This command will take 10 minutes to execute as the sensor calibrates. Do not reboot the sensor during this time. The configuration completed command through the UI is referring to the receipt and acknowledgement of the configuration packet.</p>
|
|
1117
|
+
</div>
|
|
1118
|
+
<div class="form-row">
|
|
1119
|
+
<label for="node-input-force_calibration_co2_535_active"><i class="icon-tag"></i>Enable</label>
|
|
1120
|
+
<input type="checkbox" id="node-input-force_calibration_co2_535_active" class="ncd-config-toggle" value="1">
|
|
1121
|
+
</div>
|
|
1067
1122
|
</div>
|
|
1123
|
+
</div>
|
|
1124
|
+
<div class="ncd-dependent" data-sensor-44 data-sensor-535>
|
|
1068
1125
|
<div class="form-row ncd-active-check">
|
|
1069
1126
|
<div>
|
|
1070
1127
|
<strong>Temperature Offset</strong>
|
|
@@ -1141,7 +1198,7 @@
|
|
|
1141
1198
|
</div>
|
|
1142
1199
|
</div>
|
|
1143
1200
|
|
|
1144
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-519 data-sensor-537>
|
|
1201
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537>
|
|
1145
1202
|
<hr>
|
|
1146
1203
|
<div class="form-row ncd-active-check">
|
|
1147
1204
|
<strong>Mode</strong>
|
|
@@ -1186,7 +1243,7 @@
|
|
|
1186
1243
|
</div>
|
|
1187
1244
|
</div>
|
|
1188
1245
|
|
|
1189
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-102 data-sensor-519 data-sensor-537>
|
|
1246
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-102 data-sensor-180 data-sensor-519 data-sensor-537>
|
|
1190
1247
|
<hr>
|
|
1191
1248
|
<div class="form-row ncd-active-check">
|
|
1192
1249
|
<strong>Set Sampling Duration 1= 50msec, 2= 100msec</strong>
|
|
@@ -1201,7 +1258,7 @@
|
|
|
1201
1258
|
</div>
|
|
1202
1259
|
</div>
|
|
1203
1260
|
|
|
1204
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-102 data-sensor-519 data-sensor-537>
|
|
1261
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-102 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537>
|
|
1205
1262
|
<hr>
|
|
1206
1263
|
<div class="form-row ncd-active-check">
|
|
1207
1264
|
<strong>Sampling Interval</strong>
|
|
@@ -1233,7 +1290,7 @@
|
|
|
1233
1290
|
</div>
|
|
1234
1291
|
</div>
|
|
1235
1292
|
|
|
1236
|
-
<div class="ncd-dependent" data-sensor-81>
|
|
1293
|
+
<div class="ncd-dependent" data-sensor-81 data-sensor-181>
|
|
1237
1294
|
<hr>
|
|
1238
1295
|
<div class="form-row ncd-active-check">
|
|
1239
1296
|
<strong>Probe 1: Output Data Rate</strong>
|
|
@@ -1302,7 +1359,7 @@
|
|
|
1302
1359
|
</div>
|
|
1303
1360
|
</div>
|
|
1304
1361
|
</div>
|
|
1305
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-82 data-sensor-84 data-sensor-102 data-sensor-519 data-sensor-537>
|
|
1362
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-82 data-sensor-84 data-sensor-102 data-sensor-180 data-sensor-519 data-sensor-537>
|
|
1306
1363
|
<hr>
|
|
1307
1364
|
<div class="form-row ncd-active-check">
|
|
1308
1365
|
<strong>Output Data Rate</strong>
|
|
@@ -1399,7 +1456,7 @@
|
|
|
1399
1456
|
</div>
|
|
1400
1457
|
</div>
|
|
1401
1458
|
</div>
|
|
1402
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-519 data-sensor-537>
|
|
1459
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537>
|
|
1403
1460
|
<div class="form-row ncd-active-check">
|
|
1404
1461
|
<strong>Set Filtering</strong>
|
|
1405
1462
|
<div>
|
|
@@ -1469,7 +1526,7 @@
|
|
|
1469
1526
|
</div>
|
|
1470
1527
|
</div>
|
|
1471
1528
|
</div>
|
|
1472
|
-
<div class="ncd-dependent" data-sensor-81>
|
|
1529
|
+
<div class="ncd-dependent" data-sensor-81 data-sensor-181>
|
|
1473
1530
|
<div class="form-row ncd-active-check">
|
|
1474
1531
|
<strong>Set Low Pass Filter Probe 2</strong>
|
|
1475
1532
|
<p>
|
|
@@ -1526,7 +1583,7 @@
|
|
|
1526
1583
|
</div>
|
|
1527
1584
|
</div>
|
|
1528
1585
|
|
|
1529
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-519 data-sensor-537>
|
|
1586
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537>
|
|
1530
1587
|
<div class="form-row ncd-active-check">
|
|
1531
1588
|
<strong>Full Scale Range</strong>
|
|
1532
1589
|
<div>
|
|
@@ -1563,7 +1620,7 @@
|
|
|
1563
1620
|
</div>
|
|
1564
1621
|
</div>
|
|
1565
1622
|
</div>
|
|
1566
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-519 data-sensor-537>
|
|
1623
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-101 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537>
|
|
1567
1624
|
<div class="form-row ncd-active-check">
|
|
1568
1625
|
<strong>Set Dead Band in mg</strong>
|
|
1569
1626
|
<div>
|
|
@@ -1677,7 +1734,7 @@
|
|
|
1677
1734
|
</div>
|
|
1678
1735
|
</div>
|
|
1679
1736
|
|
|
1680
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-505 data-sensor-506>
|
|
1737
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-180 data-sensor-181 data-sensor-505 data-sensor-506>
|
|
1681
1738
|
<div class="form-row ncd-active-check">
|
|
1682
1739
|
<strong>Channel 1 Current Calibration Value</strong>
|
|
1683
1740
|
<p class="caption">
|
|
@@ -1695,7 +1752,7 @@
|
|
|
1695
1752
|
</div>
|
|
1696
1753
|
</div>
|
|
1697
1754
|
|
|
1698
|
-
<div class="ncd-dependent" data-sensor-81 data-sensor-506>
|
|
1755
|
+
<div class="ncd-dependent" data-sensor-81 data-sensor-181 data-sensor-506>
|
|
1699
1756
|
<div class="form-row ncd-active-check">
|
|
1700
1757
|
<strong>Channel 2 Current Calibration Value</strong>
|
|
1701
1758
|
<p class="caption">
|
|
@@ -1765,6 +1822,23 @@
|
|
|
1765
1822
|
</div>
|
|
1766
1823
|
|
|
1767
1824
|
<div class="ncd-dependent" data-sensor-108>
|
|
1825
|
+
<div class="form-row ncd-active-check">
|
|
1826
|
+
<strong>Enable Accelerometer Error Reporting</strong>
|
|
1827
|
+
<p class="caption">
|
|
1828
|
+
Enables error reporting for the accelerometer probe. If this option is enabled errors will be reported when the accelerometer probe is non-functional.
|
|
1829
|
+
</p>
|
|
1830
|
+
<div>
|
|
1831
|
+
<label for="node-input-accelerometer_state_108_active">Active:</label>
|
|
1832
|
+
<input type="checkbox" id="node-input-accelerometer_state_108_active" class="ncd-config-toggle" data-target-id="node-input-accelerometer_state_108" value="1">
|
|
1833
|
+
</div>
|
|
1834
|
+
<div>
|
|
1835
|
+
<label for="node-input-accelerometer_state_108"><i class="icon-tag"></i>Value:</label>
|
|
1836
|
+
<select id="node-input-accelerometer_state_108">
|
|
1837
|
+
<option value="0" selected>Disabled</option>
|
|
1838
|
+
<option value="1">Enabled</option>
|
|
1839
|
+
</select>
|
|
1840
|
+
</div>
|
|
1841
|
+
</div>
|
|
1768
1842
|
<div class="form-row">
|
|
1769
1843
|
<label for="node-input-clear_all_counters_108"><i class="icon-tag"></i>Clear All Counters</label>
|
|
1770
1844
|
<input type="checkbox" id="node-input-clear_all_counters_108" value="1">
|
|
@@ -1813,7 +1887,7 @@
|
|
|
1813
1887
|
</div>
|
|
1814
1888
|
</div>
|
|
1815
1889
|
</div>
|
|
1816
|
-
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-519 data-sensor-537>
|
|
1890
|
+
<div class="ncd-dependent" data-sensor-80 data-sensor-81 data-sensor-82 data-sensor-84 data-sensor-180 data-sensor-181 data-sensor-519 data-sensor-537>
|
|
1817
1891
|
<hr>
|
|
1818
1892
|
<div class="form-row ncd-active-check">
|
|
1819
1893
|
<strong>Payload Length</strong>
|
|
@@ -1875,6 +1949,110 @@
|
|
|
1875
1949
|
<div id="config_response"></div>
|
|
1876
1950
|
</div>
|
|
1877
1951
|
</div>
|
|
1952
|
+
<div class="ncd-dependent" data-sensor-2>
|
|
1953
|
+
<div class="form-row ncd-active-check">
|
|
1954
|
+
<strong>Set Input Debounce Time</strong>
|
|
1955
|
+
<p class="caption">
|
|
1956
|
+
Sets the debounce time in milliseconds on inputs. State changes to the input during this debounce time will be ignored. Generally recommended for mechanically triggered state changes such as button or relay/contactor outputs.
|
|
1957
|
+
</p>
|
|
1958
|
+
<div>
|
|
1959
|
+
<label for="node-input-debounce_time_2_active">Active:</label>
|
|
1960
|
+
<input type="checkbox" id="node-input-debounce_time_2_active" class="ncd-config-toggle" data-target-id="node-input-debounce_time_2" value="1">
|
|
1961
|
+
</div>
|
|
1962
|
+
<div>
|
|
1963
|
+
<label for="node-input-debounce_time_2"><i class="icon-tag"></i>Value:</label>
|
|
1964
|
+
<input type="text" id="node-input-debounce_time_2" placeholder="10" value="10">
|
|
1965
|
+
</div>
|
|
1966
|
+
</div>
|
|
1967
|
+
</div>
|
|
1968
|
+
<div class="ncd-dependent" data-sensor-539>
|
|
1969
|
+
<div class="form-row ncd-active-check">
|
|
1970
|
+
<strong>Set Stay On Mode</strong>
|
|
1971
|
+
<div>
|
|
1972
|
+
<label for="node-input-stay_on_mode_539_active">Active:</label>
|
|
1973
|
+
<input type="checkbox" id="node-input-stay_on_mode_539_active" class="ncd-config-toggle" data-target-id="node-input-stay_on_mode_539" value="1">
|
|
1974
|
+
</div>
|
|
1975
|
+
<div>
|
|
1976
|
+
<label for="node-input-stay_on_mode_539"><i class="icon-tag"></i>Value:</label>
|
|
1977
|
+
<select id="node-input-stay_on_mode_539">
|
|
1978
|
+
<option value="0">Disabled</option>
|
|
1979
|
+
<option value="1">Enabled</option>
|
|
1980
|
+
</select>
|
|
1981
|
+
</div>
|
|
1982
|
+
</div>
|
|
1983
|
+
<div class="form-row ncd-active-check">
|
|
1984
|
+
<strong>Set Baudrate</strong>
|
|
1985
|
+
<div>
|
|
1986
|
+
<label for="node-input-baudrate_539_active">Active:</label>
|
|
1987
|
+
<input type="checkbox" id="node-input-baudrate_539_active" class="ncd-config-toggle" data-target-id="node-input-baudrate_539" value="1">
|
|
1988
|
+
</div>
|
|
1989
|
+
<div>
|
|
1990
|
+
<label for="node-input-baudrate_539"><i class="icon-tag"></i>Value:</label>
|
|
1991
|
+
<select id="node-input-baudrate_539">
|
|
1992
|
+
<option selected="selected" value="9600">9600</option>
|
|
1993
|
+
<option value="19200">19200</option>
|
|
1994
|
+
<option value="38400">38400</option>
|
|
1995
|
+
<option value="57600">57600</option>
|
|
1996
|
+
<option value="115200">115200</option>
|
|
1997
|
+
</select>
|
|
1998
|
+
</div>
|
|
1999
|
+
</div>
|
|
2000
|
+
<div class="form-row ncd-active-check">
|
|
2001
|
+
<strong>Set Rx Timeout</strong>
|
|
2002
|
+
<div>
|
|
2003
|
+
<label for="node-input-rx_timeout_539_active">Active:</label>
|
|
2004
|
+
<input type="checkbox" id="node-input-rx_timeout_539_active" class="ncd-config-toggle" data-target-id="node-input-rx_timeout_539" value="1">
|
|
2005
|
+
</div>
|
|
2006
|
+
<div>
|
|
2007
|
+
<label for="node-input-rx_timeout_539"><i class="icon-tag"></i>Value:</label>
|
|
2008
|
+
<input type="text" id="node-input-rx_timeout_539" placeholder="10" value="10">
|
|
2009
|
+
</div>
|
|
2010
|
+
</div>
|
|
2011
|
+
<div class="form-row ncd-active-check">
|
|
2012
|
+
<strong>Set Bootup Time</strong>
|
|
2013
|
+
<div>
|
|
2014
|
+
<label for="node-input-bootup_time_539_active">Active:</label>
|
|
2015
|
+
<input type="checkbox" id="node-input-bootup_time_539_active" class="ncd-config-toggle" data-target-id="node-input-bootup_time_539" value="1">
|
|
2016
|
+
</div>
|
|
2017
|
+
<div>
|
|
2018
|
+
<label for="node-input-bootup_time_539"><i class="icon-tag"></i>Value:</label>
|
|
2019
|
+
<input type="text" id="node-input-bootup_time_539" placeholder="10" value="10">
|
|
2020
|
+
</div>
|
|
2021
|
+
</div>
|
|
2022
|
+
<div class="form-row ncd-active-check">
|
|
2023
|
+
<strong>Set Slave ID</strong>
|
|
2024
|
+
<div>
|
|
2025
|
+
<label for="node-input-sensor_add_539_active">Active:</label>
|
|
2026
|
+
<input type="checkbox" id="node-input-sensor_add_539_active" class="ncd-config-toggle" data-target-id="node-input-sensor_add_539" value="1">
|
|
2027
|
+
</div>
|
|
2028
|
+
<div>
|
|
2029
|
+
<label for="node-input-sensor_add_539"><i class="icon-tag"></i>Value:</label>
|
|
2030
|
+
<input type="text" id="node-input-sensor_add_539" placeholder="10" value="10">
|
|
2031
|
+
</div>
|
|
2032
|
+
</div>
|
|
2033
|
+
<div class="form-row ncd-active-check">
|
|
2034
|
+
<strong>Set Sub Device Type</strong>
|
|
2035
|
+
<div>
|
|
2036
|
+
<label for="node-input-rs_node_id_539_active">Active:</label>
|
|
2037
|
+
<input type="checkbox" id="node-input-rs_node_id_539_active" class="ncd-config-toggle" data-target-id="node-input-rs_node_id_539" value="1">
|
|
2038
|
+
</div>
|
|
2039
|
+
<div>
|
|
2040
|
+
<label for="node-input-rs_node_id_539"><i class="icon-tag"></i>Value:</label>
|
|
2041
|
+
<input type="text" id="node-input-rs_node_id_539" placeholder="10" value="10">
|
|
2042
|
+
</div>
|
|
2043
|
+
</div>
|
|
2044
|
+
<div class="form-row ncd-active-check">
|
|
2045
|
+
<strong>Set Number of Registers to RD</strong>
|
|
2046
|
+
<div>
|
|
2047
|
+
<label for="node-input-number_of_regs_to_rd_539_active">Active:</label>
|
|
2048
|
+
<input type="checkbox" id="node-input-number_of_regs_to_rd_539_active" class="ncd-config-toggle" data-target-id="node-input-number_of_regs_to_rd_539" value="1">
|
|
2049
|
+
</div>
|
|
2050
|
+
<div>
|
|
2051
|
+
<label for="node-input-number_of_regs_to_rd_539"><i class="icon-tag"></i>Value:</label>
|
|
2052
|
+
<input type="text" id="node-input-number_of_regs_to_rd_539" placeholder="10" value="10">
|
|
2053
|
+
</div>
|
|
2054
|
+
</div>
|
|
2055
|
+
</div>
|
|
1878
2056
|
</div>
|
|
1879
2057
|
</div>
|
|
1880
2058
|
</script>
|
package/wireless.js
CHANGED
|
@@ -275,7 +275,7 @@ module.exports = function(RED) {
|
|
|
275
275
|
|
|
276
276
|
var promises = {};
|
|
277
277
|
// This command is used for OTF on types 53, 80,81,82,83,84, 101, 102 , 518,519
|
|
278
|
-
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102 , 518, 519, 520];
|
|
278
|
+
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 180, 181, 518, 519, 520];
|
|
279
279
|
if(original_otf_devices.includes(sensor.type)){
|
|
280
280
|
// This command is used for OTF on types 53, 80,81,82,83,84, 101, 102 , 518,519
|
|
281
281
|
promises.config_enter_otn_mode = node.config_gateway.config_enter_otn_mode(sensor.mac);
|
|
@@ -415,6 +415,11 @@ module.exports = function(RED) {
|
|
|
415
415
|
promises.change_detection = node.config_gateway.config_set_change_detection(mac, config.change_enabled ? 1 : 0, parseInt(config.change_pr), parseInt(config.change_interval));
|
|
416
416
|
}
|
|
417
417
|
switch(sensor.type){
|
|
418
|
+
case 2:
|
|
419
|
+
if(config.debounce_time_2_active){
|
|
420
|
+
promises.debounce_time_2 = node.config_gateway.config_set_debounce_time_2(mac, parseInt(config.debounce_time_2));
|
|
421
|
+
}
|
|
422
|
+
break;
|
|
418
423
|
case 3:
|
|
419
424
|
if(config.low_calibration_420ma_active){
|
|
420
425
|
promises.low_calibration_420ma = node.config_gateway.config_set_low_calibration_420ma(mac, parseInt(config.low_calibration_420ma));
|
|
@@ -628,7 +633,7 @@ module.exports = function(RED) {
|
|
|
628
633
|
promises.measurement_mode = node.config_gateway.config_set_measurement_mode_80(mac, parseInt(config.measurement_mode_80));
|
|
629
634
|
}
|
|
630
635
|
if(config.on_request_timeout_80_active){
|
|
631
|
-
promises.on_request_timeout = node.config_gateway.
|
|
636
|
+
promises.on_request_timeout = node.config_gateway.config_set_on_request_timeout_80(mac, parseInt(config.on_request_timeout_80));
|
|
632
637
|
}
|
|
633
638
|
if(config.deadband_80_active){
|
|
634
639
|
promises.deadband = node.config_gateway.config_set_deadband_80(mac, parseInt(config.deadband_80));
|
|
@@ -737,7 +742,7 @@ module.exports = function(RED) {
|
|
|
737
742
|
promises.measurement_mode = node.config_gateway.config_set_measurement_mode_80(mac, parseInt(config.measurement_mode_80));
|
|
738
743
|
}
|
|
739
744
|
if(config.on_request_timeout_80_active){
|
|
740
|
-
promises.on_request_timeout = node.config_gateway.
|
|
745
|
+
promises.on_request_timeout = node.config_gateway.config_set_on_request_timeout_80(mac, parseInt(config.on_request_timeout_80));
|
|
741
746
|
}
|
|
742
747
|
if(config.deadband_80_active){
|
|
743
748
|
promises.deadband = node.config_gateway.config_set_deadband_80(mac, parseInt(config.deadband_80));
|
|
@@ -781,7 +786,7 @@ module.exports = function(RED) {
|
|
|
781
786
|
promises.measurement_mode = node.config_gateway.config_set_measurement_mode_80(mac, parseInt(config.measurement_mode_80));
|
|
782
787
|
}
|
|
783
788
|
if(config.on_request_timeout_80_active){
|
|
784
|
-
promises.on_request_timeout = node.config_gateway.
|
|
789
|
+
promises.on_request_timeout = node.config_gateway.config_set_on_request_timeout_80(mac, parseInt(config.on_request_timeout_80));
|
|
785
790
|
}
|
|
786
791
|
if(config.deadband_80_active){
|
|
787
792
|
promises.deadband = node.config_gateway.config_set_deadband_80(mac, parseInt(config.deadband_80));
|
|
@@ -888,6 +893,9 @@ module.exports = function(RED) {
|
|
|
888
893
|
}
|
|
889
894
|
break;
|
|
890
895
|
case 108:
|
|
896
|
+
if(config.accelerometer_state_108_active){
|
|
897
|
+
promises.accelerometer_state_108 = node.config_gateway.config_set_accelerometer_state_108(mac, parseInt(config.accelerometer_state_108));
|
|
898
|
+
}
|
|
891
899
|
if(config.clear_all_counters_108){
|
|
892
900
|
promises.clear_all_counters_108 = node.config_gateway.config_clear_timers_108(mac);
|
|
893
901
|
}
|
|
@@ -898,6 +906,115 @@ module.exports = function(RED) {
|
|
|
898
906
|
promises.debounce_time_108 = node.config_gateway.config_set_debounce_time_108(mac, parseInt(config.debounce_time_108));
|
|
899
907
|
}
|
|
900
908
|
break;
|
|
909
|
+
case 180:
|
|
910
|
+
if(config.current_calibration_c1_80_active){
|
|
911
|
+
promises.current_calibration_c1_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
912
|
+
}
|
|
913
|
+
if(config.output_data_rate_101_active){
|
|
914
|
+
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
915
|
+
}
|
|
916
|
+
if(config.sampling_duration_101_active){
|
|
917
|
+
promises.sampling_duration_101 = node.config_gateway.config_set_sampling_duration_101(mac, parseInt(config.sampling_duration_101));
|
|
918
|
+
}
|
|
919
|
+
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
920
|
+
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);
|
|
921
|
+
}
|
|
922
|
+
if(config.sampling_interval_101_active){
|
|
923
|
+
promises.sampling_interval_101 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_101));
|
|
924
|
+
}
|
|
925
|
+
if(config.full_scale_range_101_active){
|
|
926
|
+
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
927
|
+
}
|
|
928
|
+
if(config.mode_80_active){
|
|
929
|
+
promises.mode = node.config_gateway.config_set_operation_mode_80(mac, parseInt(config.mode_80));
|
|
930
|
+
}
|
|
931
|
+
if(config.filter_80_active){
|
|
932
|
+
promises.filter = node.config_gateway.config_set_filters_80(mac, parseInt(config.filter_80));
|
|
933
|
+
}
|
|
934
|
+
if(config.low_pass_filter_80_active){
|
|
935
|
+
promises.low_pass_filter = node.config_gateway.config_set_low_pass_filter_80(mac, parseInt(config.low_pass_filter_80));
|
|
936
|
+
}
|
|
937
|
+
if(config.high_pass_filter_80_active){
|
|
938
|
+
promises.high_pass_filter = node.config_gateway.config_set_high_pass_filter_80(mac, parseInt(config.high_pass_filter_80));
|
|
939
|
+
}
|
|
940
|
+
if(config.measurement_mode_80_active){
|
|
941
|
+
promises.measurement_mode = node.config_gateway.config_set_measurement_mode_80(mac, parseInt(config.measurement_mode_80));
|
|
942
|
+
}
|
|
943
|
+
if(config.on_request_timeout_80_active){
|
|
944
|
+
promises.on_request_timeout = node.config_gateway.config_set_on_request_timeout_80(mac, parseInt(config.on_request_timeout_80));
|
|
945
|
+
}
|
|
946
|
+
if(config.deadband_80_active){
|
|
947
|
+
promises.deadband = node.config_gateway.config_set_deadband_80(mac, parseInt(config.deadband_80));
|
|
948
|
+
}
|
|
949
|
+
if(config.payload_length_80_active){
|
|
950
|
+
promises.payload_length_80 = node.config_gateway.config_set_payload_length_80(mac, parseInt(config.payload_length_80));
|
|
951
|
+
}
|
|
952
|
+
if(config.set_rtc_101){
|
|
953
|
+
promises.set_rtc_101 = node.config_gateway.config_set_rtc_101(mac);
|
|
954
|
+
}
|
|
955
|
+
break;
|
|
956
|
+
case 181:
|
|
957
|
+
if(config.current_calibration_c1_80_active){
|
|
958
|
+
promises.current_calibration_c1_80_active = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|
|
959
|
+
}
|
|
960
|
+
if(config.current_calibration_c2_80_active){
|
|
961
|
+
promises.current_calibration_c2_80 = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c2_80), 3);
|
|
962
|
+
}
|
|
963
|
+
if(config.output_data_rate_p1_81_active){
|
|
964
|
+
promises.output_data_rate_p1_81 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_p1_81));
|
|
965
|
+
}
|
|
966
|
+
if(config.output_data_rate_p2_81_active){
|
|
967
|
+
promises.output_data_rate_p2_81 = node.config_gateway.config_set_output_data_rate_p2_81(mac, parseInt(config.output_data_rate_p2_81));
|
|
968
|
+
}
|
|
969
|
+
if(config.sampling_duration_p1_81_active){
|
|
970
|
+
promises.sampling_duration_p1_81 = node.config_gateway.config_set_sampling_duration_101(mac, parseInt(config.sampling_duration_p1_81));
|
|
971
|
+
}
|
|
972
|
+
if(config.sampling_duration_p2_81_active){
|
|
973
|
+
promises.sampling_duration_p2_81 = node.config_gateway.config_set_sampling_duration_p2_81(mac, parseInt(config.sampling_duration_p2_81));
|
|
974
|
+
}
|
|
975
|
+
if(config.x_axis_101 || config.y_axis_101 || config.z_axis_101){
|
|
976
|
+
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);
|
|
977
|
+
}
|
|
978
|
+
if(config.sampling_interval_101_active){
|
|
979
|
+
promises.sampling_interval_101 = node.config_gateway.config_set_sampling_interval_101(mac, parseInt(config.sampling_interval_101));
|
|
980
|
+
}
|
|
981
|
+
if(config.full_scale_range_101_active){
|
|
982
|
+
promises.full_scale_range_101 = node.config_gateway.config_set_full_scale_range_101(mac, parseInt(config.full_scale_range_101));
|
|
983
|
+
}
|
|
984
|
+
if(config.mode_80_active){
|
|
985
|
+
promises.mode = node.config_gateway.config_set_operation_mode_80(mac, parseInt(config.mode_80));
|
|
986
|
+
}
|
|
987
|
+
if(config.filter_80_active){
|
|
988
|
+
promises.filter = node.config_gateway.config_set_filters_80(mac, parseInt(config.filter_80));
|
|
989
|
+
}
|
|
990
|
+
if(config.low_pass_filter_80_active){
|
|
991
|
+
promises.low_pass_filter = node.config_gateway.config_set_low_pass_filter_80(mac, parseInt(config.low_pass_filter_80));
|
|
992
|
+
}
|
|
993
|
+
if(config.high_pass_filter_80_active){
|
|
994
|
+
promises.high_pass_filter = node.config_gateway.config_set_high_pass_filter_80(mac, parseInt(config.high_pass_filter_80));
|
|
995
|
+
}
|
|
996
|
+
if(config.low_pass_filter_81_p2_active){
|
|
997
|
+
promises.low_pass_filter_p2 = node.config_gateway.config_set_low_pass_filter_81_p2(mac, parseInt(config.low_pass_filter_81_p2));
|
|
998
|
+
}
|
|
999
|
+
if(config.high_pass_filter_81_p2_active){
|
|
1000
|
+
promises.high_pass_filter_p2 = node.config_gateway.config_set_high_pass_filter_81_p2(mac, parseInt(config.high_pass_filter_81_p2));
|
|
1001
|
+
}
|
|
1002
|
+
if(config.measurement_mode_80_active){
|
|
1003
|
+
promises.measurement_mode = node.config_gateway.config_set_measurement_mode_80(mac, parseInt(config.measurement_mode_80));
|
|
1004
|
+
}
|
|
1005
|
+
if(config.on_request_timeout_80_active){
|
|
1006
|
+
promises.on_request_timeout = node.config_gateway.config_set_on_request_timeout_80(mac, parseInt(config.on_request_timeout_80));
|
|
1007
|
+
}
|
|
1008
|
+
if(config.deadband_80_active){
|
|
1009
|
+
promises.deadband = node.config_gateway.config_set_deadband_80(mac, parseInt(config.deadband_80));
|
|
1010
|
+
}
|
|
1011
|
+
if(config.payload_length_80_active){
|
|
1012
|
+
promises.payload_length_80 = node.config_gateway.config_set_payload_length_80(mac, parseInt(config.payload_length_80));
|
|
1013
|
+
}
|
|
1014
|
+
if(config.set_rtc_101){
|
|
1015
|
+
promises.set_rtc_101 = node.config_gateway.config_set_rtc_101(mac);
|
|
1016
|
+
}
|
|
1017
|
+
break;
|
|
901
1018
|
case 200:
|
|
902
1019
|
if(config.low_calibration_420ma_active){
|
|
903
1020
|
promises.low_calibration_420ma = node.config_gateway.config_set_low_calibration_420ma(mac, parseInt(config.low_calibration_420ma));
|
|
@@ -957,7 +1074,7 @@ module.exports = function(RED) {
|
|
|
957
1074
|
promises.measurement_mode = node.config_gateway.config_set_measurement_mode_80(mac, parseInt(config.measurement_mode_80));
|
|
958
1075
|
}
|
|
959
1076
|
if(config.on_request_timeout_80_active){
|
|
960
|
-
promises.on_request_timeout = node.config_gateway.
|
|
1077
|
+
promises.on_request_timeout = node.config_gateway.config_set_on_request_timeout_80(mac, parseInt(config.on_request_timeout_80));
|
|
961
1078
|
}
|
|
962
1079
|
if(config.deadband_80_active){
|
|
963
1080
|
promises.deadband = node.config_gateway.config_set_deadband_80(mac, parseInt(config.deadband_80));
|
|
@@ -981,6 +1098,14 @@ module.exports = function(RED) {
|
|
|
981
1098
|
promises.set_rtc_101 = node.config_gateway.config_set_rtc_101(mac);
|
|
982
1099
|
}
|
|
983
1100
|
break;
|
|
1101
|
+
case 535:
|
|
1102
|
+
if(config.force_calibration_co2_535_active){
|
|
1103
|
+
promises.force_calibration_co2_535 = node.config_gateway.config_set_sensor_forced_calibration_535(mac);
|
|
1104
|
+
}
|
|
1105
|
+
if(config.temperature_offset_44_active){
|
|
1106
|
+
promises.temperature_offset_44 = node.config_gateway.config_set_sensor_temperature_offset_44(mac, parseInt(config.temperature_offset_44));
|
|
1107
|
+
}
|
|
1108
|
+
break;
|
|
984
1109
|
case 537:
|
|
985
1110
|
if(config.output_data_rate_101_active){
|
|
986
1111
|
promises.output_data_rate_101 = node.config_gateway.config_set_output_data_rate_101(mac, parseInt(config.output_data_rate_101));
|
|
@@ -1013,7 +1138,7 @@ module.exports = function(RED) {
|
|
|
1013
1138
|
promises.measurement_mode = node.config_gateway.config_set_measurement_mode_80(mac, parseInt(config.measurement_mode_80));
|
|
1014
1139
|
}
|
|
1015
1140
|
if(config.on_request_timeout_80_active){
|
|
1016
|
-
promises.on_request_timeout = node.config_gateway.
|
|
1141
|
+
promises.on_request_timeout = node.config_gateway.config_set_on_request_timeout_80(mac, parseInt(config.on_request_timeout_80));
|
|
1017
1142
|
}
|
|
1018
1143
|
if(config.deadband_80_active){
|
|
1019
1144
|
promises.deadband = node.config_gateway.config_set_deadband_80(mac, parseInt(config.deadband_80));
|
|
@@ -1037,10 +1162,33 @@ module.exports = function(RED) {
|
|
|
1037
1162
|
promises.set_rtc_101 = node.config_gateway.config_set_rtc_101(mac);
|
|
1038
1163
|
}
|
|
1039
1164
|
break;
|
|
1165
|
+
case 537:
|
|
1166
|
+
if(config.stay_on_mode_539_active){
|
|
1167
|
+
promises.stay_on_mode_539 = node.config_gateway.config_set_stay_on_mode_539(mac, parseInt(config.stay_on_mode_539));
|
|
1168
|
+
}
|
|
1169
|
+
if(config.baudrate_539_active){
|
|
1170
|
+
promises.baudrate_539 = node.config_gateway.config_set_baudrate_539(mac, parseInt(config.baudrate_539));
|
|
1171
|
+
}
|
|
1172
|
+
if(config.rx_timeout_539_active){
|
|
1173
|
+
promises.rx_timeout_539 = node.config_gateway.config_set_rx_timeout_539(mac, parseInt(config.rx_timeout_539));
|
|
1174
|
+
}
|
|
1175
|
+
if(config.bootup_time_539_active){
|
|
1176
|
+
promises.bootup_time_539 = node.config_gateway.config_set_bootup_time_539(mac, parseInt(config.bootup_time_539));
|
|
1177
|
+
}
|
|
1178
|
+
if(config.sensor_add_539_active){
|
|
1179
|
+
promises.sensor_add_539 = node.config_gateway.config_set_sensor_add_539(mac, parseInt(config.sensor_add_539));
|
|
1180
|
+
}
|
|
1181
|
+
if(config.rs_node_id_539_active){
|
|
1182
|
+
promises.rs_node_id_539 = node.config_gateway.config_set_rs_node_id_539(mac, parseInt(config.rs_node_id_539));
|
|
1183
|
+
}
|
|
1184
|
+
if(config.number_of_regs_to_rd_539_active){
|
|
1185
|
+
promises.number_of_regs_to_rd_539 = node.config_gateway.config_set_number_of_regs_to_rd_539(mac, parseInt(config.number_of_regs_to_rd_539));
|
|
1186
|
+
}
|
|
1187
|
+
break;
|
|
1040
1188
|
}
|
|
1041
1189
|
}
|
|
1042
1190
|
// These sensors listed in original_otf_devices use a different OTF code.
|
|
1043
|
-
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102 , 518, 519, 520];
|
|
1191
|
+
let original_otf_devices = [53, 80, 81, 82, 83, 84, 101, 102, 180, 181, 518, 519, 520];
|
|
1044
1192
|
// If we changed the network ID reboot the sensor to take effect.
|
|
1045
1193
|
// TODO if we add the encryption key command to node-red we need to reboot for it as well.
|
|
1046
1194
|
if(reboot){
|