@ncd-io/node-red-enterprise-sensors 1.2.0 → 1.2.1
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 +14 -0
- package/package.json +1 -1
- package/wireless.html +27 -1
- package/wireless.js +8 -0
package/lib/WirelessGateway.js
CHANGED
|
@@ -1985,6 +1985,20 @@ module.exports = class WirelessSensor{
|
|
|
1985
1985
|
console.log(packet);
|
|
1986
1986
|
return this.config_send(sensor_mac, packet);
|
|
1987
1987
|
}
|
|
1988
|
+
config_set_tare_the_scale_217(sensor_mac){
|
|
1989
|
+
console.log('config_set_tare_the_scale_217');
|
|
1990
|
+
var packet = [244, 32, 0, 0, 26];
|
|
1991
|
+
console.log(packet);
|
|
1992
|
+
return this.config_send(sensor_mac, packet);
|
|
1993
|
+
}
|
|
1994
|
+
config_set_weight_calib_217(sensor_mac, value){
|
|
1995
|
+
console.log('config_set_weight_calib_217');
|
|
1996
|
+
var packet = [244, 33, 0, 0, 26];
|
|
1997
|
+
let value_ = int2Bytes((value*100), 4);
|
|
1998
|
+
packet.push(...value_);
|
|
1999
|
+
console.log(packet);
|
|
2000
|
+
return this.config_send(sensor_mac, packet);
|
|
2001
|
+
}
|
|
1988
2002
|
config_get_delay(sensor_mac){
|
|
1989
2003
|
return new Promise((fulfill, reject) => {
|
|
1990
2004
|
this.config_send(sensor_mac, [247, 21, 0, 0, 0]).then((res) => {
|
package/package.json
CHANGED
package/wireless.html
CHANGED
|
@@ -686,7 +686,11 @@
|
|
|
686
686
|
sensor_reset_120: {value:0},
|
|
687
687
|
sensor_calib_120: {value:0},
|
|
688
688
|
alert_threshold_120_active: {value: ""},
|
|
689
|
-
alert_threshold_120: {value: 0, validate: NCD_validators.number_range(0, 40)}
|
|
689
|
+
alert_threshold_120: {value: 0, validate: NCD_validators.number_range(0, 40)},
|
|
690
|
+
|
|
691
|
+
tare_the_scale_217: {value:0},
|
|
692
|
+
weight_calib_217_active: {value: ""},
|
|
693
|
+
weight_calib_217: {value: 0}
|
|
690
694
|
},
|
|
691
695
|
inputs: 0,
|
|
692
696
|
outputs: 1,
|
|
@@ -4326,6 +4330,28 @@
|
|
|
4326
4330
|
</div>
|
|
4327
4331
|
</div>
|
|
4328
4332
|
</div>
|
|
4333
|
+
<div class="ncd-dependent" data-sensor-217>
|
|
4334
|
+
<div class="form-row ncd-active-check">
|
|
4335
|
+
<strong>Tare The Scale</strong>
|
|
4336
|
+
<div>
|
|
4337
|
+
<label for="node-input-tare_the_scale_217"><i class="icon-tag"></i>Active:</label>
|
|
4338
|
+
<input type="checkbox" id="node-input-tare_the_scale_217" value="1">
|
|
4339
|
+
</div>
|
|
4340
|
+
</div>
|
|
4341
|
+
<div class="form-row ncd-active-check">
|
|
4342
|
+
<div>
|
|
4343
|
+
<strong>Set Weight Calibration</strong>
|
|
4344
|
+
</div>
|
|
4345
|
+
<div>
|
|
4346
|
+
<label for="node-input-weight_calib_217_active"><i class="icon-tag"></i>Active:</label>
|
|
4347
|
+
<input type="checkbox" id="node-input-weight_calib_217_active" class="ncd-config-toggle" data-target-id="node-input-weight_calib_217" value="1">
|
|
4348
|
+
</div>
|
|
4349
|
+
<div>
|
|
4350
|
+
<label for="node-input-weight_calib_217"><i class="icon-tag"></i> Value</label>
|
|
4351
|
+
<input type="text" id="node-input-weight_calib_217" placeholder="0" value="0">
|
|
4352
|
+
</div>
|
|
4353
|
+
</div>
|
|
4354
|
+
</div>
|
|
4329
4355
|
</div>
|
|
4330
4356
|
</div>
|
|
4331
4357
|
</script>
|
package/wireless.js
CHANGED
|
@@ -2439,6 +2439,14 @@ module.exports = function(RED) {
|
|
|
2439
2439
|
promises.probe_boot_time_202 = node.config_gateway.config_set_probe_boot_time_202(mac, parseInt(config.probe_boot_time_202));
|
|
2440
2440
|
}
|
|
2441
2441
|
break;
|
|
2442
|
+
case 217:
|
|
2443
|
+
if(config.tare_the_scale_217){
|
|
2444
|
+
promises.tare_the_scale_217 = node.config_gateway.config_set_tare_the_scale_217(mac);
|
|
2445
|
+
}
|
|
2446
|
+
if(config.weight_calib_217_active){
|
|
2447
|
+
promises.weight_calib_217 = node.config_gateway.config_set_weight_calib_217(mac, parseInt(config.weight_calib_217));
|
|
2448
|
+
}
|
|
2449
|
+
break;
|
|
2442
2450
|
case 505:
|
|
2443
2451
|
if(config.current_calibration_c1_80_active){
|
|
2444
2452
|
promises.current_calibration_c1_80_active = node.config_gateway.config_set_current_calibration_individual_80(mac, parseInt(config.current_calibration_c1_80), 1);
|