Announcement

Collapse
No announcement yet.

Graphs and/or charts

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Graphs and/or charts

    Is there a way to add graphs or charts to HS Touch?

    I am looking at multiple ways with HS itself-- but didn't know if there is anything specific to HS touch.
    HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

    Plug-Ins Enabled:
    Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
    weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

    #2
    Nothing built in I know of...i've used in the past MRTG (which can be setup to draw graphs from external sources, graphs not very sexy though), Google Charts and now i've settled on getting someone else to do the hard work for me by uploading my data to Pachube (www.pachube.com

    Comment


      #3
      I would love to be able to show some graphs/charts in HStouch (winCE)

      Comment


        #4
        It should be possible to use gnuplot to generate a graph from a script and update an image on HSTouch. Not tried it yet in homeseer but it might work.

        here is what i did in another software:
        http://www.housebot.com/forums/viewt...nuplot#p449875



        Raptor
        HS3 Pro on Windows 8 64bit
        53 Z-wave nodes(46 devices, 7 remotes), 15 DS10a's, 10 ms16a's, 9 Oregon Sensors, W800, RFXCOMtrx433, Way2Call, 3 HSTouch Clients, 2xRussound CAS44, Global Cache GC100-12,10 Rollertrol blinds(+ zwave) ,3 Squeezebox Radios and 1 Squeezebox Boom,DMX Arduino via ethernet,Rain8Net,3x Echo Dot's


        Check out my electronics blog here:
        https://www.facebook.com/RaptorsIrrationalInventions

        Comment


          #5
          When you get a grip on Google Charts command parameters, it's quite easy to add graphs to HsTouch. Below is an exampel I made to monitor room temperature. Another way, if you have access to a IIS server with .NET 3.5 or 4.0, would be to use the ASP.NET charting control on an ordinary web page. Then you can display this inline in HsTouch as HTML.
          Attached Files

          Comment


            #6
            Seems like there's some trouble using the image control with a URL that generates images on the fly. I have now tested both Google Chart and the .NET chart built into Visual Studio 2010. Both gives an "red x" in the image control but works "fine" in a textbox control when rendered as HTML. The only problem is that the background of the textbox always will be white.

            To avoid this, make a HTML page with the correct background to melt into your design. Use this file's URL your textbox. The HTML file only contains a <image> tag with the src attribute equal to the URL which auto-generates the image.

            Comment


              #7
              Sorry to drag this up again, I was interested in using Pachube too. MrHappy, you mention you just upload your data as .csv? Can you expand on how you do that in HS please?

              Chris

              Comment


                #8
                Google latitude

                Hello wpiman,

                im having trouble with google latitude.. i get the error the following error message:
                01/11/2010 21:50:06 - Error - Running script, script run or compile error in file: getPosition_v4.txt424:Objet requis: 'temp(...)' in line 135 More info: Objet requis: 'temp(...)'

                Ive created an account on google latitude, ive used the badge on the pc version and it works well..

                i used the v6.txt version. The badge contains a minus sign. Im based in the indian ocean near south africa.

                Could you please help

                thanks a lot
                vic1743

                Comment


                  #9
                  Originally posted by bagpuss View Post
                  Sorry to drag this up again, I was interested in using Pachube too. MrHappy, you mention you just upload your data as .csv? Can you expand on how you do that in HS please?

                  Chris
                  Sure, if you register a feed on Pachube you should get a feed ID and an upload key (I think you get the key when you sign up), make a note of these.

                  This is the script I run every five minutes on a recurring event;

                  PHP Code:
                  Sub Main(ByVal Parms As String)

                  'upload data to pachube relating to sensors etc

                  Dim ElecValue = hs.devicevalue("V1")
                  Dim HAValue = hs.devicevalue("V3")
                  Dim LngTemp = (hs.devicevalue("T1") / 100)
                  Dim BedTemp = (hs.devicevalue("T5") / 100)
                  Dim OutTemp = (hs.devicevalue("T2") / 100)
                  Dim SetTemp = hs.devicevalue("T3")

                  Dim IAM1 = hs.devicevalue("V4")
                  Dim IAM2 = hs.devicevalue("V5")
                  Dim IAM3 = hs.devicevalue("V6")

                  Dim WebStr As String

                  WebStr = ElecValue & "," & HAValue & "," & LngTemp & "," & BedTemp & "," & Outtemp & "," & Settemp & "," & IAM1 & "," & IAM2 & "," & IAM3

                  Try

                  Dim strURL = "http://www.pachube.com/api/feeds/9715.csv"
                  Dim wR As System.Net.WebRequest = System.Net.WebRequest.Create(strURL)
                  wR.Headers.Add("X-PachubeApiKey: xxxxxxf9241a3e078a2082c97cdd07f06c1c27f42bba01bda0a608a0ae78484f")

                  wR.Method = "PUT"

                  Dim oEncoder As New System.Text.ASCIIEncoding()
                  Dim bytes As Byte() = oEncoder.GetBytes(webStr)

                  Dim postStream As System.IO.Stream = wR.GetRequestStream()

                  postStream.Write(bytes, 0, bytes.Length)
                  postStream.Close()

                  Dim wResponse As System.Net.WebResponse = wR.GetResponse()

                  Dim ResponseText As String

                  Using SReader As New system.io.StreamReader(wResponse.GetResponseStream)

                  ResponseText = SReader.readtoend()

                  End Using

                  wR = Nothing

                  Catch

                  hs.writelog("Pachube", "Error uploading to Pachube")

                  End Try

                  End Sub 
                  Theres a few things in there you would need to change, these lines;

                  Dim strURL = "http://www.pachube.com/api/feeds/9715.csv" - You would need to change the 9715 to whatever feed ID you had

                  wR.Headers.Add("X-PachubeApiKey: xxxxxxf9241a3e078a2082c97cdd07f06c1c27f42bba01bda0a608a0ae78 484f") - Need to add the full API key after the space

                  My comma seperated string is obviously custom to me, whatever you put in the WebStr string would end up uploaded (don't worry, after the first upload you change the titles on the Pachube website itself), so it'd be hs.devicevalue("A1") & "," & hs.devicevalue("A2") & "," & etc etc. If you need any help with this let me know

                  Mines been working OK, the gaps you see on that graph is my fault, I left my temp software offline.

                  All of the graphs are linked from the Pachube website into HSTouch, rather than producing them on the HS server. There is/was an app for the iPhone aswell, so you could view the graphs without going into HSTouch.

                  Comment


                    #10
                    Superb, thank you for the quick response and script, I'm going to give this a go!

                    Comment


                      #11
                      You can also give this a try and it'll work without an internet connection.

                      http://forums.homeseer.com/showthread.php?t=139857

                      You can also take the image file created and imbed it in another image if you want to display on HSTouch using Jon's Image Builder.

                      I'm doing this (sans graphs) for my Weatherunderground upload every few minutes.
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                      Comment


                        #12
                        Originally posted by mrhappy View Post
                        Sure, if you register a feed on Pachube you should get a feed ID and an upload key (I think you get the key when you sign up), make a note of these.

                        This is the script I run every five minutes on a recurring event;


                        Theres a few things in there you would need to change, these lines;

                        Dim strURL = "http://www.pachube.com/api/feeds/9715.csv" - You would need to change the 9715 to whatever feed ID you had

                        wR.Headers.Add("X-PachubeApiKey: xxxxxxf9241a3e078a2082c97cdd07f06c1c27f42bba01bda0a608a0ae78 484f") - Need to add the full API key after the space

                        My comma seperated string is obviously custom to me, whatever you put in the WebStr string would end up uploaded (don't worry, after the first upload you change the titles on the Pachube website itself), so it'd be hs.devicevalue("A1") & "," & hs.devicevalue("A2") & "," & etc etc. If you need any help with this let me know

                        Mines been working OK, the gaps you see on that graph is my fault, I left my temp software offline.

                        All of the graphs are linked from the Pachube website into HSTouch, rather than producing them on the HS server. There is/was an app for the iPhone aswell, so you could view the graphs without going into HSTouch.
                        OK I've added my own API key and Feed ID and also my own device codes, but I'm getting a compile error in the log when the script runs.

                        script run or compile error in file: pachubescript.txt1006:Expected ')' in line 1 More info: Expected ')'

                        Everything has been copied/pasted so I'm wondering if my text editor is the problem. Can you post the script as a file instead please?

                        Are there any parameters to pass to the script when it is run?

                        Thanks!

                        Comment


                          #13
                          Another option that I haven't gotten around to looking at is ChartDirector. I use the ASP.NET libraries, but I know you can also have it render to a JPG image. My guess is you could run a script every so often, and write the JPG for whatever you want to graph to somewhere that you could have HSTouch pick it up.

                          An example of the graphing is below.

                          Steve
                          Attached Files

                          Comment


                            #14
                            Originally posted by bagpuss View Post
                            OK I've added my own API key and Feed ID and also my own device codes, but I'm getting a compile error in the log when the script runs.

                            script run or compile error in file: pachubescript.txt1006:Expected ')' in line 1 More info: Expected ')'

                            Everything has been copied/pasted so I'm wondering if my text editor is the problem. Can you post the script as a file instead please?

                            Are there any parameters to pass to the script when it is run?

                            Thanks!
                            I got it to work. I just cut and pasted. I did use the extension .VB versus .txt It only has a few data points right now...

                            The only problem with pachube is the cost of anything other than the 30 day history free account.

                            I'll have to figure out how to get individual/combination graphs into HStouch, both on my PC's and my ipad/iphone.
                            Last edited by snedecor; December 9, 2010, 06:51 PM.

                            Comment

                            Working...
                            X