I set up MRTG to make web pages with graphs of data from Indigo (temperature, humidity, when lights were on, etc). There is a brief description on my blog at
http://www.dial911anddie.com/weblog/200 ... -software/
An example graph looks like
Let me start by just ranting about how bad MRTG is. It is unquestionable the worst graphing program I have ever used. No auto scale, can’t to negative numbers, can’t have a y axis that does not start at zero, need I say more. Oh, yah, obtuse and confusing to use.
seanadams wrote:Let me start by just ranting about how bad MRTG is. It is unquestionable the worst graphing program I have ever used. No auto scale, can’t to negative numbers, can’t have a y axis that does not start at zero, need I say more. Oh, yah, obtuse and confusing to use.
Why are you using MRTG?!?!? It's utterly ancient.
RRDTool is what you should be using for this. Written by the same guy but it is much more powerful, not just in graph presentation features but also in the internals.
Whereas MRTG was made primarily for graphing router interfaces, RRDTool is a totally general package for handling any time-series data. There exist many network monitoring packages built on top of it (eg Cacti, cricket) but all you need here is rrdtool (plus a script to pull data values periodically from indigo and put them in the rrd).
jamus wrote:It sounds like you're familiar with MRTG, do you happen to know if it can do two y-axises? I've been using jpgraph to plot my variables, and it's useful to see temperature and kilowatt usage vs time on the same graph. Another graph I would want to create is real-time energy cost and energy usage versus time.
tell application "IndigoServer"
set upstairs to temperatures of device "Upstairs Thermostat"
set downstairs to temperatures of device "Downstairs Thermostat"
return upstairs & downstairs
end tell
% osascript temp
75.0, 77.0
webdeck wrote:When I run it, though, I get temperature values that are exactly four degrees higher than they should be.
webdeck wrote:I'm not using RRDTool yet. All I'm doing so far is running the AppleScript I included above.
webdeck wrote:
- Code: Select all
% osascript temp
75.0, 77.0
While Indigo shows values of 71 and 73 for both thermostats.
Any ideas?
[Matt:~/Desktop]: osascript test
73.0, 72.0
support wrote:Hi Mike,
I'm not sure why you are getting incorrect values. I just tried it and got the correct (same) values shown in Indigo's UI:
- Code: Select all
[Matt:~/Desktop]: osascript test
73.0, 72.0
Do you get the same result if you run the script in the Script Editor? Are you running the script on the same Mac running Indigo Server, or do you have more than one Mac?
rrdtool create /usr/local/share/logtemp.rrd --step 900 DS:Upstairs:GAUGE:2000:32:120 DS:Downstairs:GAUGE:2000:32:120 RRA:AVERAGE:0.5:1:350400 RRA:AVERAGE:0.5:96:3650 RRA:MIN:0.5:96:3650 RRA:MAX:0.5:96:3650
tell application "IndigoServer"
set upstairs to temperatures of device "Upstairs Thermostat"
set downstairs to temperatures of device "Downstairs Thermostat"
return (upstairs as string) & ":" & (downstairs as string)
end tell
#!/bin/csh -f
set temps = `/usr/bin/osascript /usr/local/share/logtemp.scpt`
/opt/local/bin/rrdtool update /usr/local/share/logtemp.rrd "N:$temps"
/opt/local/bin/rrdtool graph \
"/Library/Application Support/Perceptive Automation/Indigo 4/IndigoWebServer/images/controls/static/logtemp.png" \
-a PNG --start "-2days" --width=600 \
--title="Temperature History Over Last 48 Hours" \
--vertical-label="Degrees F" \
'DEF:Upstairs=/usr/local/share/logtemp.rrd:Upstairs:AVERAGE' \
'DEF:Downstairs=/usr/local/share/logtemp.rrd:Downstairs:AVERAGE' \
'LINE1:Upstairs#ff0000:Upstairs' \
'LINE1:Downstairs#0000ff:Downstairs'
exit 0
*/15 * * * * /usr/local/bin/logtemp >/dev/null 2>&1
Users browsing this forum: No registered users and 2 guests