Ds2423
-
To day i upgraded to V1.8.1
The upgrade went fine, and i added the DS2423 device
The device was quick recognized and i gave it the atrubute 15 that is the input i use.I made a simple point and the actual value was shown on the graphical view
so far so good.I would like to see the value for each day.
So at 00:00 the graphical view must show 0 and during the day as the sun warms up the collector the value must be increasing 1 kwh at the time.
The device that is providing the pulses to the ds2423 gives 1 pulse for each kwh.
When the sun is down the value must be the total value of the counted pulses for that day.I would love to see a chart also.
How and where do i program this in mango ?
Kind regards
Sprokkie -
@sprokkie said:
The device that is providing the pulses to the ds2423 gives 1 pulse for each kwh.
When the sun is down the value must be the total value of the counted pulses for that day.
..
I would like to see the value for each day.
So at 00:00 the graphical view must show 0 and during the day as the sun warms up the collector the value must be increasing 1 kwh at the time.Sprokkie you can do this with a Meta point. Add a new meta point and read the help file for it by clicking the question mark icon.
I think you want to enter the script in the meta point as:
return p45.previous(DAY,1).sum;
since you say it is pulses. you will have to replace p45 with your own point.
-
Where is the code you descibed located ?
-
add a meta point
-
i added a the meta point.
i replaces p45 for my point (p20)the value in the graphical view is 4446.0
that is strange its 0:58 localtime
there are no kwh pulses at the momentthe value shoud be 0
what went wrong
-
I'm not sure. It would seem that the sum of your point over the past day is 4460.
try some of the other functions documented in the help file for meta points until you find the combination that supplies the answer you think is correct
-
Maybe it's recursing? Does the number keep rising or does it stay at 4460? If you update the other point does this number start rising again?
I changed the meta point so that it does not listen to itself, and so these recursions won't happen on context update.
-
as I understand his point value pulses every time a kwh passes. I assumed the magnitude of the pulse was 1, so the sum of pulses in the past day was the kwh for the day. even if the script was recursing, it doesn't reference itself, so shouldn't be growing like the other fellow's.
Perhaps his point value is already the sum of the pulses, and is slowly increasing. in this case he wants p1.value - p1.ago(DAY,1) to get just the pulses today.
-
Right you are. I'm mixing up my contexts. Carry on...
-
@craig said:
as I understand his point value pulses every time a kwh passes. I assumed the magnitude of the pulse was 1, so the sum of pulses in the past day was the kwh for the day. even if the script was recursing, it doesn't reference itself, so shouldn't be growing like the other fellow's.
Perhaps his point value is already the sum of the pulses, and is slowly increasing. in this case he wants p1.value - p1.ago(DAY,1) to get just the pulses today.
The Value of the counter on the 2324 = 2762
the value of the metapoint is 44464.0 that doesn't make senseat the moment there are no pulses generated
for the script i only use the line that was posted here
I canged in the code the sum to count and it seems to work
i have to wait until tommorow to see if the value wil be starting over from zero