RRD database and Interactive graphs

I finally got a script running that should be able to handle at least two one wire networks (on separate pins) and as many devices as the one wire network can handle. I'm hoping it can handle about 20 to 25 devices on each network. I'm collecting temperature data from different locations.

The data is sent to an RRD database that resides on the Yun.

I have a simple html page that displays a graph png file made by rrdtool. The png file is updated by a simple cron task.

This way I can remotely log directly into the Yun that is running all the time and I don't need my main computer running all the time to act as a server.

The only problem with this is the limitations of the rrdtool graphing. It would be nice to have an interactive web page that would let you select which points you want to display and the date/time range.

I've searched around and stumbled into RrdGraphJS, Cacti, etc. I've never worked with Java or AJAX before. Anyone got something like this working that they would care to share. Is it even possible with the limitations of the Yun.

ottsm: The only problem with this is the limitations of the rrdtool graphing. It would be nice to have an interactive web page that would let you select which points you want to display and the date/time range.

As you found, rrdtool's graphing is somewhat limited - it's designed to provide graphs of operating trends to monitor network and system performance and health. As such, it seems to be typically used to generate a few standard (fixed data and time span) graphs on a web page, that are views periodically to determine system status.

That doesn't mean they can't be used for other purposes, but it does mean that it is not a general purpose data visualization and exploration tool. If you want to be able to select different combinations of data streams and time spans, you will have to develop those controls on your own, and generate the graph dynamically based on those inputs.

I have written a system that stores historical data in an RRD database and uses the standard graph tool to plot it on different time bases. My system uses the Python Bottle framework to drive the web application. I've added the ability for a web request to specify the desired time span of a graph, and the graph is dynamically generated. I've found it to be responsive enough for my needs, that I can generate the graphs on demand and not have to set up a cron task to generate the graphs. This lets me feed dynamic graph parameters to the code that generates the graph (in my case, just time span, but you could use other parameters to control the graph as well.)

Details of my system are here: HowTo: Using RRD - Round Robin Database

In that thread I give complete code examples of how I generate the graphs dynamically. You should be able to expand on that to handle your more complex needs.

Since rrdtool satisfies my graphing needs, I've not looked into any of the alternatives you've mentioned, so I'm sorry that I can't give any help or information on them.

Thanks for the info, I've been struggling with something that would be light weight enough for the Yun. When your working and raising a family it's hard to find time to figure out all this without something to kick start the programming process.

Now I'm going to also need to rethink how I got my data into the RRD database. I just made two temporary files, the first contained the template variable names that I wanted to store. The second contained the actual data. Then I just ran a shell command from the arduino that used xargs to get the data into the RRD database. Example; 1st file; -t Temp1:Temp2:Temp3.............. 2nd file; N:123.3:123.4:123.5.................. The shell; (cat file1;cat file2)|xargs rrdtool update datafile.rrd

This way I could use "for" loops to get the data appended into the files and not have to worry about running out of ascii character space. Using the template option of RRDtool allows me to initially setup setup the RRD database with more variables than I need so I can add some later. It been working for several days now without any problems.

Currently I only have 3 temperature probes but I alternate the addresses to simulate 20 devices x 2 networks (total 40). 20 more sensors are on the way. The real test will be how good the Dallas one wire network performs. I am not using the parasitic mode. I'm going to try to limit the amount on one network to about 20 to 25. I may have to split the network into 3 or 4 and the number of devices on one network down to 10-15.