hjespers / node-red-contrib-nest

Node-Red module for Nest thermostats and smoke detectors
20 stars 15 forks source link

Generate token not working in bluemix #1

Open willcampos opened 9 years ago

willcampos commented 9 years ago

Hi, I have been use the node for some tests, I notice when I upload to bluemix, it does not allow to authenticate the PIN.

Is there any instruction I am missing on bluemix?

Thanks,

W

jambo13 commented 8 years ago

Hi there, I've also got a similar issue, where I cannot generate the access token using the button. When I create the access token manually via a HTTP POST request and copy & paste it in I still don't have ability to click the 'Add' button Thanks, J

yamtam commented 8 years ago

Same issue here. Tried multiple browsers. Will let you generate pincode but that's as far as it goes

hjespers commented 8 years ago

Does Bluemix have a firewall that prevents the node-red engine from making outbound HTTPS calls (on port 443) to get the access token? If so you will have to setup your security settings to allow it to call out. This will need to be setup anyway for post-setup communication to work.

JonSilver commented 8 years ago

Same issue here, running on node-red 0.14.6 on a raspberry pi 3. Authorize button works, then I copy and paste the PIN. But clicking on Generate Token does absolutely nothing. Can't click Add until token is generated. Tried it on several browsers. Looking behind the scenes, there's a URL being generated in the script in nest.html with a GET method which results in a 404...

https://{my-node-red-server}/nest-credentials/{node-id}/{nest-product-id}/{nest-product-secret}/{nest-authorization-code}/auth

So in my case it's node-red's failure to serve this endpoint which is causing token generation to fail.

hjespers commented 8 years ago

@JonSilver are you running on a non-standard node-red port (something other than 1880) or with login credentials? Just wondering why the lop back would fail for you and not me.

JonSilver commented 8 years ago

@hjespers No, it's on 1880, and I have only admin credentials, no login on httpNodes. I use https, employing a LetsEncrypt certificate with a full chain cert. At some point in the past year, on another installation and a previous version of your code and node-red, it worked with a seemingly identical setup.

Courty40 commented 7 years ago

@JonSilver and @hjespers - did you get to the bottom of the Token generation on a Pi 3 ? I appear to have the same issue

Courty

JonSilver commented 7 years ago

No. It happens on one installation and not on another. The bad behaviour on the troublesome installation persists across Node-Red version upgrades. I’ve no idea why. That Pi has no other issues. It doesn’t matter how many times I uninstall the nest plugin and reinstall it. I gave up talking to Nest.

From: Courty [mailto:notifications@github.com] Sent: 16 January 2017 16:11 To: hjespers/node-red-contrib-nest node-red-contrib-nest@noreply.github.com Cc: Jon Silver js@jfdi.info; Mention mention@noreply.github.com Subject: Re: [hjespers/node-red-contrib-nest] Generate token not working in bluemix (#1)

@JonSilverhttps://github.com/JonSilver and @hjespershttps://github.com/hjespers - did you get to the bottom of the Token generation on a Pi 3 ? I appear to have the same issue

Courty

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hjespers/node-red-contrib-nest/issues/1#issuecomment-272902755, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIbAgsyDBBAQKGOTUZ9I3jwwlXhEypkiks5rS5apgaJpZM4FWwq3.

langanjp commented 7 years ago

The issues is that bluemix adds a red to the normal node-red url. So normally its http://server:1800/, but bluemix is https://yournode.bluemix.net/red ... the red is not included in the generated URL. I will try to add a permanent fix but for now if you want to get to try a temp fix that will work in bluemix, you can add this line to the package.json to reference my fork: "node-red-contrib-nest":"git://github.com/langanjp/node-red-contrib-nest.git"