• terrypacker

    @MattFox just letting you know I've tried in the past to fix this but didn't have much luck. But I tried again today and managed to make an improvement. There are likely other models that will suffer from this problem so when Mango 3.7.0 is released if you see any more of these types of problems please let us know.

    Here is the git issue if you are interested in following:

    https://github.com/infiniteautomation/ma-modules-public/issues/72

    posted in User help read more
  • terrypacker

    I wrote this help article not too long ago which may provide some insight into configuring the Apache proxy.

    https://help.infiniteautomation.com/proxy

    posted in User help read more
  • terrypacker

    @elran pretty vague but if you make a copy of a data source and save it without changing the id field it will update the data source with that id. To signal to Mango that you want to create a new data source you will need to set the id field to -1

    In the Java code we have the constant:
    com.serotonin.m2m2.Common.NEW_ID = -1

    posted in Mango Automation read more
  • terrypacker

    @mmmoczj take a look at the various tests in /src/test/java/com/serotonin/bacnet4j.util:

    RemoteDeviceDiscovererTest.java
    RemoteDeviceFinderTest.java

    posted in BACnet4J general discussion read more
  • terrypacker

    @pyeager

    You have a syntax error in the 1st script you posted. It has the correct number of parenthesis but the ordering is such that some of the code is outside of a function block.

    Since every global script is executed anytime you execute or validate any Mango JavaScript this results in the code being executing and various variables not being defined in the block of code that it outside the function blocks of your global script.

    You have an errant } on line 17:

            if( point.name == "Auto Throttle" ) {
                var at = point.runtime.value;
                print( "Auto Throttle " + at );
                }
            }
    

    posted in Scripting general Discussion read more
  • terrypacker

    Ah yes I forgot about that setting. Using the menu: Safari --> Preferences --> General then uncheck:

    Open "safe" files after downloading

    posted in Mango Automation Installation read more
  • terrypacker

    @Pedro I was just reviewing this and had a few questions:

    1. Are you seeing any Data Lost events? If so these should enlighten us as to why this is happening, they get raised whenever a batch fails to write. I would make sure that event level is set to something other than Do No Log too.

    2. Do you have any Alphanumeric points that would be saving very large strings of text? The NoSQL database has a limit to the size of each entry, which is large but its possible this could cause these symptoms.

    posted in User help read more
  • terrypacker

    @CraigWeb @cwangv I also use OSX and have found that if you use the Finder to unzip a Mango core it will not preserve the executable bit for the *.sh files inside the zip and it also adds a quarantine attribute to every file.

    You can manually remove these and then set the executable via chmod but I find that just unzipping the file from the command line will retain the executable bit. So I usually execute unzip <core-file>.zip. This still leaves all the files quarantined though. See the @ on the end of the attributes:

    -rwxr-xr-x@ 1 mango staff 1089 Jul 8 22:15 ma.sh

    xattr -l ma.sh
    com.apple.quarantine: 0083;5d26502d;Safari;2F8BDDE1-3098-4B0D-A0B5-316BD592EFBF
    

    You can remove the quarantine attribute for all the files recursively if you execute this in your MA_HOME folder.
    sudo xattr -dr com.apple.quarantine . (Note the dot to mean from this directory)

    The quarantine attributes don't seem to matter much as they are used by the launcher when you double click a file to execute it, which won't happen since you need to execute ma.sh start at the command line to run Mango.

    posted in Mango Automation Installation read more
  • terrypacker

    Sorry, our maven repository only holds the latest snapshot versions and lets the older ones roll off. The latest version is 3.6.1-SNAPSHOT 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 3.6.0-SNAPSHOT to 3.6.0 and you should be good to go.

    posted in Development general discussion read more
  • terrypacker

    @jwang I have been working on getting some examples setup to help build a data source that might be of help.

    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:

    https://github.com/infiniteautomation/ma-modules-contrib

    Here is another one I recently completed as a user module that is not part of the Mango codebase:

    https://github.com/terrypacker/mango-modules/tree/master/acurite-ds

    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:

    <repositories>
        <repository>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <id>ias-snapshots</id>
            <name>Mango Dependencies</name>
            <url>https://maven.mangoautomation.net/repository/ias-snapshot/</url>
        </repository>
        <repository>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>ias-releases</id>
            <name>Mango Dependencies</name>
            <url>https://maven.mangoautomation.net/repository/ias-release/</url>
        </repository>
     </repositories>
     <pluginRepositories>
        <pluginRepository>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>ias-snapshots</id>
            <name>Mango Dependencies</name>
            <url>https://maven.mangoautomation.net/repository/ias-snapshot/</url>
        </pluginRepository>
        <pluginRepository>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>ias-releases</id>
            <name>Mango Dependencies</name>
            <url>https://maven.mangoautomation.net/repository/ias-release/</url>
        </pluginRepository>
     </pluginRepositories>
    

    posted in Development general discussion read more