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

https://www.meethue.com/api/nupnp is now HTTPS #14

Closed jmuehlner closed 10 years ago

jmuehlner commented 10 years ago

It looks like the https://www.meethue.com/api/nupnp endpoint has now changed to require https - requests to http://www.meethue.com/api/nupnp get redirected - this causes an error when attempting to use node-hue-api.locateBridges:

/path/node_modules/node-hue-api/node_modules/q/q.js:126 throw e; ^ Api Error: Unexpected response status; 302 at _checkResponse (/path/node_modules/node-hue-api/hue-api/httpPromise.js:93:15) at _fulfilled (/path/node_modules/node-hue-api/node_modules/q/q.js:798:54) at self.promiseDispatch.done (/path/node_modules/node-hue-api/node_modules/q/q.js:827:30) at Promise.promise.promiseDispatch (/path/node_modules/node-hue-api/node_modules/q/q.js:760:13) at /path/node_modules/node-hue-api/node_modules/q/q.js:574:44 at flush (/path/node_modules/node-hue-api/node_modules/q/q.js:108:17) at process._tickCallback (node.js:415:13)

peter-murray commented 10 years ago

Thanks for pointing that out.

I am going to replace the underlying http requests with request instead of q-io as the https change is also causing issues with signing when I do hit the https endpoint.

I will get on to this this weekend and release an update by Sunday night to npm to resolve this.

jmuehlner commented 10 years ago

Awesome! I hacked together something with request myself and it seems to work; that looks like a good way to go. I look forward to the updated package.

James

On Thu, Jun 12, 2014 at 1:22 PM, Peter Murray notifications@github.com wrote:

Thanks for pointing that out.

I am going to replace the underlying http requests with request instead of q-io as the https change is also causing issues with signing when I do hit the https endpoint.

I will get on to this this weekend and release an update by Sunday night to npm to resolve this.

— Reply to this email directly or view it on GitHub https://github.com/peter-murray/node-hue-api/issues/14#issuecomment-45942962 .