<?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[HttpBuilder not defined]]></title><description><![CDATA[<p dir="auto">Hey, I tried to import a script I have from a PC version of Mango to an ES and I get this error on the ES</p>
<p dir="auto"><strong>ReferenceError: "HttpBuilder" is not defined in at line number 61</strong></p>
<p dir="auto">What am I missing?</p>
]]></description><link>https://forum.mango-os.com/topic/3251/httpbuilder-not-defined</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 23:46:02 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3251.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Feb 2018 15:15:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 17:49:41 GMT]]></title><description><![CDATA[<p dir="auto">Good solution!</p>
]]></description><link>https://forum.mango-os.com/post/17179</link><guid isPermaLink="true">https://forum.mango-os.com/post/17179</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Feb 2018 17:49:41 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 17:48:42 GMT]]></title><description><![CDATA[<p dir="auto">OK I think I came up with something else. I use the HTTP Retriever, pull the entire string into an alpha point and then simply pass that alpha point into my original script and let regex do it's thing. I think that works!</p>
]]></description><link>https://forum.mango-os.com/post/17178</link><guid isPermaLink="true">https://forum.mango-os.com/post/17178</guid><dc:creator><![CDATA[psysak]]></dc:creator><pubDate>Fri, 02 Feb 2018 17:48:42 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 17:08:02 GMT]]></title><description><![CDATA[<p dir="auto">Correct. There may still be options like a reverse SSH tunnel to leave connection initiation in the hands of the client-housed device. Was just a thought!</p>
<p dir="auto">It looks like if there was a regex solution to the first forecast changing the group number you're starting at, then the HTTP retriever data source would be an option.</p>
]]></description><link>https://forum.mango-os.com/post/17174</link><guid isPermaLink="true">https://forum.mango-os.com/post/17174</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Feb 2018 17:08:02 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 17:03:07 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> to publish I would need to be able to connect into the V2 mango right? That ES is on a customer site and I don't know how willing they would be to let me open up ports sadly :(</p>
]]></description><link>https://forum.mango-os.com/post/17173</link><guid isPermaLink="true">https://forum.mango-os.com/post/17173</guid><dc:creator><![CDATA[psysak]]></dc:creator><pubDate>Fri, 02 Feb 2018 17:03:07 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 17:02:42 GMT]]></title><description><![CDATA[<p dir="auto">Most welcome!</p>
<p dir="auto">Could always publish this to it from the updated Mango. The Persistent TCP publisher or HTTP publisher would probably work.</p>
<p dir="auto">MangoES's do have 2--&gt;3 upgrade pricing available but not through the store.</p>
<p dir="auto">The TCP/IP data point solution may not be so bad.</p>
]]></description><link>https://forum.mango-os.com/post/17172</link><guid isPermaLink="true">https://forum.mango-os.com/post/17172</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Feb 2018 17:02:42 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 16:54:21 GMT]]></title><description><![CDATA[<p dir="auto">It's all good, I'll see if about upgrading that unit and it not simplifying something down for this particular instance.</p>
<p dir="auto">As always thank you!</p>
]]></description><link>https://forum.mango-os.com/post/17171</link><guid isPermaLink="true">https://forum.mango-os.com/post/17171</guid><dc:creator><![CDATA[psysak]]></dc:creator><pubDate>Fri, 02 Feb 2018 16:54:21 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 16:51:51 GMT]]></title><description><![CDATA[<p dir="auto">No trivial way.</p>
<p dir="auto">If you know the headers you need in that GET (no dynamic request construction), you could put the whole GET HTTP request into the Query command of an alphanumeric TCP/IP point (don't forget the trailing <code>\n\n</code> in HTTP, and a <code>\n</code> between header rows)</p>
<p dir="auto">So probably a query command like (you may need to experiment with removing the Host header, adding Content-Type, whatever. The easiest would be making the request in the browser with the developer tools open, then you can see a working request's [probably excessive] headers),</p>
<pre><code>GET /forecast/token/45.321488,%20-75.671071?units=si&amp;exclude=minutely,hourly HTTP/1.1\nHost: api.darksky.net\n\n
</code></pre>
<p dir="auto">Then from your script you can do</p>
<pre><code>RuntimeManager.refreshDataPoint("DP_TCPIP_HTTP_Magic");
var response = tcpIpHttpMagicContextPoint.value;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/17170</link><guid isPermaLink="true">https://forum.mango-os.com/post/17170</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Feb 2018 16:51:51 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 16:39:36 GMT]]></title><description><![CDATA[<p dir="auto">Here's the script, this is part of a scripting data source.</p>
<pre><code>var headers = {}
var parameters = {}
var regex = '{\"time\":(\\d*),.*?\"temperature\":(-?\\d*\\.?\\d*).*?\"daily\".*?{.*?\\[.*?\"time\":(\\d*),.*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?\"temperatureHigh\":(-?\\d*\\.?\\d*).*?]';
var match;

// This is the function which parses the returned data from DarkSky
// The passed variable "data" is the actual JSON contents returned
function handleTemperatureData(data) {

   // The var match is an array which results from parsing the data through the regex
   // Each element of the array is an individual value where
   // match[1] returns current time
   // match[2] returns the current temperature
   // match[3] is a time value for the first forecast value
   // match[4-11] are the daily forecast high temperatures
   match = RegExp(regex).exec(data);

    var k;
    
    // This is required because the way that DarkSky returns data sometimes 
    // the first "forecast" data point is actually still a forecast temperature
    // for today. If this is the case then we have to skip this value otherwise
    // the forecast for tomorrow will actually be the forecast for today etc
    if(match[3] &lt; match[1]) { 
        // This means that the first reading is for today, skip it and use the 
        // next value as a starting point
        k = 5;
    } else {
        k = 4;
    }

    if(match.length &gt;= 11) {
        CurrentTemp.set(match[2]);
        OneDayForecastTemp.set(match[k]);
        TwoDayForecastTemp.set(match[k+1]);
        ThreeDayForecastTemp.set(match[k+2]);
        FourDayForecastTemp.set(match[k+3]);
        FiveDayForecastTemp.set(match[k+4]);
        SixDayForecastTemp.set(match[k+5]);
        SevenDayForecastTemp.set(match[k+6]);
        
    }
} // End of function
 
// This portion is the part which actually retreives the data from DarkSky
HttpBuilder.get("https://api.darksky.net/forecast/token/45.321488,%20-75.671071?units=si&amp;exclude=minutely,hourly", headers, parameters).err(function(status, headers, content) {
  throw "Script failed with HTTP status: " + status;
}).resp(function(status, headers, content) { 
   // Needs to be 200 status or you can set the accepted statuses
   // If all is well then call the parsing function and pass the JSON to it
   handleTemperatureData(content);
}).execute();
</code></pre>
<p dir="auto">Is there any way to duplicate this functionality on a V2 Mango ES?</p>
]]></description><link>https://forum.mango-os.com/post/17168</link><guid isPermaLink="true">https://forum.mango-os.com/post/17168</guid><dc:creator><![CDATA[psysak]]></dc:creator><pubDate>Fri, 02 Feb 2018 16:39:36 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 16:35:19 GMT]]></title><description><![CDATA[<p dir="auto">The release notes suggest 3.2.2: <a href="https://github.com/infiniteautomation/ma-core-public/blob/main/Core/RELEASE-NOTES" rel="nofollow ugc">https://github.com/infiniteautomation/ma-core-public/blob/main/Core/RELEASE-NOTES</a></p>
]]></description><link>https://forum.mango-os.com/post/17167</link><guid isPermaLink="true">https://forum.mango-os.com/post/17167</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Feb 2018 16:35:19 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 16:28:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jared-wiltshire" aria-label="Profile: jared-wiltshire">@<bdi>jared-wiltshire</bdi></a> Hey, of course! sorry about that. Let me see if updating it helps.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phildunlap" aria-label="Profile: phildunlap">@<bdi>phildunlap</bdi></a> hmmm... what version did that functionality appear in? The Mango in question that I will be loading it into is still a v2.8.</p>
]]></description><link>https://forum.mango-os.com/post/17165</link><guid isPermaLink="true">https://forum.mango-os.com/post/17165</guid><dc:creator><![CDATA[psysak]]></dc:creator><pubDate>Fri, 02 Feb 2018 16:28:02 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 16:21:20 GMT]]></title><description><![CDATA[<p dir="auto">Almost assuredly that ES is not up to date. if you update Mango, you should have the HttpBuilder in your script's context in all script areas.</p>
]]></description><link>https://forum.mango-os.com/post/17164</link><guid isPermaLink="true">https://forum.mango-os.com/post/17164</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Feb 2018 16:21:20 GMT</pubDate></item><item><title><![CDATA[Reply to HttpBuilder not defined on Fri, 02 Feb 2018 16:01:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/psysak" aria-label="Profile: psysak">@<bdi>psysak</bdi></a> You will have to post the script you are talking about. A meta data point script?</p>
]]></description><link>https://forum.mango-os.com/post/17160</link><guid isPermaLink="true">https://forum.mango-os.com/post/17160</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Fri, 02 Feb 2018 16:01:27 GMT</pubDate></item></channel></rss>