• S
    stevededrick

    Thanks for your post - Glad you are sharing your knowledge with the community.

    BTW, you might experiment with mango automation on the Pi, as it has some speed improvements. How has the speed been for you?

    Cheers,

    Steve D

    posted in Stories read more
  • S
    stevededrick

    Hi David,

    Mango can definitely be hosted in the cloud and display information revenant to individual users. I recommend you install a free version of Mango on a cloud server for testing. Feel free to contact us for further info.

    Cheers,

    posted in User help read more
  • S
    stevededrick

    Email joel at infiniteautomation dot com with technical questions.

    Mango automation has an SNMP data source option, yes. The free version can work with up to 20 points.

    Email me to discuss pricing for embedded projects.

    Take care,

    posted in Mango Automation Installation read more
  • S
    stevededrick

    Hi,

    We have successfully gotten Mango Automation running on the Pi. M2M should run, but I'm in sales so don't know exactly how to help on that.

    Mango Automation has several speed improvements for embedded processors and it's recommended to use Oracle's version of Java.

    Is your application purely hobby? Our free version of Mango Automation may serve your needs. We are discussing having a special, less expensive version of Mango Automation for embedded systems. If this interests you contact me.

    Take care,

    posted in Mango Automation Installation read more
  • S
    stevededrick

    Hi,

    Check out the scripting or meta data sources. You can run scripts and do quite a lot.

    Cheers,

    posted in Mango Automation general Discussion read more
  • S
    stevededrick

    I DGLux you can bind dynamic properties to a color so that it changes when a range is reached. Have you seen our DGLux videos in the tutorials section? Also see our vimeo account

    Could you post your question about running the external command in a separate post. I know there is a way to do it but it would best be answered by Joel or Matthew.

    Cheers,

    posted in How-To read more
  • S
    stevededrick

    Also check out our DGLux tutorial videos in the getting started section of this forum

    Cheers,

    posted in Stories read more
  • S
    stevededrick

    Our scripting data source or Meta data source should do it. You will have to install the module. Here is the help file related to scripting data source:

    Scripting data source
    Overview

    The Scripting allows users to use ECMA scripts to determine point values. It is similar to the Meta data source, but allows the setting of multiple point values within a single script rather than setting the point using the output of a per point.

    JavaScript / ECMAScript

    This data source requires some knowledge of JavaScript, also known as ECMAScript. (The full specification for ECMAScript is available here.) JavaScript is arguably the most popular scripting language in use today, it being the only language available for use in every popular web browser. The result is that, by far the common usage of JavaScript is in web pages. The context within the Meta data source is of course different, there being no "window" or "document" objects, among other more subtle differences. Contextual differences aside, a full and complete implementation of ECMAScript is available within this data source. Specifically, the Rhino implementation is used.

    More information on scripting in Mango can be found in Meta point properties below.

    Configuration

    Every data source requires a Name, which can be any description, and an XID, which must be unique among all data sources. The Cron pattern determines when the script will be executed. A number of example patterns are provided for convenience. To use one, select it and click the icon.

    The Execution delay is the number of seconds to delay the script execution after the firing of the cron pattern. This delay can allow for external context points to be updated in case of network or processing latency. It is important to note that the script with be executed with the timestamp of the moment the cron pattern fired. It will not include the execution delay seconds.

    The External context is a set of points external to the data source that are to be included in the script context. The point will be available with the Variable name that is provided. Variable names must be unique.

    The Script is an arbitrary ECMAScript. The context will include the external context points, and all the points in this data source (at the variable names that were provided for each). In addition, there are several constants that are defined, including all of those defined for Meta data sources, as well as the following:

    POINTS: A list of all point names that were included in the context, including data source and external points. This allows for dynamic lookup of points at runtime.
    LOG: A reference to a logging object. This allows the script to write to the Mango log at runtime, which can provide valuable troubleshooting data. Functions available are trace, debug, info, warn, error, and fatal, which correspond to the log levels provided by Log4J.
    Global scripts are automatically included in the script execution, such that functions and variables defined there are available. Note that if global scripts are changed, the scripting data source must be restarted to reload them.

    Scripts can be executed for testing purposes by clicking the icon. The script will be executed, but no points will be set. (The values to which they would have been set appear in the resulting messages below the script).

    The Log level property allows the user to set the level of log messages which will be written to the log. If 'None', no messages will be written (although a log file may still be created).

    Users can also use the 'print' and 'println' functions as a form of logging. This is effective during testing only. During data source runtime, such messages are discarded.

    Setting point values

    The most important difference between this data source and the Meta data source is that point values can be set from within the script using the point's 'set(value, timestamp)' function. The value to which the point is to be set can be any value; Mango will attempt to coerce it to the correct data type where possible, otherwise a data type error event will be raised. The optional 'timestamp' parameter is an epoch value. If omitted it will be set to the execution time of the script. Local points that are set will be updated, while external points will be set and annotated. (External points can only be set if they are settable.)

    Another important difference between this data source and the Meta data source is that inactive points, either in this data source or external to it, will not cause 'missing point' events to be raised. It could, however, cause script exceptions if the script executes while the point is disabled, and if the script does not handle the condition.

    Finally, scripts in the scripting data source maintain their context states for the lifecycle of the data source runtime. So, variables that are defined will still exist at the next execution time unless the data source was restarted.

    Example

    The following is a script that implements the Lorenz equations. Three numeric points must be defined, with variable names of x, y, and z. A cron pattern of '0/2 * * * * ?' causes the script to be run every 2 seconds, which allows the data source to produce a fair amount of readings in a relatively short time.

    if (x.value == 0 && y.value == 0 && z.value == 0) {
    // Initial point values
    y.set(1);
    }

    if (typeof(rho) == "undefined") {
    rho = 28;
    sigma = 10;
    beta = 8/3;
    dt = 0.01;
    }

    dx = sigma * (y.value - x.value);
    dy = x.value * (rho - z.value) - y.value;
    dz = x.value * y.value - beta * z.value;

    x.set(x.value + dx * dt);
    y.set(y.value + dy * dt);
    z.set(z.value + dz * dt);
    Note how the typeof function is used to determine if constants need to be defined. This is an effective way of initializing the script context upon startup of the data source.

    Related items
    Scripting point properties

    posted in Mango Automation general Discussion read more
  • S
    stevededrick

    The data source can be set to trigger an alert if there is an exception. Does this answer your question?

    Attachment: download link

    posted in How-To read more
  • S
    stevededrick

    Please contact me directly to discuss. We can set up a cloud account for you.

    posted in User help read more
  • S
    stevededrick

    Thanks for posting your findings. Very interesting. Have you gotten a chance to experiment with Mango Automation yet? (newer version that has DGLux and modular architecture) You can have a map overlaid with your zigbee nodes and do some really cool stuff - hover over to bring up a drill down window, etc.

    I'm interested in talking with you more about this project. I will message you.

    Cheers,

    posted in Hardware read more
  • S
    stevededrick

    Mango is setup with: admin admin as the default user name and password.

    Hope this helps

    Steve

    posted in User help read more
  • S
    stevededrick

    Hi,

    We are working to put up a WIKI in the near future. For now, browsing the forum and the getting started videos can go a long way. If you have a specific use / integration question related to Mango Automation please contact me.

    In regards to the GPS question, if you search the forum for GPS you will see a few posting talking about it. Basically we don't support it yet, but plan to. If there is a commercial need we can write a serial datasource for that as a module.

    Take care,

    posted in How-To read more
  • S
    stevededrick

    Tom,

    I'll ping Joel and this and get you a reply soon

    Steve

    posted in Hardware read more
  • S
    stevededrick

    Thanks for your suggestion. We will review this.

    If this is something you need addressed soon and is critical to your applications please email me.

    Thanks

    posted in Wishlist read more
  • S
    stevededrick

    Hi Tom,

    I just talked with Joel about this. Could you please start another thread to post your questions about the help file? We are working to fill out the forum with the various FAQ's people have during installation. He will post a new ma-start.sh file with will solve the issue your having.

    Take care

    posted in Mango Automation Installation read more
  • S
    stevededrick

    Hi Tom,

    We have a tutorial video dealing with point setup here:

    Also look through our vimeo page to see other videos:

    To get your points to format correctly just go to point details and adjust the "Text rendering properties." The "?" help file with give you all the info you need, but basically for an XX.XX rendering you would put "#0.00" (no quotes). The suffix will give you the units you desire.

    I've seen your posts on the midnitesolar.com forum too. Glad your making Mango Pi - and I hope it tastes good...

    Cheers :lol:

    posted in Mango Automation Installation read more