@lifefinder/vsm-mqtt-client-open-source 0.0.61 → 0.0.62

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifefinder/vsm-mqtt-client-open-source",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "description": "MQTT client for vsm sensors",
5
5
  "main": "vsm-mqtt-client.js",
6
6
  "author": "Lars Mats",
@@ -103,7 +103,7 @@ exports.getMqttClient = () => {
103
103
  return mqtt_client;
104
104
  }
105
105
 
106
- exports.sendDownlink = async (args, deveui, port, buffer) => {
106
+ exports.sendDownlink = async (args, deveui, port, buffer, confirmed = false) => {
107
107
  if (!args || !deveui || !port || !buffer)
108
108
  throw { message: "sendDownlink: Required argument missing"};
109
109
 
@@ -115,7 +115,7 @@ exports.sendDownlink = async (args, deveui, port, buffer) => {
115
115
  if (!this.getMqttClient())
116
116
  throw { message: "sendDownlink: MQTT not initialized."};
117
117
 
118
- await integration.api.sendDownlink(this.getMqttClient(), args, deveui, port, Buffer.from(buffer, "hex"), false /* confirmed */ );
118
+ await integration.api.sendDownlink(this.getMqttClient(), args, deveui, port, Buffer.from(buffer, "hex"), confirmed === true);
119
119
  }
120
120
 
121
121
  const run = async () => {