Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-misfit-bolt

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-misfit-bolt - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

30

lib/accessory.js

@@ -17,2 +17,3 @@ var debug = require('debug')(require('../package').name);

this.log = log;
this.timeout = config.timeout || 5000;
this.disconnectTimeout = config.disconnectTimeout || 10000;

@@ -22,14 +23,3 @@ }

MisfitBoltAccessory.prototype.initialize = function (callback) {
var bolt = this.bolt,
that = this;
bolt.connect(function(error) {
bolt.getRGBA(function(error, rgba) {
debug('Initial RGBA:', rgba);
that.color = new Color(`rgba(${rgba})`);
that.brightness = rgba.pop();
that.disconnect();
callback();
});
});
this.getRGBA(callback);
};

@@ -102,7 +92,19 @@

var that = this,
bolt = this.bolt;
bolt = this.bolt,
timedout = false,
timer = setTimeout(function() {
timedout = true;
debug('timed out');
callback();
}, this.timeout);
debug('will get');
bolt.connect(function() {
bolt[method](function(error, value) {
that.disconnect();
callback(value);
clearTimeout(timer);
if (!timedout) {
debug('got value:', value);
callback(value);
}
});

@@ -109,0 +111,0 @@ });

{
"name": "homebridge-misfit-bolt",
"version": "0.0.6",
"version": "0.0.7",
"description": "Misfit Bolt plugin for homebridge",

@@ -5,0 +5,0 @@ "keywords": [

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