First of all, I may have a technical background, but that is many years behind me now! However, I was really interested in accessing the API and producing temperature graphs for Evohome.
I read all the posts on here about Python and plot.ly and it took me a long time to understand it with tutorials etc and get it working. Now that I have, I thought I would share my “idiots guide” whilst at the same time acknowledging the excellent work by others who worked it all out in the first place!
So, the steps are:
1 Install Python
Download and Install Python 2.7
Make sure you select option to add Python.exe to PATH
(you will need to reboot to pick this up in your settings, if you don’t know how to add this manually)
2. Install the relevant Python modules to support what we are trying to do
Install pip, setuptools, and wheel
• Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and save to your C:\Python27 folder.
• At the command prompt switch to the C:\Python27 folder and run:
python get-pip.py
This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already. This is explained here:
[URL="http://python-packaging-user-guide.readthedocs.org/en/latest/installing/"]
Now that the above is installed the rest of the modules are easy to install as they will be automatically retrieved, downloaded and installed when you type the following at the Command Prompt:
Pip install requests
Note: The requests module is explained here: http://docs.python-requests.org/en/master/
Pip install plotly
Note plot.ly is the online graphing and is explained here: https://plot.ly/python/getting-started/ and here https://github.com/PieterVO/EvohomeTemperature
Pip install evohomeclient
Note this is put together by some excellent work by members on this forum and the details are here
More info here if you are curious:
○ http://python-packaging-user-guide.r...st/installing/
○ The requests module is explained here: http://docs.python-requests.org/en/master/
○ Installing modules in general is covered here: http://programminghistorian.org/less...on-modules-pip
○ http://www.wikihow.com/Install-Pytho...s-on-Windows-7
3. Evohome Client
Now you can play with the python scripts like I did. If you open IDLE (Python GUI) which was installed with Python you can paste the text in any of these examples here:
Don’t forget to replace your evohome username (email address) and password to get it working.
Say you save it as test.py, then just run python test py from the command prompt
This will start reporting temperatures of your zones back to your screen. Initially I captured them all to a file and imported into Excel as a CSV file and made a pivot table. This was great, until I discovered plot.ly….
4. plot.ly
This is an on-line graphing too. If you create a free account and follow the instructions here https://github.com/PieterVO/EvohomeTemperature with the config.ini file to enter your evohome username and password along with the stream IDs from plot.ly account, you can forget excel. This works beautifully and you can even create dashboards with all graphs on the same page.
5. Bear in mind gathering the date is a repeating cycle, running a python script from a DOS prompt for as long as you want to gather and graph date. It means your computer is on constantly. I have read about using raspberry pi to do this, but I haven’t go that far. Just happy with the graphs and knowing I am saving energy and money!!
I read all the posts on here about Python and plot.ly and it took me a long time to understand it with tutorials etc and get it working. Now that I have, I thought I would share my “idiots guide” whilst at the same time acknowledging the excellent work by others who worked it all out in the first place!
So, the steps are:
1 Install Python
Download and Install Python 2.7
Make sure you select option to add Python.exe to PATH
(you will need to reboot to pick this up in your settings, if you don’t know how to add this manually)
2. Install the relevant Python modules to support what we are trying to do
Install pip, setuptools, and wheel
• Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and save to your C:\Python27 folder.
• At the command prompt switch to the C:\Python27 folder and run:
python get-pip.py
This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already. This is explained here:
[URL="http://python-packaging-user-guide.readthedocs.org/en/latest/installing/"]
Now that the above is installed the rest of the modules are easy to install as they will be automatically retrieved, downloaded and installed when you type the following at the Command Prompt:
Pip install requests
Note: The requests module is explained here: http://docs.python-requests.org/en/master/
Pip install plotly
Note plot.ly is the online graphing and is explained here: https://plot.ly/python/getting-started/ and here https://github.com/PieterVO/EvohomeTemperature
Pip install evohomeclient
Note this is put together by some excellent work by members on this forum and the details are here
More info here if you are curious:
○ http://python-packaging-user-guide.r...st/installing/
○ The requests module is explained here: http://docs.python-requests.org/en/master/
○ Installing modules in general is covered here: http://programminghistorian.org/less...on-modules-pip
○ http://www.wikihow.com/Install-Pytho...s-on-Windows-7
3. Evohome Client
Now you can play with the python scripts like I did. If you open IDLE (Python GUI) which was installed with Python you can paste the text in any of these examples here:
Don’t forget to replace your evohome username (email address) and password to get it working.
Say you save it as test.py, then just run python test py from the command prompt
This will start reporting temperatures of your zones back to your screen. Initially I captured them all to a file and imported into Excel as a CSV file and made a pivot table. This was great, until I discovered plot.ly….
4. plot.ly
This is an on-line graphing too. If you create a free account and follow the instructions here https://github.com/PieterVO/EvohomeTemperature with the config.ini file to enter your evohome username and password along with the stream IDs from plot.ly account, you can forget excel. This works beautifully and you can even create dashboards with all graphs on the same page.
5. Bear in mind gathering the date is a repeating cycle, running a python script from a DOS prompt for as long as you want to gather and graph date. It means your computer is on constantly. I have read about using raspberry pi to do this, but I haven’t go that far. Just happy with the graphs and knowing I am saving energy and money!!
Comment