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

hap-node-client

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hap-node-client - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

README.md.orig.2020-11-15_192543

60

HAPNodeJSClient.js

@@ -95,3 +95,3 @@ 'use strict';

*
* { host: '192.168.1.4', port: 51826, aid: 16, iid: 11, status: false }
* [{"host":"192.168.1.13","port":43787,"deviceID":"76:59:CE:25:B9:6E","aid":1,"iid":13,"value":true,"status":true}]
*/

@@ -301,3 +301,18 @@ this.emit('hapEvent', events);

// debug('This', this, server);
var events = [];
this.eventRegistry[server.deviceID].forEach(function(device) {
events.push({
deviceID: server.deviceID,
aid: device.aid,
iid: device.iid,
status: -70402
});
});
this.emit('hapEvent', events);
// this.emit(events[0].host + events[0].port + events[0].aid, events);
events.forEach(function(event) {
// debug('hapEvent', event.host + event.port + event.aid + event.iid, event);
// this.emit(event.host + event.port + event.aid + event.iid, event);
this.emit(event.deviceID + event.aid + event.iid, event);
}.bind(this));
var reconnectTimer;

@@ -308,3 +323,3 @@ if (server.deviceID) {

characteristics: this.eventRegistry[server.deviceID]
}), clearTimer);
}), clearTimer.bind(this));
}.bind(this), 60000);

@@ -315,3 +330,3 @@ } else {

characteristics: this.eventRegistry[server.server]
}), clearTimer);
}), clearTimer.bind(this));
}.bind(this), 60000);

@@ -323,4 +338,41 @@ }

debug('HAPevent event reregister failed, retry in 60', server);
/*
*
* [{"host":"192.168.1.13","port":43787,"deviceID":"76:59:CE:25:B9:6E","aid":1,"iid":13,"value":true,"status":true}]
*/
debug('clearTimer', server, this.eventRegistry[server.deviceID]);
var events = [];
this.eventRegistry[server.deviceID].forEach(function(device) {
events.push({
deviceID: server.deviceID,
aid: device.aid,
iid: device.iid,
status: -70402
});
});
this.emit('hapEvent', events);
// this.emit(events[0].host + events[0].port + events[0].aid, events);
events.forEach(function(event) {
// debug('hapEvent', event.host + event.port + event.aid + event.iid, event);
// this.emit(event.host + event.port + event.aid + event.iid, event);
this.emit(event.deviceID + event.aid + event.iid, event);
}.bind(this));
} else {
debug('HAPevent event reregister succeeded', server);
var events = [];
this.eventRegistry[server.deviceID].forEach(function(device) {
events.push({
deviceID: server.deviceID,
aid: device.aid,
iid: device.iid,
status: true
});
});
this.emit('hapEvent', events);
// this.emit(events[0].host + events[0].port + events[0].aid, events);
events.forEach(function(event) {
// debug('hapEvent', event.host + event.port + event.aid + event.iid, event);
// this.emit(event.host + event.port + event.aid + event.iid, event);
this.emit(event.deviceID + event.aid + event.iid, event);
}.bind(this));
clearInterval(reconnectTimer);

@@ -327,0 +379,0 @@ }

2

lib/eventedHttpClient.js

@@ -114,3 +114,3 @@ // Monkey patch before you require http for the first time.

'value': key.value,
'status': key.value
'status': true
};

@@ -117,0 +117,0 @@ events.push(event);

{
"name": "hap-node-client",
"version": "0.1.8",
"version": "0.1.9",
"description": "Client for Hap-NodeJS",

@@ -5,0 +5,0 @@ "main": "HAPNodeJSClient.js",

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