peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.19k stars 145 forks source link

nupnpSearch() can not discover bridges #102

Closed mstfldmr closed 7 years ago

mstfldmr commented 7 years ago

nupnpSearch() function can not discover bridges both using a promise and a callback:

// Using a promise
hue.nupnpSearch().then(displayBridges).done();

// Using a callback
hue.nupnpSearch(function(err, result) {
    if (err) throw err;
    displayBridges(result);
});

However, upnpSearch() function can discover them:

hue.upnpSearch(timeout).then(displayBridges).done();

My NodeJS version is: 4.4.0

# node --version
v4.4.0
peter-murray commented 7 years ago

Using node.js 4.4.7 the upnpSearch() function works for me. You have to have registered the bridge online before you can successfully call the function and get results, as this is just hitting the https://www.meethue.com/api/nupnp endpoint.