<?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[Run Hours]]></title><description><![CDATA[<p dir="auto">Hi, I am using a binary point for a compressor, and I want to know if is any possibility to extract this data and to trigger an alarm after 1000h of running:</p>
<p dir="auto"><img src="https://camo.nodebb.org/c48edb7d61372f2e5119f08ca4955e1af9ad288f?url=https%3A%2F%2Fi.imgur.com%2FSUfipt9.jpg" alt="0_1500280464572_run hours.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/topic/2859/run-hours</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 14:08:38 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2859.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Jul 2017 08:35:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Run Hours on Mon, 24 Jul 2017 21:48:12 GMT]]></title><description><![CDATA[<p dir="auto">Yes, that's right, at the last second of the day produce that value, I'm starting to see how this is working.<br />
Thanks again!</p>
]]></description><link>https://forum.mango-os.com/post/15052</link><guid isPermaLink="true">https://forum.mango-os.com/post/15052</guid><dc:creator><![CDATA[georgestefan]]></dc:creator><pubDate>Mon, 24 Jul 2017 21:48:12 GMT</pubDate></item><item><title><![CDATA[Reply to Run Hours on Mon, 24 Jul 2017 19:28:51 GMT]]></title><description><![CDATA[<p dir="auto">Have you let this run over night? With that cron pattern it should only run on the last second of the day to produce a value.</p>
]]></description><link>https://forum.mango-os.com/post/15050</link><guid isPermaLink="true">https://forum.mango-os.com/post/15050</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 24 Jul 2017 19:28:51 GMT</pubDate></item><item><title><![CDATA[Reply to Run Hours on Mon, 24 Jul 2017 18:48:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phildunlap" aria-label="Profile: phildunlap">@<bdi>phildunlap</bdi></a> I've created a meta point like this and when I run the script it shows me the right value, but the limit detector didn't worked</p>
<p dir="auto">This is the meta point:<br />
<img src="https://camo.nodebb.org/b80a6b8f76c6cecc290f0c30e62a8c00f7ac98c2?url=https%3A%2F%2Fi.imgur.com%2FbyPbqcI.jpg" alt="0_1500921881770_script.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">And I've noticed this in my data base:<br />
<img src="https://camo.nodebb.org/11bb1b595de6906c7cc9249350060dafaecebf16?url=https%3A%2F%2Fi.imgur.com%2FzP3Nf2r.jpg" alt="0_1500921925387_point.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">Comp_Run_H it's the meta point from above.<br />
Can you tel me why I don't have any value returned?</p>
]]></description><link>https://forum.mango-os.com/post/15048</link><guid isPermaLink="true">https://forum.mango-os.com/post/15048</guid><dc:creator><![CDATA[georgestefan]]></dc:creator><pubDate>Mon, 24 Jul 2017 18:48:18 GMT</pubDate></item><item><title><![CDATA[Reply to Run Hours on Mon, 17 Jul 2017 20:15:20 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, I'll try this.</p>
]]></description><link>https://forum.mango-os.com/post/14918</link><guid isPermaLink="true">https://forum.mango-os.com/post/14918</guid><dc:creator><![CDATA[georgestefan]]></dc:creator><pubDate>Mon, 17 Jul 2017 20:15:20 GMT</pubDate></item><item><title><![CDATA[Reply to Run Hours on Mon, 17 Jul 2017 16:02:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi George,</p>
<p dir="auto">There is! Runtime information is available in the StartsAndRuntimes object returned from the past() and previous() functions on data points in scripts.</p>
<p dir="auto">So, i could have a meta point like,</p>
<pre><code>var stats = p.past(DAY); //p is the variable name of the binary point in the context
for(var k = 0; k &lt; stats.data.length; k+=1) {
    if(stats.data[k].value === true)
        return my.value + stats.data[k].runtime/3600000; //runtime given in milliseconds
}
return my.value;
</code></pre>
<p dir="auto">running on a cron like <code>59 59 23 * * ?</code> and it'll totalize once a day the hours run that day. Then you can put a limit detector on the meta point.</p>
]]></description><link>https://forum.mango-os.com/post/14910</link><guid isPermaLink="true">https://forum.mango-os.com/post/14910</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 17 Jul 2017 16:02:42 GMT</pubDate></item><item><title><![CDATA[Reply to Run Hours on Mon, 17 Jul 2017 17:16:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/georgestefan" aria-label="Profile: georgestefan">@<bdi>georgestefan</bdi></a> you can add an event detector to detect if it stays in the same state for x hours but that wont work if the compressor turns off and on obviously. I'm sure there is a way to do what you are asking via scripting. <a class="plugin-mentions-user plugin-mentions-a" href="/user/phildunlap" aria-label="Profile: phildunlap">@<bdi>phildunlap</bdi></a>  should be able to help you.</p>
]]></description><link>https://forum.mango-os.com/post/14908</link><guid isPermaLink="true">https://forum.mango-os.com/post/14908</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 17 Jul 2017 17:16:55 GMT</pubDate></item></channel></rss>