<?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[How do I create (Meta) datapoints which do not log values under certain conditions?]]></title><description><![CDATA[<p dir="auto">I am creating a few datapoints intended to log only certain values.</p>
<p dir="auto">For example if x is false, for example, there is no valid data to log, so we'll try again next time y changes but no value now.</p>
<p dir="auto">Pseudo-code:</p>
<p dir="auto">if (x === true)<br />
then<br />
z = y;<br />
else<br />
// z does not get a value<br />
end if</p>
<p dir="auto">I find that when I don't return a value in a Meta datapoint, it gets logged as a zero (0.0). How do I accomplish this?</p>
<p dir="auto">Aldo</p>
]]></description><link>https://forum.mango-os.com/topic/2425/how-do-i-create-meta-datapoints-which-do-not-log-values-under-certain-conditions</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 19:46:46 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2425.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Aug 2016 23:24:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do I create (Meta) datapoints which do not log values under certain conditions? on Fri, 26 Aug 2016 04:34:31 GMT]]></title><description><![CDATA[<p dir="auto">You could try the Discard Extreme values option on the logging setting and return a high value when you don't want to log any data.  So rather than throw no value through 999999 and have the data point set to discard any value over 1000.</p>
]]></description><link>https://forum.mango-os.com/post/12489</link><guid isPermaLink="true">https://forum.mango-os.com/post/12489</guid><dc:creator><![CDATA[JoelHaggar]]></dc:creator><pubDate>Fri, 26 Aug 2016 04:34:31 GMT</pubDate></item><item><title><![CDATA[Reply to How do I create (Meta) datapoints which do not log values under certain conditions? on Thu, 25 Aug 2016 19:42:16 GMT]]></title><description><![CDATA[<p dir="auto">OK, I'll give that a try. Can you suggest any other approaches for filtering unwanted values?</p>
<p dir="auto">You mentioned using a scripting data source; how would that be different?</p>
]]></description><link>https://forum.mango-os.com/post/12486</link><guid isPermaLink="true">https://forum.mango-os.com/post/12486</guid><dc:creator><![CDATA[AldoRamos]]></dc:creator><pubDate>Thu, 25 Aug 2016 19:42:16 GMT</pubDate></item><item><title><![CDATA[Reply to How do I create (Meta) datapoints which do not log values under certain conditions? on Thu, 25 Aug 2016 15:13:02 GMT]]></title><description><![CDATA[<p dir="auto">There has been a little discussion about making that possible, but currently it is not (to my knowledge). So, to do that, you can either use a scripting data source, or you can cause some errors and they won't produce values in that code path. For instance...</p>
<pre><code>if( a == 1 )
  return 50;
else
  return "No value!";
</code></pre>
<p dir="auto">And you can do the same thing by throwing an error rather than returning the wrong datatype, i.e.</p>
<pre><code>throw "No Value";
</code></pre>
<p dir="auto">In either case you may wish to suppress the events for the point / source.</p>
]]></description><link>https://forum.mango-os.com/post/12482</link><guid isPermaLink="true">https://forum.mango-os.com/post/12482</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Thu, 25 Aug 2016 15:13:02 GMT</pubDate></item></channel></rss>