Results 1 to 5 of 5

Thread: Can I make a temperature graph in webserver?

  1. #1
    Join Date
    Jul 2001
    Location
    Risør - Norway
    Posts
    5,477

    Default Can I make a temperature graph in webserver?

    For now I'm using my RFXtrx433 with a bunch of temp sensors and heating control with EventGhost because it's a lot easier to do the RF stuff in there, and I'm actually not sure if it works in Girder yet. The advanced functions are done by sending the sensors' readings to Girder with Event.exe. Works perfectly, not a glitch in more than a year. But I would like to have another, fun function: A graph that shows the temperature in a zone the last 24 hours, the last week and the last month. Is that possible with the Girder webserver in any way? Or should I try to do it in HTML, with Girder just writing values to a CSV or similar file?
    Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
    Hobsyssel mastiffs: http://www.hobsyssel.no

  2. #2

    Default

    .....in case you are still looking for a solution.......

    I have been using FLOT, http://www.flotcharts.org/

    If you have any questions I might be able to help, just let me know and I will share my implementation

    Regards

  3. #3
    Join Date
    Jul 2001
    Location
    Risør - Norway
    Posts
    5,477

    Default

    Hi! That does seem interesting. I have connected my Teldus RemoteStick to a service, but this seems like it can be more flexible. Do you do everything in LUA?
    Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
    Hobsyssel mastiffs: http://www.hobsyssel.no

  4. #4

    Default

    Hi,

    The data collection side of it is done in LUA like this,

    Code:
    if fifoc < 48 then
    	fifoc = fifoc + 1
    	--table.insert(fifo_temp, 1, weatherdata.Temp_Ext)
    	table.insert(fifo_temp, 1, {})
    	table.insert(fifo_temp[1], 1, os.time()*1000)
    	table.insert(fifo_temp[1], 2, weatherdata.Temp_Ext)
    
    else
    	table.remove(fifo_temp, 48)
    	--table.insert(fifo_temp, 1, weatherdata.Temp_Ext)
    	table.insert(fifo_temp, 1, {})
    	table.insert(fifo_temp[1], 1, os.time()*1000)
    	table.insert(fifo_temp[1], 2, weatherdata.Temp_Ext)
    
    end
    On the web server side it is javascript, something like this,

    Code:
    $(document).ready(function() { setTimeout('checkGIRDER()',5000); });
    
                function test(arMyValues) {
                    try {
                    $.plot($("#placeholder"), [ {
                        data: arMyValues,
                        xaxis: { mode: "time" },
                        color: "rgb(255, 64, 64)",
                        threshold: { below: "0", color: "rgb(0, 178, 238)" }
                } ])
    
                        }
                    catch(err){
                        alert(err.message)
                    }
                    
                }
    
        
          $('#temp_trend').live('pageshow', function () { test(arMyValues);  });
    You can check out my example, pic taken from an iphone, a bit down in this thread

    http://www.promixis.com/forums/showt...php?21339-Home

    Regards

  5. #5
    Join Date
    Jul 2001
    Location
    Risør - Norway
    Posts
    5,477

    Default

    Thanks! I'll have a look at that setup one day I have the time (which probably means in a couple of weeks at the rate things are going right now)!
    Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
    Hobsyssel mastiffs: http://www.hobsyssel.no

Posting Permissions

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