Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Authentication Changed [evohome] #23

Open
thiasos opened this issue Jan 5, 2019 · 14 comments
Open

API Authentication Changed [evohome] #23

thiasos opened this issue Jan 5, 2019 · 14 comments

Comments

@thiasos
Copy link

thiasos commented Jan 5, 2019

Expected Behavior

Log to TCC API

Current Behavior

Current authentication mechanism does not work for me: obtain authentication failure with log:

11:36:12.058 [DEBUG] [inding.evohome.internal.api.ApiAccess] - Requesting: [https://tccna.honeywell.com/Auth/OAuth/Token]
11:36:12.924 [DEBUG] [inding.evohome.internal.api.ApiAccess] - Response: HttpContentResponse[HTTP/1.1 400 Bad Request - 25 bytes]
11:36:12.924 [DEBUG] [inding.evohome.internal.api.ApiAccess] - 
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json;charset=UTF-8
Expires: -1
Server: Microsoft-IIS/8.5
Set-Cookie: thlang=en-US; expires=Sat, 05-Jan-2069 10:36:12 GMT; path=/
Server: Web1
Date: Sat, 05 Jan 2019 10:36:11 GMT
Content-Length: 25
Set-Cookie: NSC_UDDOB-TTM-WT=ffffffff090ecc1c45525d5f4f58455e445a4a42378b;expires=Sat, 05-Jan-2019 10:38:12 GMT;path=/;secure;httponly


{"error":"invalid_grant"}
11:36:12.925 [DEBUG] [evohome.internal.api.EvohomeApiClient] - Authorization failed

Possible Solution

Checking documentation from Honeywell I've found this: Authorization

so i think that authentication mechanism is switched to OAuth2.

Steps to Reproduce (for Bugs)

I've tried with this CURL:

curl -X POST \
  'https://tccna.honeywell.com/auth/oauth/token?Username=username&Password=user_pwd&Host=rs.alarmnet.com%2F&Pragma=no-cache&Cache-Control=no-stor%20no-cache&scope=EMEA-V1-Basic%20EMEA-V1-Anonymous%20EMEA-V1-Get-Current-User-Account&grant_type=password&Content-Type=application%2Fx-www-form-urlencoded%3B+charset%3Dutf-8&Connection=Keep-Alive&installationInfo-Type=application%2Fx-www-form-urlencoded;charset%3Dutf-8' \
  -H 'Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml' \
  -H 'Authorization: Basic YjAxM2FhMjYtOTcyNC00ZGJkLTg4OTctMDQ4YjlhYWRhMjQ5OnRlc3Q=' \
  -H 'Postman-Token: 9c23cd11-7e05-4143-b731-9035720338b8' \
  -H 'cache-control: no-cache' 

and obtain response:

{
    "error": "unsupported_grant_type"
}
@Nebula83
Copy link
Owner

Please try this version where the authentication has been updated: https://github.com/Nebula83/openhab2-addons/releases/tag/2.4.0-1

@thiasos
Copy link
Author

thiasos commented Jan 17, 2019

Hi. I've tried the version 2.4.0 but error is the same.

@Nebula83
Copy link
Owner

Strange, that should work. What country are you in? The binding currently does not support America.

@Knuppel1983
Copy link

Not working for me also. Country: the Netherlands.
"Authentication failed", with or without the 2.4.0-1 fix.

@Knuppel1983
Copy link

Or maybe i'm doing something wrong? Is it supposed to show version '2.4.0-1' in bindings?

@VibroAxe
Copy link

@Nebula83 has that version been pushed to the openhab catalog or should we be using the release on here at the moment?

@Nebula83
Copy link
Owner

The latter. Openhab does not support intermediate updates to bindings AFAIK. I think the choices are using the 2.4.0-1 release on my gihub or use the 2.5.0-SNAPSHOT on the official OH repos.

@VibroAxe
Copy link

@Nebula83 All was good, tcc was down for maintainance, I just didn't notice!

@Nebula83
Copy link
Owner

@TiaSOS @VibroAxe @Knuppel1983 good :-) Can I close this one?

@VibroAxe
Copy link

Yup, definitely resolved for me

@thiasos
Copy link
Author

thiasos commented Jan 25, 2019

Hi, I've installed version 2.5.0-M1 and does not work for me.
Error is the same. I'm connetting from Italy.
20:49:13.621 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'evohome:account:2f4a6500' changed from UNINITIALIZED to INITIALIZING 20:49:14.564 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'evohome:account:2f4a6500' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Authentication failed 20:49:30.494 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'evohome:account:2f4a6500' changed from OFFLINE (COMMUNICATION_ERROR): Authentication failed to UNINITIALIZED

@Nebula83
Copy link
Owner

Have you tried creating the Bridge Thing as a things file and then copy-pasting these credentials into TCC?

@Nebula83
Copy link
Owner

Nebula83 commented Jan 27, 2019

By the way, I've tried your curl snippet, but that does not work for me:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>

@Knuppel1983
Copy link

Knuppel1983 commented Feb 1, 2019

Nebula83, I still have trouble authenticating with 2.4.0-1.
From time to time the binding stops working, I see the message 'Authentication failed', and all things are offline. The only remedy, is changing my login name, saving, and then changing it back. I know Honeywell is undergoing a couple of weeks of maintenance since 22-01-2019, but I'm wondering if I'm the only one experiencing these issues.

Yesterday I noticed the Evohome app had issues also, my living room screen and app where not in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants