-
Notifications
You must be signed in to change notification settings - Fork 8
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 URL changes. #2
Comments
I just received an e-mail from honeywell about some API changes. The base URL of the API used to be: https://rs.alarmnet.com/TotalConnectComfort/WebAPI/ and is changing now to: |
Thanks for the info. I've taken a look at the new version of the app and unfortunately the changes they've made are rather more substantial than just updating the API endpoint. The authentication system has changed, as have a few other things. I've pushed a branch new-api that partially works with their new authentication system. I don't think fixing the rest of the code to work with the new system will be too big a task, but I'm not able to spend any more time on it for a couple of weeks. In the meantime, the old API still seems to work, and I'm happy to merge any pull requests. |
I'm currently getting error 501 in the same line of code as originally reported, for both new and old api... I presume there is another change in API endpoint? Any more information available to fix this up? I did find this URL though: |
Scrub that... Turns out my problem was not having SSL support in LWP. Great error messages from perl... I have fairly completely updated all the API, added new functions for the new get urls and also added functions (untested) for setting schedules, heat set points and system status (economy/away, etc). Pull request sent. Grateful if you would pull and push to master? Thanks! Note, definitely needs more API documentation. I have some network traces if anyone wanted to work on that... I haven't tested the set_xx functions, setting schedules is odd because the get uses different definitions for dayofweek between getting and setting... (might turn out that the server supports both..?) Personally I am logging this on influxdb + grafana. I will try and write this up, possibly simpler to setup than cacti? |
I've merged, and also added you as a collaborator if you want to push anything else. If you write that up, definitely add a link to the readme page - I haven't come across influxdb/grafana. |
It seems like the fork is updated for the new URL, but I get an error that the app id is incorrect. Does it only work if you've been granted access to the new API? |
It looks like Honeywell have changed the server response codes, so the error message "App id is incorrect" is now most likely wrong. If I run the test_api.pl script with an invalid username/password (or without a username/password) I get that error. If I run it with a valid username/password, it works fine. I'd check that your credentials work in the iOS/Android app. I don't believe you have to be granted access to the new API - it just worked for me. |
Hmm. I tried the correct login on a couple of accounts with various On Sun, Oct 18, 2015 at 1:13 PM, willdollman [email protected]
|
Me too error 501 at line 125, any tips? |
Hi, I'm the culprit for many of the "new api" updates, so blame me... Can I just check you are using the new_api branch, not master? (@willdollman should we make this branch master now?) I think I need the full error please. I don't see this, but for sure we should try and improve the error message? I can confirm that I am actively using this code. I take the output and log it to influxdb. Then I have a dashboard in Grafana which plots actual temp vs target temp. It's quite funky actually! The main thing which might go wrong is whether this URL can be used for all account types? It might be only for users on the European servers? Can anyone definitely on the US server confirm it works for them? Other than that I suspect username/password troubles? |
Great info. I am on a US account on the new_api branch. If it was a difference of server location, how would we go about getting the correct URL/App ID/Token, etc.? |
Do you understand how to log traffic dumps of your phone app? Send me a private message if you need help (lists squiggle-thing wildgooses. com) |
I think the Europe/America difference could be it. The web login pages for the American and European versions are different, and my European credentials don't work on the American login page: The error @theGAXman gets when logging in is the same as if you have incorrect credentials, so it seems likely that the new authentication system that the new-api branch uses doesn't recognise American accounts. |
@ewildgoose I've merged the new-api branch to master. If anyone is unable to get it working, you can still use the old system by checking out the I've just updated the request handler to dump the server response if it returns an error code, so @theGAXman could you try logging in again and pasting the response body? If it's due to American accounts not being recognised by the European auth system, I'd expect the error to be |
Current master:
pi@i3-RPi ~/perl-total-connect-comfort-master $ perl test_api.pl '[email protected]' 'xxxxx'
Old master from two weeks ago:
pi@i3-RPi ~/old-perl-total-connect-comfort-master $ perl test_api.pl '[email protected]' 'xxxxx'
Invalid username/password, or session timed out at Device/TotalConnectComfort.pm line 123.
|
I get @random 503 errors when i pull data. Am i the only one? |
Guessing it's temporary server issues on their side - most people won't be checking the app every minute, so won't notice if they take the service down briefly for maintenance! If you catch it 503ing again, you could see whether the mobile app is down as well, as it uses the same web API as this script. |
Does it error on the login or retrieving some data? My production use stores the login token and re-uses it for as long as possible (it only revalidates it on error/expiry). I wonder if you get better success if you don't keep logging in? (Note I can't remember if these changes are on the git repo without checking, it might be only in my private version) |
I'm getting the same {"error":"invalid_grant"} trying to log in with a user/password registered to the USA server (https://www.mytotalconnectcomfort.com/portal). Visiting the old API server at https://rs.alarmnet.com/TotalConnectComfort/WebAPI/ gets me error 404, file not found. I sent an email to [email protected] and got no response. I also tried visiting http://api.honeywell.com but using various procedures to get API credentials all say the email/password I use at mytotalconnectcomfort.com is not valid. All their help files on the site refer to the leak detector and Lyric thermostats so I don't think the API is hooked in to TCC thermostats. Does anyone have more info? Has anyone at Honeywell ever responded to why this is occurring? How can they leave Americans with no API access? |
I finally got API access to a USA RedLINK thermostat! From this Honeywell employee:
I figured the North America URL would work. The API is described here: https://tccna.honeywell.com/WebApi/Help/ApiIntroduction I tried the API by typing this at the command prompt: and got this error:
So I guess that API is used for North American thermostats, but not RedLINK? I kept searching and hit on yet another API URL, this one claiming to support RedLINK thermostats. The API is described here: https://tccna.honeywell.com/ws/MobileV2.asmx Logging in can be accomplished with this command line: It returns a SessionID which you pass to various other API commands and I was able to get a list of my thermostats using Note that ApplicationId is specific to each particular API base URL. If you pass the wrong ApplicationId to the wrong API, you'll get an error that may or may not be clear what went wrong. |
Hi! A few things to follow on above. Our API keys and accounts are actually logically separated by region in TCC. Those of you with US TCC accounts and devices won't be able to use an API key from a UK app and vice versa. Some of the API resources may work, but the ones with /emea/ in the URI are designed for UK products. Ideally, I'd like to get you your own API key(s) and use the OAuth login functionality instead of the sessions API or the mobile API wrapper. |
@jzwack Where can I get an applicationId / API key for mytotalconnectcomfort.com/WebApi ? |
Any luck finding a way for devices registered in the US to work? |
Since this morning i receive an error when calling the API URL. I Think Honeywell changed something...
Unknown error occurred: 302 at /etc/perl/Device/TotalConnectComfort.pm line 125.
Edit: seems to work now....
The text was updated successfully, but these errors were encountered: