OK, I'll try and add something over the next day or two.
Announcement
Collapse
No announcement yet.
Jon00 Virtual device graphing utility
Collapse
X
-
V1.01 released!
Version 1.01 is now available.
The only change in this version is the ability to monitor the device status of a device to provide metrics for on,off and dim values:
On: 100
Off: 0
Dim: Percentage value (0-100)
(0 to 100 being the value given to the graph)
You could now for example, create 2 graphs; one for temperature and one to show when the HVAC is operating in a room.Last edited by jon00; January 10, 2009, 07:20 AM.
Comment
-
Hello Jon,
Thanks for another great plugin.
I have installed version 1.01
I tried to make a graph for the amount off toilet visits
But the only thing i see is number 17 in the graph
I use a ds10 sensor with code:_17
I have made a event as discript in the manual
I trigger only when the toilet is flusht
The graphics from my temp sensors working great.
http://www.esschenk.dyndns.org/BUILDPAGE.ASh?VAL=Qv
[Graph3]
Housecode=K3
Title=Toilet Bezoek
TextBeforeValue="Aantal Bezoeken : "
TextAfterValue=Toilet
Units=
BackGroundColor="#5E697A"
ImageFile=blue.gif
SampleSize=200
Height=30
HeightSpacer=8
ToolTips=1
Offset=0
ShowCurrentValue=1
ShowLowHighValues=2
Data=$DS:_17
DelayCount=1
DivideValue=1
*** read values only ***
CurrentValue=17
HighValue=17
LowValue=17
Counter=
Have i made a mistake somewhere???
ed
Comment
-
The value 17 means that the device status is unknown and really means it has not been set by the script/plugin/homeseer.
I'm not sure what you are trying to achieve on the graph? The number of flushes a day and when they happened?
If so, it would be easier to write a small script that would produce a staircase graph, i.e it steps up each time you flush.
Comment
-
You need a simple counting script. Call it flushcount.vb
Get your DS10 to trigger this script without any optional parameters.
Create a new virtual device and set the housecode below to suit.
PHP Code:Sub Main(ByVal Reset As String)
Dim lvalue As String
Dim ltotal As String
Dim Housecode As String = "A25"
If Len(Reset)>0 then hs.SetDevicevalue (Housecode, -1)
If hs.DeviceString(Housecode) = "" Then hs.SetDevicevalue (Housecode, -1)
lvalue= hs.Devicevalue (Housecode)
ltotal = lvalue +1
hs.SetDeviceString (Housecode, "<img src='\images\toilet.gif' >" & " Flushes Today: " & Cstr(ltotal), true )
hs.setdevicevalue (Housecode,ltotal)
end sub
To reset the script, create an event to run at midnight but call the script with optional parameters:
("Main","1")
This will reset the counter back to 0
Use the devicevalue for this device in my graph and it will step up after each flush and then drop again at midnight.
Comment
-
Jon,
How many "points" does this graph? That is, if I wanted the graph to show 24 hours, how often do I need to update the graph in order to get enough points to do a rolling 24 hours?
Thanks!
--DanTasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.
Comment
Comment