Monitoring EvoHome Room Temperatures over time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • roydonaldson
    Automated Home Guru
    • Jan 2013
    • 205

    Monitoring EvoHome Room Temperatures over time

    Hi there,

    I can now run a script that can monitor and output the room temperatures of all the devices in an EvoHome over a period of time. I have it setup just now to run for a day and give me the values at 5 minute intervals. Running this, I could see that my livingroom was heating up when it shouldn't, probably a sign that I've got old sticky valves that need replaced.

    A quick example of a chart made using the data in Excel:

    Capture.jpg
  • MalcolmSu
    Automated Home Jr Member
    • Mar 2014
    • 24

    #2
    what's feeding these Roy, HR92s?

    Comment

    • roydonaldson
      Automated Home Guru
      • Jan 2013
      • 205

      #3
      Dt92 for upstairs and downstairs hallways and the rest are hr80s just now.

      Roy

      Comment

      • roydonaldson
        Automated Home Guru
        • Jan 2013
        • 205

        #4
        This is the code that I've used to monitor all the temperature sensors on my EvoHome network. It is written in python and outputs a csv type file. I'd recommend running it like:

        python comfortmonitor.py > temperaturelog.csv

        then hit CTRL-C when you are done and import the .csv file into Excel or another spreadsheet app.

        ----------

        # Script to monitor and read temperatures from Honeywell EvoHome Web API

        # Load required libraries
        import requests
        import json
        import datetime
        import time

        # Ser your login details in the 2 fields below
        USERNAME = 'Your UserName'
        PASSWORD = 'Your Password'

        # Initial JSON POST to the website to return your userdata
        url = 'https://rs.alarmnet.com/TotalConnectComfort/WebAPI/api/Session'
        postdata = {'Username':USERNAME, 'Password':PASSWORD, 'ApplicationId':'91db1612-73fd-4500-91b2-e63b069b185c'}
        headers = {'content-type':'application/json'}
        response = requests.post(url,data=json.dumps(postdata),header s=headers)
        userinfo = json.loads(response.content)

        # Extract the sessionId and your userid from the response
        userid = userinfo['userInfo']['userID']
        sessionId = userinfo['sessionId']

        # Next, using your userid, get all the data back about your site
        # Print out the headers for our temperatures, this let's us input to .csv file easier for charts
        url = 'https://rs.alarmnet.com/TotalConnectComfort/WebAPI/api/locations?userId=%s&allData=True' % userid
        headers['sessionId'] = sessionId
        response = requests.get(url,data=json.dumps(postdata),headers =headers)
        fullData = json.loads(response.content)[0]
        print ' ,',
        for device in fullData['devices']:
        print device['name'],',',
        print
        time.sleep (5)

        # Infinite loop every 5 minutes output temperatures
        while True:
        # Next, using your userid, get all the data back about your site
        url = 'https://rs.alarmnet.com/TotalConnectComfort/WebAPI/api/locations?userId=%s&allData=True' % userid
        headers['sessionId'] = sessionId
        response = requests.get(url,data=json.dumps(postdata),headers =headers)
        fullData = json.loads(response.content)[0]

        # Get current time and then print all thermostat readings out
        from datetime import datetime
        print datetime.now().strftime('%H:%M:%S'),',',
        for device in fullData['devices']:
        print device['thermostat']['indoorTemperature'],',',
        print
        time.sleep(300)

        Comment

        • MalcolmSu
          Automated Home Jr Member
          • Mar 2014
          • 24

          #5
          Thanks Roy - will give it a try. The controller has a stat too - does it pick up readings from that too?

          M

          Comment

          • roydonaldson
            Automated Home Guru
            • Jan 2013
            • 205

            #6
            Should do as it is just another sensor as far as it is concerned. I don't have the power to my hall stair location to put it up there yet, but I intend to use it also shortly.

            Roy
            Last edited by roydonaldson; 6 April 2014, 07:56 PM.

            Comment

            • ukhauk
              Automated Home Jr Member
              • Apr 2006
              • 22

              #7
              This is fantastic work Roy thanks for sharing

              Comment

              • MaikelK
                Automated Home Jr Member
                • Nov 2014
                • 10

                #8
                Hello,

                I'm trying to get the same script running, but i'm getting a:

                KeyError: '(device)'

                error.

                Can you tell me what i'm doing wrong?

                Comment

                • Pieter_VO
                  Automated Home Lurker
                  • Nov 2014
                  • 3

                  #9
                  Thanks to Roy I made a python script that sends the data to Plotly.
                  So you can easily view online how the temperature changes because the graphs are automatically plotted.

                  Log Evohome temperature using Plotly. Contribute to PieterVO/EvohomeTemperature development by creating an account on GitHub.

                  Comment

                  • MaikelK
                    Automated Home Jr Member
                    • Nov 2014
                    • 10

                    #10
                    Pieter,

                    It works! Now only to insert all this data into a graph in my Domoticz Raspberry Pi and i would be happy!

                    Comment

                    • Pieter_VO
                      Automated Home Lurker
                      • Nov 2014
                      • 3

                      #11
                      Originally posted by MaikelK View Post
                      Pieter,

                      It works! Now only to insert all this data into a graph in my Domoticz Raspberry Pi and i would be happy!
                      Can't you do that with the embed code?

                      Comment

                      • MaikelK
                        Automated Home Jr Member
                        • Nov 2014
                        • 10

                        #12
                        Trying to find out how to do so, my programming isnt very good. Just starting with it...

                        Is it possible to get 2 lines in the graph? Also the temperatuur setpoint?
                        device['thermostat']['changeableValues']['heatSetpoint']['value']
                        gives me the setpoint, but how the get in into plot.ly?

                        Comment

                        Working...
                        X