What product are you using for your charts?
I am working on adding a plugin property that would maintain a collection of data points for the last hour. You could then easily grab these data points for your charting scripts. I'm looking at a collection:
Public HourlyData As New Dictionary(Of DateTime, Double())
Key=date/time of datapoint
Value= Double() containing data points
Let me know what you think,
tenholde
I use chartdirector for charts and meters.
I extract device values to create these meters triggering vb scripts that runs every minute. Sample of amps meter script below:
Sub Main(parm as object)
dim curValue,value,m
dim cd as object
cd = CreateObject("ChartDirector.API")
curValue = hs.devicevalue ("%18")
value = (curValue)
m = (cd.AngularMeter(250, 125, cd.silverColor(), &H000000, 2))
Call m.setRoundedFrame()
Call m.setMeter(120, 100, 85, -90, 90)
Call m.setScale(0, 100, 10, 15, 5)
Call m.addZone(0, 20, 0, 85, &Hffff33)
Call m.addZone(20, 60, 0, 85, &H66ff66)
Call m.addZone(60, 100, 0, 85, &Hff6666)
Call m.addText(120, 70, "Amps", "arialbd.ttf", 12, cd.TextColor, cd.Center)
Call m.addText(200, 8, m.formatValue(curValue, "2"), "arial.ttf", 8, &H33ff33 _
).setBackground(&H000000, 0, -1)
Call m.addPointer(value, &H40666699, &H000000)
Call m.addTitle2(cd.TopLeft," House Amps","arialbd.ttf",8, &H000000)
m.makeChart("c:\program files\homeseer 2\html\images\HouseAmperage.jpg")
End Sub
View attachment 2325
It would be nice to not have to trigger an event and have the charts update with the plug-in if possible.
I am now using mcsTemperature plug-in to log and graph usage but am open to any new ideas.