PLUGIN: Honeywell Total Connect Comfort Thermostats

I believe we’ve had situations whereby users we’re polling to often, enough to lock them out. I’m not sure about invalid credentials though…

To me, credentials either work or they don’t. It’s one of those set, test and forget kind of things… The default poll rate is currently 300s. That’s a safe limit when things are acting as expected. In the event of an authentication failure, perhaps throttle polling to 3600s and upon success, revert to the default (or whatever value was present before the failure). Perhaps a set of [3] consecutive failures stops the process all together (a perm task message). This is something that can be implemented after we’ve given the code a thorough test drive.

[quote=“mikee, post:360, topic:185402”]Hmmm, that brings up and interesting point. If the login fails we do not attempt a retry. This will essentially stop the plugin until a manual (or external event) causes a new login. I don’t think this is right but I didn’t want to keep trying in case the credentials were bad. I don’t know if there are any lockouts an auto login could trip. But I think that maybe a slow (like an hour-ish) retry might be in order to re-establish the session. Thoughts ?

Oh, I had a login failure at 13:09 Eastern …[/quote]

[quote=“mikee, post:352, topic:185402”]I have gone thru the plugin and reworked a number of things. I have run on my two thermos as well as done some unit tests with 7 digit device IDs. I also lowered the reauth interval to 60 minutes (the min) and verified it reauthenticates so should stay connected without periodic failures. I am including 3 modified files, the lua implementation, the json UI file (changed table layout ) and xml implementation file.

I can only do minimal testing myself since I have a heat only system connected to the wifis.

Install:

Install the official app and then upload these 3 files making sure the Restart Luup is checked (or reboot after upload).

Logging is enabled so will be a bunch of output in the log. Once we get thru testing I’ll figure out how to update the official app.

Notes:

  1. I reorganized a lot of stuff, constants for string, permanent log, trace capability, fix nil references, update comments. I also put the plugin in a module. Could still be more of this cleanup.
  2. Fix the locations processing so the auto-configure works again. Again, bunch of cleanup
  3. Widen the thermo name column in the dialog and fix cut-n-paste errors that put the 3rd therm device ID in the 2nd row (along with the 2nd thermo). I wrote a table generator lua script to make it easy(er) to adjust the table.
  4. Added the re-auth callback. The default is 24hours but can be changed (ReAuthInterval).[/quote]

I’ve installed the files and off-hand, it looks like things are good. I will keep an eye on it and report back if I see anything. Is there anything specific you would like me to try or to look for?

Thank you guys again for all of your help getting this app back on track!

[quote=“CudaNet, post:350, topic:185402”]Lindsey,

Can you tell us a little more about your setup. Model of thermostat, version of code installed (1.2 or the 1.0 release candidate). Mikee has done some refactoring of the code but I’m afraid this is the first I’ve heard of this type of problem. So I hate to put you through remedial questions but sometimes it’s the most minor details that help us determine a solution.

Thanks

[quote=“Lindsey, post:349, topic:185402”]Just installed the Honeywell app. After entering my credentials in the TCC Setup and clicking Login, I receive,

“Unsuccessful. Error code 200”
“HNYWL TCC: : Honeywell thermostat user authentication failed. Check TCC Setup”

The credentials do work when I access Honeywell TCC on the website. I have deleted the app and reinstalled. Any suggestions???

Thanks…[/quote][/quote]

Also, which Honeywell site are you logging into? Is it www.mytotalconnectcomfort.com or is it europe.mytotalconnectcomfort.com? The app currently only supports North America. Maybe that is something CudaNet and mikee could consider adding in this updated version of the app?? But I don’t want to put more on their plate than what they already have.

thanks for testing lingerba. Just run it as you normally would. The biggest changes are the auto-confg fixes and auto re-authenticate. You should not see the plugin stop refreshing like it used to. There is still an issue where if the authentication fails it will not try again and essentially stop. This is fixed in the version I am working on as it will continue to retry the auth at 60 minute intervals (configurable down to 10 minutes).

In response to the problem of logging in with my credentials, I am currently using version 1.2. I have two thermostats both with are Honeywell Model # RTH8580WF Wi-Fi Programmable Touchscreen Thermostat. I am using veraEdge controller.

To make sure I’m explaining myself correctly, after I install the plugin for Honeywell app, It gives me a new device number which I click on. I assign it a room. After that, I go to TCC Setup and type in my user name and password. I then login and receive the error…

“Unsuccessful. Error code 200”
“HNYWL TCC: : Honeywell thermostat user authentication failed. Check TCC Setup”

I take the same username/password and go directly to the Total Connect Comfort website and login successfully. I have changed my password and that didn’t help. I have uninstalled the plugin several times and that makes no difference. If you would like, I can give you my user name and password and let you try it.

I have also tried multiple browsers on the mac.

Thanks for the support. Hope this will work for me.

Lindsey, what website are you logging into ? We expect a redirect (response code 302) on the authorization request. It looks like you do not get this but it looks like your request has succeeded (response code 200).

We can try allowing both response codes and see if it solves the problem for you. To test this you will need to be able to load the 3 files I sent out this AM (8:50). I can post a new version to try.

@Mikee,
I do recall a time where I was seeing a status of 200 (I don’t know why) but I know we expect a redirect on that page (302). It’s highly possible the status is 200 but the page is displaying an error.

@Lindsey,
Are you comfortable installing Info Viewer (a manual process) ? I’ll see if I can find a link to it on this site (assuming you don’t already have this installed). This will allow you to load Mikee’s updates (if you haven’t already done that) and we can see the log data when it makes the initial call.

Edit: Here is the link to Info Viewer:
[url=http://forum.micasaverde.com/index.php/topic,13477.0.html]http://forum.micasaverde.com/index.php/topic,13477.0.html[/url]

Edit: And here’s some brief instructions on use.
[1] Open Info Viewer
[2] Click on Set Pattern
[3] Enter the following pattern “HNYWL TCC”
[4] Click Update
[5] Click Info Viewer Page
[6] Click View Logs: Vera Log File
[7] You now have access to the log data.
[8] Store the log data to a file (.txt) and post them.
Important: Please make sure you don’t post personal information (username/password/stat ID etc.). Just “x” those items out.

[quote=“mikee, post:366, topic:185402”]Lindsey, what website are you logging into ? We expect a redirect (response code 302) on the authorization request. It looks like you do not get this but it looks like your request has succeeded (response code 200).

We can try allowing both response codes and see if it solves the problem for you. To test this you will need to be able to load the 3 files I sent out this AM (8:50). I can post a new version to try.[/quote]

Uploaded the files to VeraLite with UI7 running app version 1.2 and everything initially is working fine with 2 thermostats. I’ll keep you posted. Thanks everyone.

@Lindsey

My guess here is that you have special characters in your password, most likely ‘&’. Try a password with just letters and numbers and let me know.

Bingo. It was my password. It had an “&” in the password. The plug in accepted the credentials.

However, now it won’t find any thermostats. Just to make sure they are comparable, I’m using…

Honeywell Model # RTH8580WF Wi-Fi Programmable Touchscreen Thermostat

I will keep playing with it and see what happens. If you have any suggestions, it would be appreciated.

Thanks again…

Greg

Good call, I’d never had guessed that one…

[quote=“mikee, post:369, topic:185402”]@Lindsey

My guess here is that you have special characters in your password, most likely ‘&’. Try a password with just letters and numbers and let me know.[/quote]

So I’m able to get logged in now, but no devices are being found.

In reading the forum, it sounds like it’s better to upload the files manually???

If so, what is the most current link to the files? And, when you say connect to the unit, I’m assuming you want to FTP into the IP of the unit. When I do so, it will not allow it. Says there are other users on the device. I’ve rebooted and still can’t get passed connecting to unit. Maybe I’m not doing it correctly or something.

So if I need to upload files because the plugin cannot see any devices, could you please give me a little better instructions on how to do this. I’m a newbie but I learn fast. Also include a link to the newest files.

Thanks again.

Greg

Greg,

[1] Download the 3 files (.json/.xml/.lua) attached by Mikee.

These are located on thread #351/page 24. On your Vera, do the following (assuming you have UI7):

[2] Goto > [Apps] [Develop Apps]
[3] Select Luup Files.
[4] Click [upload].
[5] Navigate to the first file; repeat for the remaining two.
[6] Your system will reload.
[7] Done.

Hope that helps.

[quote=“Lindsey, post:372, topic:185402”]So I’m able to get logged in now, but no devices are being found.

In reading the forum, it sounds like it’s better to upload the files manually???

If so, what is the most current link to the files? And, when you say connect to the unit, I’m assuming you want to FTP into the IP of the unit. When I do so, it will not allow it. Says there are other users on the device. I’ve rebooted and still can’t get passed connecting to unit. Maybe I’m not doing it correctly or something.

So if I need to upload files because the plugin cannot see any devices, could you please give me a little better instructions on how to do this. I’m a newbie but I learn fast. Also include a link to the newest files.

Thanks again.

Greg[/quote]

OMG… It was right there in front of me on how to upload files. You spelled it out very clearly on how to do it. I just wasn’t thinking it was that easy. Let me play with it.

Thanks… Greg

PS… It’s working fine now. I actually see the devices.

Thanks so much…

Greg

Greg,

You don’t want to SSH/FTP or attempt to move those files onto the Vera yourself. Vera automatically LZOP’s (compresses) them to maintain storage as we’re limited on these devices. Rather, they must be loaded from your Vera directly using the UI. I’ve included the steps in my previous post. Here’s a screen shot which I hope helps.

[quote=“Lindsey”]Thanks CudaNet…

I did download the three files, but I just can’t figure out how to connect and upload to the device. I’ve tried FTP with various passwords, I’ve tried SSH where I can get in, but not sure what to do from there.

So please help me get past this point. I would really love to connect to my thermostats.

Sorry for the inconvenience but I’m obviously missing a few steps in doing this for the first time.

Thanks… Greg[/quote]

No problem - glad it helped out. As I indicated in my previous post, these files are stored compressed when using the UI. If you were to download them from Vera (again, using the UI), they are decompressed. You really never see the .lzo unless you SSH into the unit itself.

Just a tid bit of information for you going forward. Here’s hoping your next post is success !

[quote=“Lindsey, post:374, topic:185402”]OMG… It was right there in front of me on how to upload files. You spelled it out very clearly on how to do it. I just wasn’t thinking it was that easy. Let me play with it.

Thanks… Greg[/quote]

I have the next version of the plugin ready. Lindsey, hopefully this fixes your issue with special characters in the password. I changed my password to include ‘&’ and verifies it works.

  1. I commented the code as best I could
  2. Cleaned up the variable names
  3. Added a sanitizer for device variables to ensure limits are always enforced
  4. URL encode username and password so special characters can be handled
  5. Added log controls
    LogEnable - 0/1 controls basic logging
    LogHttpEnable - 0/1 controls logging HTTP replies
    TraceEnable - 0/1 controls logging function calls and arguments and fcuntion return and results
  6. Revert to stock json parser (L_HoneywellTCC_json.lua no longer used)
  7. Fix a bug in setting the username/password
  8. Fix a bug in GetChildID where the vera device for thermostats was not found on refresh. This causes the thermo screen to not update properly.

Should work better …

[quote=“mikee, post:377, topic:185402”]I have the next version of the plugin ready. Lindsey, hopefully this fixes your issue with special characters in the password. I changed my password to include ‘&’ and verifies it works.

  1. I commented the code as best I could
  2. Cleaned up the variable names
  3. Added a sanitizer for device variables to ensure limits are always enforced
  4. URL encode username and password so special characters can be handled
  5. Added log controls
    LogEnable - 0/1 controls basic logging
    LogHttpEnable - 0/1 controls logging HTTP replies
    TraceEnable - 0/1 controls logging function calls and arguments and fcuntion return and results
  6. Revert to stock json parser (L_HoneywellTCC_json.lua no longer used)
  7. Fix a bug in setting the username/password
  8. Fix a bug in GetChildID where the vera device for thermostats was not found on refresh. This causes the thermo screen to not update properly.

Should work better …[/quote]

I assume this also fixed the re-authentication issue? (probably the username/password issue you mentioned)

I have uploaded these files for testing. I will let you know if I see anything. If everything is good, what has to be done to get these added to the app store?

Yes, this version does re-authentication. The username/password was a typo where I missed the first argument to a function.

I sent a note to vera asking about the app store. Not sure how it works but hopefully will figure it out. I am not sure if I can update the existing app, would be nice if I could (but probably scary at the same time).

SO glad you ditched that json parser and added log controls… Saaaweeet ! As for having them load this revision to the app store, I don’t see any reason why they wouldn’t…

[quote=“mikee, post:377, topic:185402”]I have the next version of the plugin ready. Lindsey, hopefully this fixes your issue with special characters in the password. I changed my password to include ‘&’ and verifies it works.

  1. I commented the code as best I could
  2. Cleaned up the variable names
  3. Added a sanitizer for device variables to ensure limits are always enforced
  4. URL encode username and password so special characters can be handled
  5. Added log controls
    LogEnable - 0/1 controls basic logging
    LogHttpEnable - 0/1 controls logging HTTP replies
    TraceEnable - 0/1 controls logging function calls and arguments and fcuntion return and results
  6. Revert to stock json parser (L_HoneywellTCC_json.lua no longer used)
  7. Fix a bug in setting the username/password
  8. Fix a bug in GetChildID where the vera device for thermostats was not found on refresh. This causes the thermo screen to not update properly.

Should work better …[/quote]