<?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[Basic Module Development Questions]]></title><description><![CDATA[<p dir="auto">Hi, I have some questions about how to build a module. So far, I've downloaded Eclipse for Java EE Developers and JDK. I've also cloned the git repositories from <a href="https://github.com/infiniteautomation/ma-modules-public" rel="nofollow ugc">https://github.com/infiniteautomation/ma-modules-public</a> and <a href="https://github.com/infiniteautomation/ma-core-public" rel="nofollow ugc">https://github.com/infiniteautomation/ma-core-public</a>. I've been going into the Virtual Data Source folder and right clicking on the pox.xml file, and running it as Maven build. From what I understand, I'm supposed to configure the settings by linking the settings.xml file, but I don't see the file in the Virtual Data Source folder. There's also errors in the other folders that I've cloned. I'm a little confused on where to go from here.</p>
]]></description><link>https://forum.mango-os.com/topic/4303/basic-module-development-questions</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 18:48:40 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4303.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Jul 2019 14:51:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Basic Module Development Questions on Wed, 17 Jul 2019 17:40:47 GMT]]></title><description><![CDATA[<p dir="auto">I guess I have more questions about what you are trying to achieve -</p>
<ul>
<li>Do you require the information retrieved from your external HTTP API to be available as data points / point values? (e.g. you want to store history for them in the Mango time series database, or you want the values to be available on the watch list etc)</li>
<li>Is the external HTTP API available on the internet / accessible from the client web browser? If so you may be able to request the data directly from the web browser via a XHR request.</li>
</ul>
]]></description><link>https://forum.mango-os.com/post/22735</link><guid isPermaLink="true">https://forum.mango-os.com/post/22735</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Wed, 17 Jul 2019 17:40:47 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Wed, 17 Jul 2019 17:35:33 GMT]]></title><description><![CDATA[<p dir="auto">I would start by having a look in the web-src directory of some of the public modules. They're also examples! <a href="https://github.com/infiniteautomation/ma-modules-public" rel="nofollow ugc">https://github.com/infiniteautomation/ma-modules-public</a></p>
<blockquote>
<p dir="auto">To add some context, the end goal of this module I'm building is essentially a more refined version of the HTTP Retriever data source, dedicated to only a specific site with a specific API protocol. I want to be able to add/select certain parameters for an HTTP GET request (likely as a drop down box of some sort), and then automatically parse the resulting JSON file.</p>
</blockquote>
<p dir="auto">I personally would be hesitant to create a whole module for this. You can probably achieve this ambition using the HttpBuilder in a script. You would just have to set values to points to change how the script behaves instead of configure it as a data source.</p>
]]></description><link>https://forum.mango-os.com/post/22734</link><guid isPermaLink="true">https://forum.mango-os.com/post/22734</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Wed, 17 Jul 2019 17:35:33 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Wed, 17 Jul 2019 17:33:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jwang" aria-label="Profile: jwang">@<bdi>jwang</bdi></a> said in <a href="/post/22732">Basic Module Development Questions</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phildunlap" aria-label="Profile: phildunlap">@<bdi>phildunlap</bdi></a> In that case, could you elaborate a bit more on what I do have to add to the vanilla module in order to get a drop down box or a text field and such?</p>
</blockquote>
<p dir="auto">Are you talking about in the new UI? e.g. on a dashboard designer page? You will need to have an AngularJSModuleDefinition and a REST API class (annotated with <code>@RestController</code> and in the <code>com.infiniteautomation.mango.rest.v2</code> package).</p>
<p dir="auto">I might add a new simpler example to the <a href="https://github.com/infiniteautomation/ma-modules-contrib" rel="nofollow ugc">https://github.com/infiniteautomation/ma-modules-contrib</a> repo.</p>
]]></description><link>https://forum.mango-os.com/post/22733</link><guid isPermaLink="true">https://forum.mango-os.com/post/22733</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Wed, 17 Jul 2019 17:33:28 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Wed, 17 Jul 2019 17:24:03 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> In that case, could you elaborate a bit more on what I <strong>do</strong> have to add to the vanilla module in order to get a drop down box or a text field and such?</p>
]]></description><link>https://forum.mango-os.com/post/22732</link><guid isPermaLink="true">https://forum.mango-os.com/post/22732</guid><dc:creator><![CDATA[jwang]]></dc:creator><pubDate>Wed, 17 Jul 2019 17:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Wed, 17 Jul 2019 16:23:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi jwang,</p>
<p dir="auto">Classes which extend ModuleElementDefinition classes are reflected out of modules when loading them in startup. So, no, you do not need to place them in any particular package. REST controllers are not unconditionally reflected out of modules, though, so currently you would need to place rest controllers in <code>com.serotonin.mango.rest.v1</code> or <code>com.serotonin.mango.rest.v2</code></p>
]]></description><link>https://forum.mango-os.com/post/22731</link><guid isPermaLink="true">https://forum.mango-os.com/post/22731</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Wed, 17 Jul 2019 16:23:13 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Wed, 17 Jul 2019 15:45:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terrypacker" aria-label="Profile: terrypacker">@<bdi>terrypacker</bdi></a> Thanks, that fixed it for me!</p>
<p dir="auto">Also, from what I understand so far, modules are defined by the features in this folder: <a href="https://github.com/infiniteautomation/ma-core-public/tree/main/Core/src/com/serotonin/m2m2/module" rel="nofollow ugc">https://github.com/infiniteautomation/ma-core-public/tree/main/Core/src/com/serotonin/m2m2/module</a>. How can I add these features to that vanilla module? Is there a package I have to put them in, or are there dependencies I need to change in the pom file, ect? For example, say I wanted to use the Script Source Definition (I believe this gives the black scripting box like in the scripting data source, but correct me if I'm wrong!). How would I add that particular element to the vanilla module?</p>
<p dir="auto">To add some context, the end goal of this module I'm building is essentially a more refined version of the HTTP Retriever data source, dedicated to only a specific site with a specific API protocol. I want to be able to add/select certain parameters for an HTTP GET request (likely as a drop down box of some sort), and then automatically parse the resulting JSON file.</p>
]]></description><link>https://forum.mango-os.com/post/22728</link><guid isPermaLink="true">https://forum.mango-os.com/post/22728</guid><dc:creator><![CDATA[jwang]]></dc:creator><pubDate>Wed, 17 Jul 2019 15:45:30 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Tue, 16 Jul 2019 19:45:16 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, our maven repository only holds the latest snapshot versions and lets the older ones roll off.  The latest version is <code>3.6.1-SNAPSHOT</code> for the api module.  Since that version will also eventually drop off of the repository I would suggest you use the release version of the api module as that will always be available.  So change the dependency from <code>3.6.0-SNAPSHOT</code> to <code>3.6.0</code> and you should be good to go.</p>
]]></description><link>https://forum.mango-os.com/post/22721</link><guid isPermaLink="true">https://forum.mango-os.com/post/22721</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Tue, 16 Jul 2019 19:45:16 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Tue, 16 Jul 2019 19:33:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terrypacker" aria-label="Profile: terrypacker">@<bdi>terrypacker</bdi></a> It seems like both of these pom.xml files have the same issue where I'm getting an error that says "Could not find artifact com.infiniteautomation.mango:mango-api:jar:3.6.0-SNAPSHOT in ias-snapshots (<a href="https://maven.mangoautomation.net/repository/ias-snapshot/" rel="nofollow ugc">https://maven.mangoautomation.net/repository/ias-snapshot/</a>)."<br />
I've added in the snippet of code into the project and ran it as a Maven build. Is there something else I should be doing to fix this?</p>
]]></description><link>https://forum.mango-os.com/post/22720</link><guid isPermaLink="true">https://forum.mango-os.com/post/22720</guid><dc:creator><![CDATA[jwang]]></dc:creator><pubDate>Tue, 16 Jul 2019 19:33:19 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Fri, 12 Jul 2019 15:52:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jwang" aria-label="Profile: jwang">@<bdi>jwang</bdi></a> I have been working on getting some examples setup to help build a data source that might be of help.</p>
<p dir="auto">Here is a repository that I'll be adding to in the coming weeks but for now it has one example polling data source that works with Mango 3.6.0 its a vanilla module that can be used as a starting point:</p>
<p dir="auto"><a href="https://github.com/infiniteautomation/ma-modules-contrib" rel="nofollow ugc">https://github.com/infiniteautomation/ma-modules-contrib</a></p>
<p dir="auto">Here is another one I recently completed as a user module that is not part of the Mango codebase:</p>
<p dir="auto"><a href="https://github.com/terrypacker/mango-modules/tree/master/acurite-ds" rel="nofollow ugc">https://github.com/terrypacker/mango-modules/tree/master/acurite-ds</a></p>
<p dir="auto">There is one thing that both of these pom.xml files don't have that would allow you to develop and build them without any of the Mango code checked out locally, which would be to reference the IAS Maven repositories.  You can add them into the pom like this:</p>
<pre><code>&lt;repositories&gt;
    &lt;repository&gt;
        &lt;releases&gt;
            &lt;enabled&gt;false&lt;/enabled&gt;
        &lt;/releases&gt;
        &lt;snapshots&gt;
            &lt;enabled&gt;true&lt;/enabled&gt;
            &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
        &lt;/snapshots&gt;
        &lt;id&gt;ias-snapshots&lt;/id&gt;
        &lt;name&gt;Mango Dependencies&lt;/name&gt;
        &lt;url&gt;https://maven.mangoautomation.net/repository/ias-snapshot/&lt;/url&gt;
    &lt;/repository&gt;
    &lt;repository&gt;
        &lt;releases&gt;
            &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/releases&gt;
        &lt;snapshots&gt;
            &lt;enabled&gt;false&lt;/enabled&gt;
        &lt;/snapshots&gt;
        &lt;id&gt;ias-releases&lt;/id&gt;
        &lt;name&gt;Mango Dependencies&lt;/name&gt;
        &lt;url&gt;https://maven.mangoautomation.net/repository/ias-release/&lt;/url&gt;
    &lt;/repository&gt;
 &lt;/repositories&gt;
 &lt;pluginRepositories&gt;
    &lt;pluginRepository&gt;
        &lt;releases&gt;
            &lt;enabled&gt;false&lt;/enabled&gt;
        &lt;/releases&gt;
        &lt;snapshots&gt;
            &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/snapshots&gt;
        &lt;id&gt;ias-snapshots&lt;/id&gt;
        &lt;name&gt;Mango Dependencies&lt;/name&gt;
        &lt;url&gt;https://maven.mangoautomation.net/repository/ias-snapshot/&lt;/url&gt;
    &lt;/pluginRepository&gt;
    &lt;pluginRepository&gt;
        &lt;releases&gt;
            &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/releases&gt;
        &lt;snapshots&gt;
            &lt;enabled&gt;false&lt;/enabled&gt;
        &lt;/snapshots&gt;
        &lt;id&gt;ias-releases&lt;/id&gt;
        &lt;name&gt;Mango Dependencies&lt;/name&gt;
        &lt;url&gt;https://maven.mangoautomation.net/repository/ias-release/&lt;/url&gt;
    &lt;/pluginRepository&gt;
 &lt;/pluginRepositories&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/22681</link><guid isPermaLink="true">https://forum.mango-os.com/post/22681</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Fri, 12 Jul 2019 15:52:09 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Thu, 11 Jul 2019 19:45: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 Jared, thanks for sharing the link. I think I got my settings.xml file in order now! Do you know how would I go about modifying the pom.xml file? So far I've copied the folder for the Virtual Data Source to use as a base, so what parts of the pom file would I have to modify? What are my next steps here?</p>
]]></description><link>https://forum.mango-os.com/post/22675</link><guid isPermaLink="true">https://forum.mango-os.com/post/22675</guid><dc:creator><![CDATA[jwang]]></dc:creator><pubDate>Thu, 11 Jul 2019 19:45:02 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Module Development Questions on Wed, 10 Jul 2019 15:41:27 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://maven.apache.org/settings.html" rel="nofollow ugc">https://maven.apache.org/settings.html</a></p>
]]></description><link>https://forum.mango-os.com/post/22667</link><guid isPermaLink="true">https://forum.mango-os.com/post/22667</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Wed, 10 Jul 2019 15:41:27 GMT</pubDate></item></channel></rss>