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

hap-alexa

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hap-alexa - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

package.json
{
"name": "hap-alexa",
"version": "0.0.5",
"version": "0.0.6",
"description": "HAP-NodeJS Modules to support Amazon Alexa Integration",
"main": "index.js",
"main": "ssdp.js",
"scripts": {

@@ -7,0 +7,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

@@ -21,2 +21,11 @@ 'use strict';

// Amazon Alex / Hue discovery message on port 50000
// M-SEARCH * HTTP/1.1
// HOST: 239.255.255.250:1900
// MAN: "ssdp:discover"
// MX: 15 - Up to 15 seconds to respond
// ST: urn:schemas-upnp-org:device:basic:1
//
function getDiscoveryResponses() {

@@ -82,7 +91,9 @@

var response = getDiscoveryResponses();
udpServer.send(response, rinfo.port, rinfo.address, () => {
debug('>> sent response ssdp discovery response', response);
sleep(Math.random()*15000).then(() => {
// Do something after the sleep!
udpServer.send(response, rinfo.port, rinfo.address, () => {
debug('>> sent response ssdp discovery response', response);
});
});
}

@@ -94,3 +105,3 @@ });

const address = udpServer.address();
debug(`server listening ${address.address}:${address.port}`);
debug(`server listening ${address.address}:${address.port}`, ip.address());
//TODO: Add logical interface

@@ -183,3 +194,7 @@ udpServer.addMembership('239.255.255.250', ip.address());

function getHueBridgeMac() {
return (config.username)
return (config.username)
}
function sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
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