<?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[Script to enter last read when the read is zero, or NAN]]></title><description><![CDATA[<p dir="auto">I am reading a KWH point from a power meter.  I am reading this point every 1 minute with it logging every 5.  Sometimes in my log, I am getting a NAN, or rather a #NAN.   I want to make a script that when this happens as it is logging, it will put in the last good reading.</p>
<p dir="auto">Ive tried this script but its not working.  Any one else, have something to do this?</p>
<p dir="auto">if ((!p367.value)) return my.ago(MINUTE,5);<br />
else return p367.value;</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.mango-os.com/topic/1926/script-to-enter-last-read-when-the-read-is-zero-or-nan</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 17:16:22 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1926.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jul 2015 19:23:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Script to enter last read when the read is zero, or NAN on Thu, 23 Jul 2015 13:55:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hussam" aria-label="Profile: hussam">@<bdi>hussam</bdi></a> I am using a metadatasource to grab the point from an original BACNET in order to make a clean timestamp at 5 minute intervals.     It is on this metadatasource point that I am using this script..</p>
]]></description><link>https://forum.mango-os.com/post/10141</link><guid isPermaLink="true">https://forum.mango-os.com/post/10141</guid><dc:creator><![CDATA[catkins]]></dc:creator><pubDate>Thu, 23 Jul 2015 13:55:54 GMT</pubDate></item><item><title><![CDATA[Reply to Script to enter last read when the read is zero, or NAN on Thu, 23 Jul 2015 02:11:49 GMT]]></title><description><![CDATA[<p dir="auto">you use the meta datasource  or scripting datasource? if logging every 5 minute,and read this point every 1 minute, just wasting resource,the value don't change, you can change you reading period to 5 minute,then ,will be avoid nan.</p>
]]></description><link>https://forum.mango-os.com/post/10139</link><guid isPermaLink="true">https://forum.mango-os.com/post/10139</guid><dc:creator><![CDATA[hussam]]></dc:creator><pubDate>Thu, 23 Jul 2015 02:11:49 GMT</pubDate></item></channel></rss>