After scouring the web, I was able to find and hack a python script to be able to control my thermostat. Thanks to code from Brad Goodman, my modified version is working how I like it to.
Link to my python script
There are three things you need to edit to have the script work for you. First, edit the USERNAME variable with the email login and PASSWORD with the password to your mytotalconnectcomfort.com account. When you log in and enter the page for your thermostat control, the web url will contain the device ID for that thermostat. For example, web address https://mytotalconnectcomfort.com/portal/Device/Control/542695 means that my device ID is 542695. You will enter this number for DEVICE_ID in my python script without any quotation marks.
When downloading the script, remember to check that it has execution permissions with chmod +x therm.py on linux. You can see the arguments available by doing python therm.py -help. The following are the options available:
- Cooling: -c temperature -t hold_time
- Heating: -h temperature -t hold_time
- Status: -s
- Cancel: -x
The hold_time is in the unit of hours. so -t 1 would be 1 hour. The temperature is configured to be fahrenheit, but can be set to celsius. Cancel means to cancel the current temporary settings. And status prints the following:
% python therm.py -s
Indoor Temperature: 82.0
Indoor Humidity: 37.0
Cool Setpoint: 82.0
Heat Setpoint: 74.0
Hold Until : 0
Status Cool: 0
Status Heat: 0
An example of using the script to set the temperature to cool to 76F for 2 hours would be:
python therm.py -c 76 -t 2In the future I will be showing how I use this script to allow my thermostat to be controlled by IFTTT and Amazon Echo.
I tried playing with this script to control my Honeywell thermostat, but only some of the functions work.
ReplyDeleteI can get to change the cool setpoint, cancel the hold, and show status.
However, I can't get it to set the heat setpoint (it does the same thing as if I didn't use the right syntax). I also can't get it to hold for anything other than 1 hour.
Am I doing something wrong, or does the script not able to do these thing?
Thanks.
Hi.
DeleteYou're right! I made a mistake of having the -h argument be used for both help and heat. I have fixed the help to be -help instead so the heat setting should work now. The code has been updated in the Github link.
As for the time, it is set to only work with integers. So setting it to 2 hours, or 3 hours, should work. Based on the way it is set to calculate the time the way Honeywell wants it, anything smaller (like 1.5 hours) is not possible with the code.
This comment has been removed by the author.
ReplyDeleteI get this:
ReplyDeleteRun at 2015-10-05 14:11:22.770361
Mon Oct 5 14:11:23 2015 ErrorNever got redirect on initial login status=200 OK
Anybody know why??
Yeah, I just got the same thing, in my case it was a bad password.
Deletedid you get this to be able to use IFTT and amazon echo, i want this so Bad! as I have the Same Thermostat, and I quickly bought it thinking i would be able to control it Via IFTT and Amazon Echo..to no avail, you said in the future you would show it, it is now November and Cold here in WI.!! lol let me know...Thanks
ReplyDeleteI decided to go in a different direction. I used the Phython code as a guide to write equivalent PHP code (I'm more comfortable with PHP). I then created a Google Calendar specifically for my thermostat, and created entries when I want it to make changes (with the specific settings in the "Description" field of the event). I set it to send me an e-mail notification at the time the event starts, and I set up a rule in my Gmail to forward those to an address on my web host. That address redirects to my PHP script, which parses the notification, pulls out the commands, and sends them to my thermostat. I still have more work to do - I haven't added in fan or mode control yet, and I should add some error-checking - but it seems to work so far.
ReplyDeleteCan you please share? I more familiar with PHP myself!
DeleteThis is great. Thanks for all the work and input.
ReplyDeleteAndroid: It was the password.
Now.. does anybody know how to get status on 'emiheat'?
I thought status return '0,1,2' would reflect 'no heat,heat,emiheat' but it does not.
Hey
ReplyDeleteOn the request to /portal/Device/CheckDataSession/DEVICE_ID I get a 500 server error. I've retried the URL in chrome and I get the same result.. I have the same unit as you link to above. I'm in the US if that makes any difference
Thanks so much for your work on this, I am so close but hitting just a couple errors. Alexa reads me the proper temp from thermostat. And when I ask her to change temp she says shes doing it but it never reflects a change on totalcomfort, the hold time reflects a change but not the temp. She even says the temp is set to *new* degrees if I ask her for settings, but it does not actually change on the device. And when I run this script from command I always receive:
ReplyDeleteprint "Indoor Temperature:",j['latestData']['uiData']["DispTemperature"]
syntax error
seems weird, any ideas? thank you again!
Strange that you are getting a syntax error when running the script directly.
DeleteDid you copy and paste the code to a file or download it directly? I would go back to github, click the raw button on the top right and then do a File > Save from your web browser.
Replace the double quotes with single quotes around DispTemperature.
DeleteReplace the double quotes with single quotes around DispTemperature.
DeleteThis may help others with the same problem: If you get print statement syntax errors the issue most likely is the version of Python. The latest Python version is 3.5.1 but this script is written for an earlier version. I switched to Python 2.7 which is the last version of the Python 2.x series and this script runs perfectly!!!
ReplyDeleteThis may help others with the same problem: If you get print statement syntax errors the issue most likely is the version of Python. The latest Python version is 3.5.1 but this script is written for an earlier version. I switched to Python 2.7 which is the last version of the Python 2.x series and this script runs perfectly!!!
ReplyDeleteWell, I'm new to Python, but have everything installed, fixed an indentation error (last line), and the "help" command works... but when I try to run it "for real," I get this error:
ReplyDeleteError Didn't get 200 status on R4 status=500 Internal Server Error
Uhm... what do? Thanks in advance!
Something about heavy to semi-heavy technological jargon really sooths me. I hope you have more posts like this. It feels to me like a completely different world. Luckily my husband actually understood it (I'm so embarrassed) and was absolutely delighted. I'll let you know how things go (looking forward to your next instructional piece).
ReplyDeleteAmbrose @ Brown & Reaves Services, Inc.
Nice script, Dan, worked first time. I was looking for a way to monitor my house temperature from my Home Security script, and this fits the bill. I also wanted to track my house temperature as it cools down in the evenings after I go to bed. I added a print for the time/date into your status function, and scheduled it using cron, and I was able to get an hourly temperature - and as I suspected it takes a LONG time for the house to cool. I've now set the night temperature an hour earlier, and I'm saving many dollars in heating costs - thanks!
ReplyDeleteI successfully used this script to poll my Honeywell wifi thermostat purchased from Home Depot. The back has two model numbers - TH6320WF02 and RTH6580WF1001. I'll go with the latter on since this post refers to one that starts with the same prefix. My unit was about $100 which is a deal compared to NEST at $249. My only problem was I had to get the DEVICE ID from a different place than the URL as suggested above. If you use that device ID, you'll get a SERVER ERROR when the python script runs. The trick here is to go to Honeywell's website and log in to your account. Navigate until you have the graphic of your thermostat loaded on your screen then view the PAGE SOURCE in your browser. There is an XML tag for DEVICE ID which will be different than the number used in the URL for that page. That's the one you need to use.
ReplyDeleteSo awesome! Worked right away. I worry with these proprietary frameworks, but fortunately they're not that sophisticated. Without doing too much research, I had leaned towards some open framework/rasperrypi thing, but you allow me to run my own optimizations. Thanks
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteis there a way to ignore the thermostat temperature reading, or set it to a fixed value?
ReplyDeleteWhen I run the script I get this output:
ReplyDeleteError Didn't get 200 status on R4 status=500 Internal Server Error
Any idea on how to fix this?
I am able to get status, start/stop fan, set cool just fine but when I try to set heat, I get the same error message. I just scoured the code and did not find anything that stood out.
Deleteurls are different for international users (i'm in the uk), getting the 200 status.
ReplyDeleteurl from webpage is https://international.mytotalconnectcomfort.com/Locations/View/123456
Hi,
ReplyDeleteI am wondering if you had a chance to see if control of the thermostat is possible using LAN communication (i.e without going to the outside world, myTotalConnectionComfort.com...) ?
Thanks
Hi Dan,
ReplyDeleteAre you aware of any rate limiting/throttling on accessing the page every 5 mins or so? I only wanted to get the stats of the system and when I set the cron job to run on a frequency less than 10 minutes it starts to log redirect errors. Thoughts?
Thanks!
These kind of article are fairly good for a programmers. Thanks for putting the source code here. Heating and Cooling Hamilton
ReplyDeleteThanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family.
ReplyDeleteWiFi Hacking Apps For android mobile
for those of you wanting to run this on Python 3.x, there is a 2to3.py script that will convert Python 2 scripts. It's in [Python folder]\Tools\Scripts. I just used it on a rather large Python 2.6 project (lots of scripts and sub folders) and it worked like a champ. I am currently using Python 3.7.
ReplyDeleteI know this is one of the most meaningful information for me. And I'm animated reading your article. But should remark on some general things, the website style is perfect; the articles are great. Thanks for the ton of tangible and attainable help. IP Address
ReplyDeleteTragically this demonstrated practically outlandish by and by. The present AI will in general center around quite certain issues and information zones. artificial intelligence course
ReplyDelete
ReplyDelete192.168.0.1
192.168.1.1
router login
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now,
ReplyDelete192.168.l0.1
router ogin
192.168.ll
192.162.l00.1
192.168.l.2
192.168.1.1
192.168.l.254
192.168.1.254
192.168.l0.1
192.168.1.254
ReplyDelete192.168.l.254
192.168.1.1
192.168.o.1
192.168.l0.1
192.168.l.l
192.168.o.1
is a Private IP address and most powerful universal IP addresses, this is used in the Linksys router.
192.168.l.l
ReplyDelete192.168.1.254
192.168.1.1
192.168.o.1
192.168.o.1.1
10.0.0.0.1
ReplyDeleteexodus kodi
192.168.1.1
thevideo.me/pair
openload.co /pair
best kodi addons
jailbroken firestick
firestick apps
jailbreak firestick
Jailbroken Firestick Apps
How to Install Ultimate IPTV Kodi Addon
Thanks for the valuable information and insights you have so provided here.
ReplyDelete192.168.l.l
192.168 l 254
192.168.0.1
ReplyDelete192.168.0.1
192.168.o.1
www-192-168-o-1.com
192.168.o.1
ReplyDelete192.168.l0.1
192.168.0.1
192.168.l0.1
192.168.o.1
I thought I was strong with my ideas on this, but with your writing expertise you have managed to convert my beliefs your new ideas. Mallorca is fun
ReplyDeleteBest Data Science training in Mumbai
Data Science training in Mumbai
It also gives some tips on training your own self. So, we feel by virtue of this article, you, the readers are able to develop some basic ideas related to the whole concept. artificial intelligence certification
ReplyDeleteThe development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. machine learning projects for final year In case you will succeed, you have to begin building machine learning projects in the near future.
ReplyDeleteProjects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.
Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.
ReplyDelete192.168.1.1 is one of the most common IP addresses a router network.
I also purchased Honeywell WiFi Thermostat (RTH9580WF) last week. Gonna try your python script so I can finally enjoy the features of this Thermostat. I recommend this furniture stores where you can choose from different style and size of furniture online. dress up unique characters, play mini games, and gacha in gacha life!
ReplyDelete
ReplyDeleteRouters are the most important devices that are required to get the internet connectivity. There are many brands and router models around the globe. Most people use multiple brand routers, they don't know how to configure them for the perfect usage. Here at router-networks.com we have all the manuals for configuring the router login pages.
Thank you very much for this. Still working! Super annoying that Honeywell didn't allow for local control, so this is as good of a solution as can exist.
ReplyDelete
ReplyDelete192.168.l5.1 nice one good post
Thank you for sharing.
ReplyDeleteData Science Online Training
Python Online Training
Salesforce Online Training
Aivivu chuyên vé máy bay, tham khảo
ReplyDeletevé máy bay đi Mỹ Vietnam Airline
đăng ký bay từ mỹ về việt nam
đăng ký bay từ canada về Việt Nam
gia ve may bay vietjet tu han quoc ve viet nam
Very Nice article, thanks for sharing the article.
ReplyDeletedevops methodology
habits of success
mobile application testing tools
why web development is important
advanced excel interview questions
ethical hacking books
Wonderful..! I was really impressed by your excellent post and Keep doing well...
ReplyDeleteMicrosoft Dynamics CRM Training in Chennai
Node JS Training in Chennai
Node JS Course in Chennai
You have done a amazing job with you website. ExcelR Data Analyst Course
ReplyDeleteIt is the best information for this topic and kindly updating here...
ReplyDeleteOpenspan Online Training
Openspan Online Course
Matlab Training in Chennai
Leadership Training in Chennai
Ocay, I no this is a bit over 5 years old, but I just downloaded therm.py, ran it through 2to3, and it works great on python 3.9.2! I'd like to use it to get and set the mode too, off/heat/cool. Can you tell me if there is an updated script, or where I can find the api to see about adding it? Google seems to be uneducated in the ways of the thermo-jedi.
ReplyDeleteI like the script because I can't see, and this gives me more info and more control than she who must not be named, Amazon's assistant. Yah, Alexa, but she who must not be named seems much cooler.
Thanks for reading.
Informative blog
ReplyDeleteai training in hyderabad
Informative blog
ReplyDeleteai training in hyderabad
ReplyDeleteThis configuration can also be used for devices like Router, Modem etc. and they are all having the initial IP address
192.168.10.1
https://www.enewsmango.com/192-168-0-1/
That is a very good tip especially to those new to the blogosphere.
ReplyDeleteShort but very accurate info… Appreciate your sharing this one. A must read post.
My web site - 휴게텔
This is good site and nice point of view.
ReplyDeleteData science course in pune
Informative blog and Knowledgeable.
ReplyDeleteOnline Python Course in Hyderabad
شركة مكافحة الحمام بالدمام
ReplyDeleteI'm genuinely getting a charge out of scrutinizing your richly formed articles. Apparently you consume a huge load of energy and time on your blog. I have bookmarked it and I am expecting scrutinizing new articles. Continue to do amazing.data science course in ghaziabad
ReplyDeleteI'm genuinely getting a charge out of scrutinizing your richly formed articles. Apparently you consume a huge load of energy and time on your blog. I have bookmarked it and I am expecting scrutinizing new articles. Continue to do amazing.business analytics course in ghaziabad
ReplyDeleteReally nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.data science course in bhubaneswar
ReplyDeleteIt is perfect chance to make a couple of game plans for the future and the opportunity has arrived to be sprightly. I've scrutinized this post and if I may I have the option to need to suggest you some interesting things or recommendations. Perhaps you could create next articles insinuating this article. I have to examine more things about it! https://360digitmg.com/course/project-management-professional-pmp
ReplyDelete360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.
ReplyDeleteI like your post. I appreciate your blogs because they are really good. Please go to this website for Data Science course in Bangalore. These courses are wonderful for professionals.
ReplyDeleteThanks for sharing this great article we appreciate it, we provide instagram reels download freely and unlimited.
ReplyDeleteIt's late finding this act. At least, it's a thing to be familiar with that there are such events exist.
ReplyDeleteI agree with your Blog and I will be back to inspect it more in the future so please keep up your act.
360DigiTMG data science course