New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iotclient

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iotclient - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

LICENSE

27

application/IoTAppClient.js

@@ -27,3 +27,3 @@ /**

var APP_MON_RE = /^iot-2\/app\/(.+)\/mon$/;
var SUPPORTED_CALLBACKS = ['deviceEvent', 'deviceCommand', 'deviceStatus', 'appStatus'];
var SUPPORTED_CALLBACKS = ['deviceEvent', 'deviceCommand', 'deviceStatus', 'appStatus', 'disconnect'];

@@ -68,2 +68,3 @@ var BROKER_PORT = 1883;

this.subscriptionCount = 0;
this.retryCount = 0;

@@ -75,3 +76,3 @@ // tests should manually override these properties

this.logger.trace("IoTAppClient constructed: " + this.appId+", "+this.apiKey+", "+this.apiToken+", "+this.orgId+", "+this.clientId);
this.logger.trace("IoTAppClient constructed: " + this.appId + ", " + this.orgId + ", " + this.clientId);
}

@@ -94,3 +95,5 @@

username: this.apiKey,
password: this.apiToken
password: this.apiToken,
reconnectPeriod: 1000
// keepalive: 10
});

@@ -102,2 +105,3 @@

this.mqttClient.on('connect',function(packet){
this.connected = true;
self.logger.trace("CONNECTED......: \nSubscription Count = " + self.subscriptionCount);

@@ -110,6 +114,19 @@ for(var count = 0 ; count < self.subscriptionCount ; count++) {

}
self.retryCount = 0;
});
// client.subscribe('mytopic');
});
this.mqttClient.on('error', function(error){
self.logger.trace("\n\nError Error Error " + error);
this.connected = false;
});
this.mqttClient.on('close', function(){
self.retryCount++;
self.logger.trace("Retry count = " + self.retryCount);
if(self.retryCount <= 60 ) {
self.mqttClient.options.reconnectPeriod = self.retryCount * 1000;
}
});
this.mqttClient.on('message', function(topic, payload){

@@ -116,0 +133,0 @@ self.logger.trace("mqtt: ", topic, payload);

9

package.json
{
"readme": "This iotclient module can be used in an app to connect to IBM IoT Cloud.\n\nIt contains multiple callbacks to make an app subscribe to \nDevice Event, \nDevice Command, \nDevice Status and \nApplication Status.\nIt can also be used to publish, \nDevice Events, on the behalf of a device and \nDevice Commands. \n\nThis can be used for both \nQuickstart and \n Registered flow",
"readmeFilename": "README.md",
"name": "iotclient",
"version": "0.0.5",
"version": "0.0.6",
"description": "This iotClient module can be used for developing node.js client code for IBM IoT Cloud Foundation.",

@@ -17,5 +18,5 @@ "main": "application/IoTAppClient.js",

},
"author": {
"name": "Amit M Mangalvedkar, Tom Klapiscak, Sam Danbury"
}
"author": "Amit M Mangalvedkar <amitmangalvedkar@gmail.com>",
"contributors" : [ { "name" : "Tom Klapiscak" }, { "name" : "Sam Danbury" } ],
"license" : "Apache"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc