Page 2 of 6 FirstFirst 123456 LastLast
Results 11 to 20 of 56

Thread: Beginners guide to graphing Evohome temperatures using python and plot.ly

  1. #11
    Automated Home Guru
    Join Date
    Jan 2015
    Posts
    102

    Default

    Good stuff.
    Just thinking - I've put all rooms in, but haven't put the Domestic Hot Water in - is this needed too?

    Thanks for your help so far, this is exactly why I love forums like this.

  2. #12
    Automated Home Jr Member Bill M's Avatar
    Join Date
    Nov 2015
    Posts
    10

    Default

    That is probably it mate - needs to have all zones and the water (although I dont have that) is presumably set up as a zone too?

  3. #13
    Automated Home Guru
    Join Date
    Jan 2015
    Posts
    102

    Default

    I think it will be classed as a zone, yes. However, not sure what it's exact name would be.

    Hmmm, will have a tinker. Cheers

  4. #14
    Automated Home Guru
    Join Date
    Jan 2015
    Posts
    102

    Default

    nope, still getting the same error

    Can anyone advise what is happening?

  5. #15
    Automated Home Guru
    Join Date
    Jan 2015
    Posts
    102

    Default

    ok, finally got it working The problem was that the Evohomeclient was reporting the Hot Water zone's name as '', which was throwing python to throw a wobbly when it looked for '' in the config.ini file. There's no apparent way to change the name that is reported (Hot Water isn't editable like the other zones), so I've had to amend the code to use the device ID instead.

    Here's the updated code, if it's useful for anyone...

    # We make a plot for every room
    for device in client.temperatures():
    stream_id = Config.get('Rooms', device['id'])
    stream = Stream(token=stream_id,
    maxpoints=288
    )
    trace1 = Scatter(
    x=[],
    y=[],
    mode='lines+markers',
    line=Line(
    shape='spline'
    ),
    stream = stream
    )

    data = Data([trace1])
    layout = Layout(title=device['name'])
    fig = Figure(data=data, layout=layout)
    py.plot(fig, filename=device['name'], fileopt='extend')

    # Infinite loop every 5 minutes, send temperatures to plotly
    while True:

    # Get current time and then send all thermostat readings to plotly
    try:
    client = EvohomeClient(USERNAME, PASSWORD)
    from datetime import datetime
    j=0
    for device in client.temperatures():
    stream_id = Config.get('Rooms', device['id'])
    j+=1
    s = py.Stream(stream_id)
    s.open()
    tijd = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
    temperatuur = float(device['temp'])
    print tijd + " : " + device['name'] + " " + str(temperatuur)
    s.write(dict(x=tijd ,y=temperatuur))
    s.close()
    print "Going to sleep for 5 minutes"
    time.sleep(300)
    except Exception, e:
    print "An error occured! Trying again in 15 seconds"
    print str(e)
    time.sleep(15)


    My next question - as you can see, the existing trace is plotting "device['temp']". I'd like to add a second trace to the same axes which plots "device['setpoint'] so they can be compared.

    Any ideas?

  6. #16
    Automated Home Jr Member
    Join Date
    Feb 2016
    Posts
    21

    Default

    Quote Originally Posted by zcapr17 View Post
    it automatically extends the Evohome heating in that room until I leave. At a macro-location level, if I go more than a few miles from home, SmartThings will put Evohome in 'Away' mode, and when I leave work it will resume normal Evohome scheduling.
    Could you explain how you do this in ST please? I cannot work out how to send an away command, or how to cancel an away mode (I've been trying to use Rule Machine). It would be helpful if you could provide an answer on the ST Community - Evohome beta thread (If you've been given access) - otherwise here would do!

  7. #17
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

    Hi Bill,

    Thanks for posting all this really helpful information. I managed to get it all set-up successfully apart from the easy, but critical piece of creating a Plot.ly account! Not quite sure what's going wrong or whether it's simply a problem with the Plot.ly website, but I've tried a few different browsers and the Sign Up page seems to have a script error and just hangs . Anyway, it was still really interesting to see the data returned by the python scripts and I was so impatient that I thought I'd try a different solution to capture my data. I ended up installing Domoticz and setting up Evohome within it. I've set up a script to poll the Honeywell server every 5mins and after about 2 days of data it's really interesting to see how the system achieves the set-points and the rates at which different rooms cool down. Not quite sure what I'll do with all this information, but it's great to play.

    Thanks,

    Dan

  8. #18
    Automated Home Jr Member Bill M's Avatar
    Join Date
    Nov 2015
    Posts
    10

    Default

    Hi Dan

    I didn't have any problems signing up, maybe they were under maintenance or something?
    I did manage to change the script to stop it opening a browser tab for each zone (all 12 of them!) and managed to configure a dashboard to see them all together - like you say not sure what I will do with it, but I like seeing all the flat lines in zones when not being used (in my mind that's where I am finally saving money!!)

    Not looked at Domoticz. It may be better? How did you configure that?

    cheers
    Bill

  9. #19
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

    Quote Originally Posted by Bill M View Post
    Not looked at Domoticz. It may be better? How did you configure that?
    Hi Bill,

    I followed the instructions in the 'Scripting for RFG100' section of the Domoticz guide for Evohome:

    https://www.domoticz.com/wiki/Evohome

    I'm running Domiticz on a windows machine so I set-up a scheduled task to run 'evo-update.py' every 5min which pulls the Evohome data from the Honeywell website. Here's a screenshot of the kinds of graphs which are shown within Domoticz.

    Attachment 683

    Dan

  10. #20
    Automated Home Jr Member WiteWulf's Avatar
    Join Date
    Mar 2016
    Location
    Leicestershire
    Posts
    40

    Default

    Thanks for this guide, Bill, it helped me get up and running sending data to an ELK stack pretty quickly. One thing to note, however: as of around midday today the old rs.alarmnet.com URLs stopped working. I changes the URLs in the scripts I based off your material to the tccna.honeywell.com URLs and everything worked as normal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •