• P
    Phillip Weeks

    Yes I calculate and log changes for a group of counters and I log the total changes of all counters to grand total metapoint by running this script at the start of the minute and also on cron on 5 minute intervals as a test also. Grand total = point.runtime.prev(MINUTE,1).sum over all points in the counter set and log this grand total on timestamp change for the total change last minute.
    It works in real time, however I want to run it over back through the history of the metapoints it sums.

    ie.
    var pointsList = DataPointQuery.query("like(name,*W-LITERS-LAST-INCREMENT)&limit(500)&sort(name)");

    var Building_Total_Liters =0;
    for(var k = 0; k < pointsList.length; k+=1) {
    if (pointsList[k].runtime !== null)
    Building_Total_Liters += pointsList[k].runtime.prev(MINUTE, 1).sum;
    }
    if (Building_Total_Liters === Number.NAN) return UNCHANGED;
    else return Building_Total_Liters;

    I
    To achieve a similar result with CONTEXT points I thought I could log the context points total values that are in current CONTEXT timestamp to the grand total log
    and I am not sure If I am thinking about this correctly ... can there be several trigger points with exactly the same timestamps in CONTEXT?

    posted in How-To read more
  • P
    Phillip Weeks

    Given that we are using getTimestamp vs getRuntime.. Is there a way to write the script so it can also perform a historical recalculation of the meta point based on logged point values of the CONTEXT points.

    How can I see the functionality available for this[pnt] ?
    print(this[pnt]); is undefined

    posted in How-To read more
  • P
    Phillip Weeks

    This upgrade issue relates to how the licence was generated a couple months ago. At that time we asked Phil to provide an enterprise licence for a cloud server. Phil said he didn't have the details about the system licence we purchased and I told him it was an enterprise so he created something he called a "free" licence for the GUID I sent over. From the system, I was not able to get the store to find the licence but I went to the store and downloaded the xml for that GUID it worked to licence the system. Since then I have had to upgrade by putting the core.zip in the root and restarting. How would you suggest I go about resolving the issue?

    posted in How-To read more
  • P
    Phillip Weeks

    I noticed this in the data source under available upgrades point ... "Missing monitor with id com.serotonin.m2m2.rt.maint.UpgradeCheck.COUNT"
    Can I export this Mango Internal ds from another enterprise system and delete and import it back in to this one? Or is this indicative of another issue as it complains when I check for upgrades ... "Could not resolve host, check your DNS or internet connection.. store.infiniteautomation.com temporary failure in name resolution"

    posted in How-To read more
  • P
    Phillip Weeks

    Thanks Guys this was very useful

    posted in How-To read more
  • P
    Phillip Weeks

    Sorry Joel that was not the issue. it's set up to start on boot.. Somehow a file of different ownership than mango got inserted into our graphical views and when mango attempted to delete it on startup it was crashing out on a permission error and I thought it was because the filesystem was owned by root (not mango) since root owns the init.d startup file so it was starting for root on reboot but not mango from a terminal window.. Its fixed now. thanks for the quick response.

    posted in How-To read more
  • P
    Phillip Weeks

    Linux latest ubuntu does away with terminal access to root user in lieu of sudo user ...so is the only way to start ES mango through a reboot?

    posted in How-To read more
  • P
    Phillip Weeks

    A meta point has a group of points which update its context. Is there a way to tell which point has triggered the update?

    posted in How-To read more
  • P
    Phillip Weeks

    Is it possible to tie this quick view chart and value to the dateBar.to and dateBar.from? That would help a lot.

    posted in How-To read more