Announcement

Collapse
No announcement yet.

Build a graph from logged temperature data from an HSM100

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Build a graph from logged temperature data from an HSM100

    Will probably work for any other temperature sensor, too. Implemented in python, needs the Google visualizations library (http://code.google.com/p/google-visualization-python).

    Renders an HTML page with an embedded graph. The graph is implemented in flash, but any other Google Visualization library source should be convertable.

    Code is attached.

    My eventual goal is access to such a graph from within HSTouch on an iPad/iPhone, so this approach doesn't work.

    Attached: graph.txt. Rename to graph.py, update the constants at the top of the file, and run it with Python. I used 2.6, but almost any python 2 version will work.

    Attached: table.html.txt: example output. Save it, rename to .html, open in a browser.
    Attached Files

  • #2
    Well done !

    Comment


    • #3
      Yes very nice! I was able to modify this to give me a graph of when my furnace turns on/off over time from a window/door sensor monitoring a relay.

      I will post my code as soon as the administrator changes my attachment posting permissions or I figure out some other way to post an attachment.

      Comment


      • #4
        Originally posted by jeffstewart View Post
        My eventual goal is access to such a graph from within HSTouch on an iPad/iPhone, so this approach doesn't work.
        Just a thought - have you tried my capture utility to see if it will grab the graph for hstouch?
        Jon

        Comment


        • #5
          Jon,
          Your scripts look very promising in terms of doing what I need. Thanks for the pointer. Two things:
          1.) If anyone else if trying to figure out where exactly these scripts are, they're on the "downloads" tab of Jon's homeseer server, linked from his sig. Took me a bit to find them.
          2.) Jon, the content-disposition and mime type headers are missing from at least some of your download links. Most worked. For the image capture one, I had to fetch it with wget.

          Jeff

          Comment


          • #6
            Originally posted by jeffstewart View Post
            Jon,
            Your scripts look very promising in terms of doing what I need. Thanks for the pointer. Two things:
            1.) If anyone else if trying to figure out where exactly these scripts are, they're on the "downloads" tab of Jon's homeseer server, linked from his sig. Took me a bit to find them.
            2.) Jon, the content-disposition and mime type headers are missing from at least some of your download links. Most worked. For the image capture one, I had to fetch it with wget.

            Jeff
            Hmm - not sure why you are having problems. I get lots of visitors each day downloading without issue?

            I also don't understand point 2 as that relates to email headers?
            Jon

            Comment


            • #7
              Jon,

              For the HTML to Image utilities, here are the HTTP headers generated:

              Accept-Ranges:bytes
              Content-Length:329978
              Content-Type:text/html
              Server:HomeSeer

              And I don't get a "save as" dialog. Now contrast that to

              Remote Computer Control:

              Accept-Ranges:bytes
              Content-Length:1281287
              Content-Type:application/zip
              Server:HomeSeer

              The key here is the Content-Type. The first one doesn't generate a save-as dialog, the second one does.

              I have no idea why two files, both named .zip generate different content-type headers. Again, I was able to fetch the script with wget.

              Jeff

              Comment


              • #8
                What browser were you using?
                Jon

                Comment


                • #9
                  Chrome 12 for Windows

                  Comment


                  • #10
                    Originally posted by jeffstewart View Post
                    Chrome 12 for Windows
                    That may be the problem. Remember that HS only supports IE. I know FF work OK on downloads.
                    Jon

                    Comment


                    • #11
                      Jon,
                      I'm about to rant. It's not your fault. You didn't do anything wrong. Your scripts are awesome. I'm going to rant anyway.

                      I just checked the homeseer installation docs. IE6 is listed as the only supported browser. That browser was released in 2001. 10 years old in internet software is well past dead. We're talking zombie material here. If you still use IE6, you're just begging to have your computer owned by malware. Frankly, you'd be negligent to browse the web with IE6 at this point.

                      I'm rather surprised that Homeseer continues to list this browser as the "only supported browser". For what it's worth, I've never had any trouble with Homeseer and Chrome. And I was able to work around the download issues today.

                      This year old article puts IE6 penetration at less than 5%:

                      http://mashable.com/2010/06/01/ie6-below-5-percent/

                      The most recent figure is 3.81%: http://gs.statcounter.com/#browser_v...-201006-201106

                      And this is the only supported browser for Homeseer. Sad.

                      Chrome market share is now 21% (and it auto updates, so that's nearly all the most recent version). Firefox is at 28%. IE7 retains only 6% share, but IE8 has 28% share.

                      Surely one or more (probably all) of these browsers should be supported. Certainly, they're all preferable to IE6.

                      Sigh. End rant.

                      Jeff

                      Comment


                      • #12
                        Jeff,

                        Feel free to rant - you are not the first and probably not the last. Remember HS2 came out in 2005 when IE was the dominant browser. There is certain code that only works in IE - dynamic update of the status icons on the status page is one. The web server was written in-house and many functions that you would find in IIS, PHP etc are just not available.

                        Homeseer 2 is still full of quirks and bugs but HST do not have the capacity to look at them. The bugzilla reporting tool is testament to that.

                        I'm afraid we are all going to have to live with it. HS3 is currently being written and I believe much of the rework is being done on the UI. Hopefully they will write it correctly to work cross browser.
                        Jon

                        Comment

                        Working...
                        X