Closed gruler closed 2 years ago
What is your relink url in the Honeywell developer app?
And what is the relink url in the plugin?
Where do I get that info?
Hit Unlink:
Then you should see this screen. Does it look like this?
I previously had unlinked the account. Now when I click on Honeywell Home Settings I get the attached a page that looks like this. When I enter the credentials, I get the error message. {"code":400, "message":"The redirect URL provided does not match the redirect URL registered for the app."}
you need to respond directly on Github, I am not seeing anything you sent.
I previously had unlinked the account. Now when I click on Honeywell Home Settings I get the attached a page that looks like this. When I enter the credentials, I get the error message. {"code":400, "message":"The redirect URL provided does not match the redirect URL registered for the app."}
click the back arrow and send that screenshot.
Is that the url here the same as the developer app?
I went into Resido and found this http://localhost:8585/
I changed it to include AUTH at the end, but now I am getting cannot connect to Local Host
Try without including with at the end in the app.
I may have to update some things. But you should be able to get it to work.
Same error after removing the AUTH {"code":400, "message":"The redirect URL provided does not match the redirect URL registered for the app."}
I am seeing a very similar error. I tried to relink today.
@mgldan, Your callback url in the Honeywell app is 8581 and should be 8585
Donavan, mine is 8585 and I am getting the below error. I've tried with and without AUTH in the callback
@donavanbecker Thanks, I’m not sure how they got out of sync. It must have been while I was trying to troubleshoot. I changed the callback URL at Honeywell’s site and it cleared up.
I definitely had the same 400 error as the OP at one point. Maybe the fix was some combination of clearing my cache, deleting my old Honeywell app, and relinking…
Need to update the ui so it doesn't post the auth in that UI, that's confusing.
So, do I need to do something to get it to work or do you need to do something with the plugin?
Thanks, Jim
Still researching. I think Honeywell might have did something recently. Because mine was working and now it isn't.
Not sure if it's relevant at this point, but I'm definitely experiencing the same issue. I currently can't link my honeywell app to the HB plugin.
Please try latest beta
I will be happy to do that, but I don't know how :)
I figured it out. Now says I'm running v11.4.5-beta.4. Error persists.
Made it a bit further... the server.js in the beta has not picked up the dropping of the 'auth' tag. I manually made the changes in my installation, and now it gets further when linking. It makes me put in my Resideo login/pass, and I can then select my thermostats. Eventually it just says 'welcome to the server' and the plugin never picks up a config or gets any further. So progress, but still stuck.
@rrmills7777 can you put those changes into a pull request and then we can look into this further. I just haven't had time.
You already made 2 commits on Sep 8 for this issue. The first removed the 'auth' from index.html and server.js in homebridge-ui, the second reverted the change to server.js. You just need to revert that last commit.
Is this what you are talking about?
I tried removing auth in server.js and that didn't work.
Need to look over documentation again to see what they changed.
I have it working. It involves changing a switch statement to look for nothing, which I don't love.
case 'auth':
becomes
case '':
If you want i can put in a pull request and see if you have a better idea than I do about how to handle that case.
OK, I honestly have no idea how to do a pull request. Here are the changes I had to make to get it to work:
index f587cbf..f21ef70 100644
--- a/homebridge-ui/public/index.html
+++ b/homebridge-ui/public/index.html
@@ -254,7 +254,7 @@
}
showIntro = () => {
const introLink = document.getElementById('introLink')
- document.getElementById('copyMe').value = 'http://' + hostname + ':8585/'
+ document.getElementById('copyMe').value = 'http://' + hostname + ':8585'
introLink.addEventListener('click', () => {
homebridge.showSpinner()
document.getElementById('pageIntro').style.display = 'none'
diff --git a/homebridge-ui/server.js b/homebridge-ui/server.js
index 2617fc9..63cf1bd 100644
--- a/homebridge-ui/server.js
+++ b/homebridge-ui/server.js
@@ -29,12 +29,12 @@ class PluginUiServer extends HomebridgePluginUiServer {
this.secret = query.secret;
this.hostname = query.host;
const url = 'https://api.honeywell.com/oauth2/authorize?' +
- 'response_type=code&redirect_uri=' + encodeURI('http://' + this.hostname + ':8585/auth') + '&' +
+ 'response_type=code&redirect_uri=' + encodeURI('http://' + this.hostname + ':8585') + '&' +
'client_id=' + query.key;
res.end('<script>window.location.replace(\'' + url + '\');</script>');
break;
}
- case 'auth': {
+ case '': {
if (query.code) {
const code = query.code;
const auth = Buffer.from(this.key + ':' + this.secret).toString('base64');
@@ -46,7 +46,7 @@ class PluginUiServer extends HomebridgePluginUiServer {
curlString += '-d "';
curlString += 'grant_type=authorization_code&';
curlString += 'code=' + code + '&';
- curlString += 'redirect_uri=' + encodeURI('http://' + this.hostname + ':8585/auth');
+ curlString += 'redirect_uri=' + encodeURI('http://' + this.hostname + ':8585');
curlString += '" ';
curlString += '"https://api.honeywell.com/oauth2/token"';
try {
I'm also running into this issue only on HOOBS though. Works fine on HB UI. The url on HOOBS is https://homebridge-honeywell.iot.oz.nu/link-account which isn't a valid URL even though I set it as my redirect URL on the HoneyWell dev side
@juan2three I don't develop this for HOOBs. So can't help you there.
I would recommend switching to homebridge
@juan2three I don't develop this for HOOBs. So can't help you there.
I would recommend switching to homebridge
I did, it works perfectly fine. HOOBs is claiming you are the developer of the official plugin, I left a review but I'm not sure if you want to report it
@juan2three I don't develop this for HOOBs. So can't help you there.
I would recommend switching to homebridge
I did, it works perfectly fine. HOOBs is claiming you are the developer of the official plugin, I left a review but I'm not sure if you want to report it
I am the developer of this plugin, but HOOBs does their own kind of homebridge and UI, so I can't guarantee things will work, since I only develop for homebridge and homebridge UI.
Issue still exists for 1.0.0 release of plugin renamed to resideo
Must only be for specific accounts, mine is working fine.
Thanks, I’m not sure how they got out of sync. It must have been while I was trying to troubleshoot. I changed the callback URL at Honeywell’s site and it cleared up. On Sep 5, 2022, 8:00 PM -0400, Donavan Becker @.***>, wrote:
Your callback url in the Honeywell app is 8581 and should be 8585 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Nice
Thanks, it is working now for me as well.
Describe The Bug
Relink url is not working
To Reproduce
Try to relink a Honeywell account
Expected behavior
Be able to relink account
Relevant log output
Config for homebridge-honeywell-home
Screenshots
No response
Device & Model
Honeywell Thermostat
Node.js Version
v16.17.0
NPM Version
not sure how to find
Homebridge Version
v1.5.0
Homebridge Honeywell Home Plugin Version
v11.4.3
Homebridge Config UI X Plugin Version
v4.50.1
Operating System
macOS