@ncd-io/node-red-enterprise-sensors 0.1.17 → 0.1.19
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 +13 -2
- package/package.json +1 -1
- package/wireless.html +17 -1
- package/wireless.js +3 -0
package/lib/WirelessGateway.js
CHANGED
|
@@ -883,6 +883,16 @@ module.exports = class WirelessSensor{
|
|
|
883
883
|
packet.push(...cal_val);
|
|
884
884
|
return this.config_send(sensor_mac, packet);
|
|
885
885
|
}
|
|
886
|
+
config_set_sensor_temperature_offset_44(sensor_mac, value){
|
|
887
|
+
console.log('config_set_sensor_temperature_offset_44');
|
|
888
|
+
// convert before processing
|
|
889
|
+
value = value * 100;
|
|
890
|
+
var packet = [244, 30, 0, 0, 0];
|
|
891
|
+
var cal_val = int2Bytes(value, 2);
|
|
892
|
+
packet.push(...cal_val);
|
|
893
|
+
console.log(packet);
|
|
894
|
+
return this.config_send(sensor_mac, packet);
|
|
895
|
+
}
|
|
886
896
|
config_set_output_data_rate_p2_81(sensor_mac, output_rate){
|
|
887
897
|
console.log('config_set_output_data_rate_p2_81');
|
|
888
898
|
var packet = [244, 79, 0, 0, 101, 36, output_rate];
|
|
@@ -2468,11 +2478,12 @@ function sensor_types(parent){
|
|
|
2468
2478
|
name: 'Wireless CO Sensor',
|
|
2469
2479
|
parse: (d) => {
|
|
2470
2480
|
return {
|
|
2471
|
-
|
|
2481
|
+
humidity: msbLsb(d[0], d[1])/100,
|
|
2482
|
+
temperature: signInt((msbLsb(d[2], d[3])), 16)/100,
|
|
2483
|
+
co_ppm: msbLsb(d[4], d[5])
|
|
2472
2484
|
};
|
|
2473
2485
|
}
|
|
2474
2486
|
},
|
|
2475
|
-
|
|
2476
2487
|
'77': {
|
|
2477
2488
|
name: '3 Channel SDI-12 Wireelss',
|
|
2478
2489
|
parse: (d) => {
|
package/package.json
CHANGED
package/wireless.html
CHANGED
|
@@ -226,6 +226,9 @@
|
|
|
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
|
+
temperature_offset_44_active: {value: ""},
|
|
230
|
+
temperature_offset_44: {value: 4, validate: NCD_validators.number_range(0, 25)},
|
|
231
|
+
|
|
229
232
|
filtering: {value: 0, validate: RED.validators.number()},
|
|
230
233
|
data_rate: {value: 5, validate: RED.validators.number()},
|
|
231
234
|
time_series: {value: 0, validate: RED.validators.number()},
|
|
@@ -1038,7 +1041,19 @@
|
|
|
1038
1041
|
<input type="text" id="node-input-force_calibration_co2" placeholder="455" value="455">
|
|
1039
1042
|
</div>
|
|
1040
1043
|
</div>
|
|
1041
|
-
|
|
1044
|
+
<div class="form-row ncd-active-check">
|
|
1045
|
+
<div>
|
|
1046
|
+
<strong>Temperature Offset</strong>
|
|
1047
|
+
</div>
|
|
1048
|
+
<div>
|
|
1049
|
+
<label for="node-input-temperature_offset_44_active"><i class="icon-tag"></i> Auto Config</label>
|
|
1050
|
+
<input type="checkbox" id="node-input-temperature_offset_44_active" class="ncd-config-toggle" data-target-id="node-input-temperature_offset_44" value="1">
|
|
1051
|
+
</div>
|
|
1052
|
+
<div>
|
|
1053
|
+
<label for="node-input-temperature_offset_44"><i class="icon-tag"></i> Value</label>
|
|
1054
|
+
<input type="text" id="node-input-temperature_offset_44" placeholder="4" value="4">
|
|
1055
|
+
</div>
|
|
1056
|
+
</div>
|
|
1042
1057
|
<div class="ncd-dependent" data-sensor-84 data-sensor-519 data-sensor-537>
|
|
1043
1058
|
<hr>
|
|
1044
1059
|
<div class="form-row ncd-active-check">
|
|
@@ -1105,6 +1120,7 @@
|
|
|
1105
1120
|
<hr>
|
|
1106
1121
|
<div class="form-row ncd-active-check">
|
|
1107
1122
|
<strong>Mode</strong>
|
|
1123
|
+
<p>WARNING: If Mode is set to Raw it is recommended to also set the Destination Address configuration to the address of your Receiver/Gateway.</p>
|
|
1108
1124
|
<div>
|
|
1109
1125
|
<label for="node-input-mode_80_active"><i class="icon-tag"></i>Active:</label>
|
|
1110
1126
|
<input type="checkbox" id="node-input-mode_80_active" class="ncd-config-toggle" data-target-id="node-input-mode_80" value="1">
|
package/wireless.js
CHANGED
|
@@ -513,6 +513,9 @@ module.exports = function(RED) {
|
|
|
513
513
|
if(config.force_calibration_co2_auto_config){
|
|
514
514
|
promises.sensor_forced_calibration = node.config_gateway.config_set_sensor_forced_calibration(mac, parseInt(config.force_calibration_co2));
|
|
515
515
|
}
|
|
516
|
+
if(config.temperature_offset_44_active){
|
|
517
|
+
promises.temperature_offset_44 = node.config_gateway.config_set_sensor_temperature_offset_44(mac, parseInt(config.temperature_offset_44));
|
|
518
|
+
}
|
|
516
519
|
break;
|
|
517
520
|
case 45:
|
|
518
521
|
if(config.sensor_boot_time_420ma_active){
|