<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Meta Point - Timestamp Not Constant]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am currently having an issue related to Meta Point. Appreciate your guidance.</p>
<p dir="auto">I had do the following setup:</p>
<ul>
<li>create 1 virtual data source &amp; 1 meta data source.</li>
<li>create 10 datapoints in virtual data source.</li>
<li>create several datapoints in meta data source. My script will use the datapoints created in virtual data source. I had also included TIMESTAMP = XXXX.time so that the timestamp of the meta point is the same as virtual point.</li>
<li>create excel report to download the 10 datapoints in virtual data source and a few datapoints in meta source.</li>
<li>run the excel report</li>
</ul>
<p dir="auto">After download the excel report from Mango, I had included the formulas manually (same formula in the script for meta datapoints) in the excel report to check if the meta points produced the same results as the formulas I had created in the excel report.</p>
<p dir="auto">I had realized that the figures in meta points do not tie to my manual calculated figures occasionally.</p>
<p dir="auto">I had checked and realized that the meta point timestamp differs occasionally and this may be the trigger point for the variance. I do not know why the timestamp for meta point will differ (for example, 16:51:11) occasionally from the standard 16:xx:13 which is the same timestamp for virtual datapoints.</p>
<p dir="auto">Historical for one of the meta point:<br />
Value	Time	Annotation<br />
0.61kW/RT	16:54:13	<br />
0.62kW/RT	16:53:13	<br />
0.63kW/RT	16:52:13	<br />
0.66kW/RT	16:51:11	<br />
0.67kW/RT	16:50:13	<br />
0.67kW/RT	16:49:13	<br />
0.64kW/RT	16:48:13	<br />
0.65kW/RT	16:47:13	<br />
0.66kW/RT	16:46:13	<br />
0.61kW/RT	16:45:13</p>
<p dir="auto">Thanks.</p>
<p dir="auto">Regards,<br />
Felicia</p>
]]></description><link>https://forum.mango-os.com/topic/3462/meta-point-timestamp-not-constant</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 04:43:41 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3462.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 May 2018 09:05:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Wed, 16 May 2018 15:30:37 GMT]]></title><description><![CDATA[<pre><code>var pvd = this.pvd;
if(!pvd) {
  pvd = this.pvd = com.serotonin.m2m2.Common.databaseProxy.newPointValueDao();
}
print( p.value );
print( p.time );
var loggedValue = pvd.getPointValueBefore( p.getDataPointWrapper().getId(), p.time + 1 );
print( loggedValue.doubleValue ); //if numeric point
print( loggedValue.time );
</code></pre>
<p dir="auto">While this could perhaps be more straightforward, I am having a tough time figuring out why one would be polling a virtual data source to get an interval logging rollup and then compute something off the interval values. It would seem to me to make more sense to record all data from the edge data source, and use the statistics functions in the scripting environment to compute the interval value you wish to use in the script body. That way if you have some anomalies you can still view the original data.</p>
]]></description><link>https://forum.mango-os.com/post/18458</link><guid isPermaLink="true">https://forum.mango-os.com/post/18458</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Wed, 16 May 2018 15:30:37 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Wed, 16 May 2018 02:03:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,</p>
<p dir="auto">Is there anyway to make sure that the meta point calculation is based on the value that is logged instead of using cache values which is updating every 3 seconds?</p>
<p dir="auto">Felicia</p>
]]></description><link>https://forum.mango-os.com/post/18454</link><guid isPermaLink="true">https://forum.mango-os.com/post/18454</guid><dc:creator><![CDATA[Felicia Luong]]></dc:creator><pubDate>Wed, 16 May 2018 02:03:33 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Fri, 11 May 2018 14:36:58 GMT]]></title><description><![CDATA[<p dir="auto">Part of the issue you'd experience in doing a calculation with the history is that you are interval logging on the virtual points, but the .value in the meta script will access the cache of those points' values, which is updating every 3 seconds you said.</p>
]]></description><link>https://forum.mango-os.com/post/18399</link><guid isPermaLink="true">https://forum.mango-os.com/post/18399</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 11 May 2018 14:36:58 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Fri, 11 May 2018 07:10:59 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,</p>
<p dir="auto">I get what you mean by computed live or a history that has been regenerated. To reply your question, the data is computed live.</p>
<p dir="auto">Felicia</p>
]]></description><link>https://forum.mango-os.com/post/18396</link><guid isPermaLink="true">https://forum.mango-os.com/post/18396</guid><dc:creator><![CDATA[Felicia Luong]]></dc:creator><pubDate>Fri, 11 May 2018 07:10:59 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Fri, 11 May 2018 06:59:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,</p>
<p dir="auto">I don't quite understand what do you mean computed live or a history that has been regenerated. Basically, I had setup some virtual points and meta points. The meta point is calculated using virtual points. I am checking if the meta calculation in Mango is correct by doing manual calculation after exporting the points.</p>
<p dir="auto">For example,<br />
Virtual point:</p>
<ul>
<li>Point 1</li>
<li>Point 2</li>
</ul>
<p dir="auto">Meta point:</p>
<ul>
<li>(Point 1 + Point 2)x2</li>
</ul>
<p dir="auto">If Point 1 is 10 and Point 2 is 20, the meta point should be (10+20)x2 = 60</p>
<p dir="auto">I had extracted the data using Excel reports for past 30 minutes and then do a manual calculation to do a comparison. I am not sure if this is what you mean by computed live.</p>
<p dir="auto">FYI, I had made the change to delay by 1 second. The result is worst than no delay meaning more variances.</p>
<p dir="auto">I had been trying a lot of scenarios but failed.</p>
<p dir="auto">Any other better solution to the setup in order to achieve the expected result? This is important as the data will be exported out. I need to make sure it is correct when doing manual calculation else the report will not be reliable.</p>
<p dir="auto">Thanks.</p>
<p dir="auto">Felicia</p>
]]></description><link>https://forum.mango-os.com/post/18395</link><guid isPermaLink="true">https://forum.mango-os.com/post/18395</guid><dc:creator><![CDATA[Felicia Luong]]></dc:creator><pubDate>Fri, 11 May 2018 06:59:48 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Thu, 10 May 2018 15:50:44 GMT]]></title><description><![CDATA[<p dir="auto">These are values that were computed live or a history that has been regenerated? If live, and then the manual is computed after the fact, then it could be the meta point is processing the update before all the context points have been updated. You could introduce a 1 second execution delay in that situation. I am certain the arithmetic is doing what it has been configured to do.</p>
]]></description><link>https://forum.mango-os.com/post/18375</link><guid isPermaLink="true">https://forum.mango-os.com/post/18375</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Thu, 10 May 2018 15:50:44 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Thu, 10 May 2018 06:39:45 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,</p>
<p dir="auto">Thanks for your prompt reply. Sorry for the typo error. It should be every 3 seconds instead of every 3 minutes.</p>
<p dir="auto">I had removed the timestamp and it seems to resolve the current issue I am facing. However, it doesn't resolve the other issue that I am having for the manual calculation. The result of meta point is not the same as manually calculated.  The result will be out occasionally. Below is my result for the calculation:</p>
<p dir="auto">Time                       Manual Cal           From Mango         Variance<br />
10 05 2018 13:27	543.23495708	543.23495708	0.00000000<br />
10 05 2018 13:28	549.48000893	549.48000893	0.00000000<br />
10 05 2018 13:29	535.12357546	535.12357546	0.00000000<br />
10 05 2018 13:30	539.55963913	539.55963913	0.00000000<br />
10 05 2018 13:31	532.14960735	532.14960735	0.00000000<br />
10 05 2018 13:32	554.78660457	554.78660457	0.00000000<br />
10 05 2018 13:33	532.78220782	532.78220782	0.00000000<br />
10 05 2018 13:34	561.12353174	        553.76835358	7.35517816<br />
10 05 2018 13:35	551.65939993	551.65939993	0.00000000<br />
10 05 2018 13:36	540.21521998	540.21521998	0.00000000<br />
10 05 2018 13:37	540.04708387	540.04708387	0.00000000<br />
10 05 2018 13:38	529.39945998	529.39945998	0.00000000<br />
10 05 2018 13:39	530.50840625	536.65520416	-6.14679791<br />
10 05 2018 13:40	539.35237634	539.35237634	0.00000000<br />
10 05 2018 13:41	585.95006258	585.95006258	0.00000000<br />
10 05 2018 13:42	572.85304086	572.85304086	0.00000000<br />
10 05 2018 13:43	579.10346793	579.10346793	0.00000000<br />
10 05 2018 13:44	566.22326928	561.96256136	4.26070792<br />
10 05 2018 13:45	545.42791329	545.42791329	0.00000000<br />
10 05 2018 13:46	579.51836544	579.51836544	0.00000000<br />
10 05 2018 13:47	562.71974977	562.71974977	0.00000000<br />
10 05 2018 13:48	596.57930691	596.57930691	0.00000000<br />
10 05 2018 13:49	606.39143280	606.39143280	0.00000000<br />
10 05 2018 13:50	610.66484066	610.66484066	0.00000000<br />
10 05 2018 13:51	588.74662065	588.74662065	0.00000000<br />
10 05 2018 13:52	561.65815802	561.65815802	0.00000000<br />
10 05 2018 13:53	541.38559756	541.38559756	0.00000000<br />
10 05 2018 13:54	552.09730558	552.09730558	0.00000000<br />
10 05 2018 13:55	535.06272974	535.06272974	0.00000000<br />
10 05 2018 13:56	527.84615008	527.84615008	0.00000000<br />
10 05 2018 13:57	531.92463244	531.92463244	0.00000000<br />
10 05 2018 13:58	551.87285383	551.87285383	0.00000000<br />
10 05 2018 13:59	569.47098284	569.47098284	0.00000000<br />
10 05 2018 14:00	585.64340645	585.64340645	0.00000000<br />
10 05 2018 14:01	588.84734714	588.84734714	0.00000000<br />
10 05 2018 14:02	600.76407692	600.76407692	0.00000000<br />
10 05 2018 14:03	606.30053705	606.30053705	0.00000000<br />
10 05 2018 14:04	605.83226834	605.56736162	0.26490672<br />
10 05 2018 14:05	603.11035797	602.20232108	0.90803689</p>
<p dir="auto">Any idea to fix this issue?</p>
<p dir="auto">Felicia</p>
]]></description><link>https://forum.mango-os.com/post/18368</link><guid isPermaLink="true">https://forum.mango-os.com/post/18368</guid><dc:creator><![CDATA[Felicia Luong]]></dc:creator><pubDate>Thu, 10 May 2018 06:39:45 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Tue, 08 May 2018 14:54:02 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Definitely there is a value in MainHeader1 as the polling is every 3 minutes.</p>
</blockquote>
<p dir="auto">You said 3 seconds the first time. And, I wanted to know if there was a value at that exact time that you're asking about. I think in the original post you said there was.</p>
<p dir="auto">You can remove the <code>TIMESTAMP=MainHeader1.time;</code> portion of the script as it will only introduce cache considerations, when the meta point's default action would be to use the timestamp that generated the event. Since your update events are <code>CONTEXT_LOGGED</code> this will be the timestamp recorded for that series. So, I would say remove that, regenerate the history and you won't see this.</p>
]]></description><link>https://forum.mango-os.com/post/18313</link><guid isPermaLink="true">https://forum.mango-os.com/post/18313</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 08 May 2018 14:54:02 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Tue, 08 May 2018 01:16:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,</p>
<p dir="auto">Definitely there is a value in MainHeader1 as the polling is every 3 minutes. However, the timestamp 1 minute interval. Therefore, the timestamp for meta points should be constant. I do not understand why the timestamp for meta point is not constant because it should be based on the timestamp of virtual point.</p>
<p dir="auto">Is there any other setup to make sure both virtual and meta timestamp is the same? The meta point value should be based on the value of virtual point.</p>
<p dir="auto">Thanks.</p>
<p dir="auto">Regards,<br />
Felicia</p>
]]></description><link>https://forum.mango-os.com/post/18309</link><guid isPermaLink="true">https://forum.mango-os.com/post/18309</guid><dc:creator><![CDATA[Felicia Luong]]></dc:creator><pubDate>Tue, 08 May 2018 01:16:42 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Mon, 07 May 2018 17:41:53 GMT]]></title><description><![CDATA[<p dir="auto">Your setup looks fine. From what I see, I really expect there to be a value in MainHeader1 at the time you are asking about. That's the only way you would have gotten this result.</p>
]]></description><link>https://forum.mango-os.com/post/18308</link><guid isPermaLink="true">https://forum.mango-os.com/post/18308</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 07 May 2018 17:41:53 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Sat, 05 May 2018 13:53:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,</p>
<p dir="auto">I don't think there is any context points of this meta point have a value at 16:51:11. The meta point is executed on Context update. Therefore most of the timestamp of the meta point is per the virtual point. The polling rate for virtual data source is 3 seconds. Below is one of the example of the meta point:</p>
<p dir="auto">{<br />
"dataPoints":[<br />
{<br />
"xid":"PlantOperation2",<br />
"name":"Condenser Heat Reject RT",<br />
"enabled":true,<br />
"loggingType":"ON_TS_CHANGE",<br />
"intervalLoggingPeriodType":"MINUTES",<br />
"intervalLoggingType":"INSTANT",<br />
"purgeType":"YEARS",<br />
"pointLocator":{<br />
"dataType":"NUMERIC",<br />
"updateEvent":"NONE",<br />
"contextUpdateEvent":"CONTEXT_LOGGED",<br />
"context":[<br />
{<br />
"varName":"MainHeader1",<br />
"dataPointXid":"MainHeader1",<br />
"updateContext":true<br />
},<br />
{<br />
"varName":"MainHeader2",<br />
"dataPointXid":"MainHeader2",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"MainHeader3",<br />
"dataPointXid":"MainHeader3",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"MainHeader4",<br />
"dataPointXid":"MainHeader4",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"MainHeader5",<br />
"dataPointXid":"MainHeader5",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"MainHeader6",<br />
"dataPointXid":"MainHeader6",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"PowerInput1",<br />
"dataPointXid":"PowerInput1",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"PowerInput2",<br />
"dataPointXid":"PowerInput2",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"PowerInput3",<br />
"dataPointXid":"PowerInput3",<br />
"updateContext":false<br />
},<br />
{<br />
"varName":"PowerInput4",<br />
"dataPointXid":"PowerInput4",<br />
"updateContext":false<br />
}<br />
],<br />
"logLevel":"NONE",<br />
"variableName":"PlantOperation2",<br />
"executionDelaySeconds":0,<br />
"script":"TIMESTAMP = MainHeader1.time; return(MainHeader6.value<em>4.19</em>(MainHeader5.value-MainHeader4.value )/3.517);",<br />
"scriptPermissions":{<br />
"customPermissions":"",<br />
"dataPointReadPermissions":"superadmin",<br />
"dataPointSetPermissions":"superadmin",<br />
"dataSourcePermissions":"superadmin"<br />
},<br />
"settable":false,<br />
"updateCronPattern":""<br />
},<br />
"eventDetectors":[<br />
],<br />
"plotType":"SPLINE",<br />
"rollup":"NONE",<br />
"unit":"",<br />
"simplifyType":"NONE",<br />
"chartColour":"",<br />
"chartRenderer":null,<br />
"dataSourceXid":"MS_Building Cooling",<br />
"defaultCacheSize":1,<br />
"deviceName":"PlantOperation",<br />
"discardExtremeValues":false,<br />
"discardHighLimit":1.7976931348623157E308,<br />
"discardLowLimit":-1.7976931348623157E308,<br />
"intervalLoggingPeriod":1,<br />
"intervalLoggingSampleWindowSize":0,<br />
"overrideIntervalLoggingSamples":false,<br />
"preventSetExtremeValues":false,<br />
"purgeOverride":false,<br />
"purgePeriod":1,<br />
"readPermission":"",<br />
"setExtremeHighLimit":1.7976931348623157E308,<br />
"setExtremeLowLimit":-1.7976931348623157E308,<br />
"setPermission":"",<br />
"tags":{<br />
},<br />
"textRenderer":{<br />
"type":"ANALOG",<br />
"useUnitAsSuffix":true,<br />
"unit":"",<br />
"renderedUnit":"",<br />
"format":"0.00"<br />
},<br />
"tolerance":0.0<br />
}<br />
]<br />
}</p>
<p dir="auto">Please let me know if my setup is not correct. My requirement is to have same row for virtual and meta points without roll up and the calculation should be of meta points should be correct if compare to my manual calculation.</p>
<p dir="auto">Thank you.</p>
<p dir="auto">Regards,<br />
Felicia</p>
]]></description><link>https://forum.mango-os.com/post/18303</link><guid isPermaLink="true">https://forum.mango-os.com/post/18303</guid><dc:creator><![CDATA[Felicia Luong]]></dc:creator><pubDate>Sat, 05 May 2018 13:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to Meta Point - Timestamp Not Constant on Thu, 03 May 2018 15:22:39 GMT]]></title><description><![CDATA[<p dir="auto">Hi Felicia,</p>
<p dir="auto">Interesting question!</p>
<p dir="auto">I wonder a few things,</p>
<ol>
<li>Do any of the context points of this meta point have a value at 16:51:11?</li>
<li>Is the meta point executed on a cron or on Context update?</li>
</ol>
<p dir="auto">I don't think you need to set <code>TIMESTAMP=point.time</code> The point value that triggers the execution will give the meta point's new value its time if TIMESTAMP is not set. Possibly that's what occurred? The event for one of the points in the context fired before the update to the point you take the timestamp from?</p>
<p dir="auto">The odd thing to me is that the interval is shorter. If it was something like a garbage collection pausing something I would expect the interval to be longer (but the meta point still would have used the timestamp of the value that triggered its execution, so I would expect that to be invisible). The thing to do would be provide the JSON of the meta point and check the virtual data for these odd timestamps. What's the polling rate of your virtual data source?</p>
]]></description><link>https://forum.mango-os.com/post/18269</link><guid isPermaLink="true">https://forum.mango-os.com/post/18269</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Thu, 03 May 2018 15:22:39 GMT</pubDate></item></channel></rss>