Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

  • Point unit view problem in set point event handler

    1
    1 Votes
    1 Posts
    706 Views
    No one has replied
  • MQTT Data Point Scaling

    2
    0 Votes
    2 Posts
    1k Views
    CraigWebC
    As far as I know, there are not any plans in place right now. But I do agree that this would be useful for all Numeric data points.
  • How to get email recipient list from another database?

    2
    0 Votes
    2 Posts
    1k Views
    MattFoxM
    No, because you need to pre-populate the emails to send the alerts to. What would be better is to run a script on an event going high. This forum post here shows you how to send an email from the mango javascript system: https://forum.infiniteautomation.com/topic/3147/email-last-day-s-events/2 If you combine that with the http handler, you can request your recipients, from your other system then populate with the affected recipients emails. Fox
  • Global Scripts import only imports the first script

    5
    0 Votes
    5 Posts
    2k Views
    AldoRamosA
    That's about what I expected. Glad it was simple and isolated.
  • Script breaking as of 10/16/2019

    5
    1 Votes
    5 Posts
    2k Views
    M
    Hey Terry, This one is also giving a java out of bounds exception, but I don't understand why: /* //Script by Phil Dunlap to automatically generate lost history if( my.time + 60000 < source.time ) { //We're at least a minute after var metaEditDwr = new com.serotonin.m2m2.meta.MetaEditDwr(); metaEditDwr.generateMetaPointHistory( my.getDataPointWrapper().getId(), my.time+1, CONTEXT.getRuntime(), false); //Arguments are, dataPointId, long from, long to, boolean deleteExistingData //my.time+1 because first argument is inclusive, and we have value there } //Your regular script here.*/ //Get daily run starts return runs.past(MINUTE, 1440)['data'].get(true).starts;
  • 0 Votes
    5 Posts
    2k Views
    H
    Thanks guys, appreciate the help. Managed to get it all working, the error handling was definitely a good call.
  • HttpBuilder.request()

    3
    0 Votes
    3 Posts
    2k Views
    D
    @phildunlap Thank you for your prompt reply. It works like a breeze. In my opinion, this is a powerful tool that open up the doors to communicate with internet of things / web content. In addition it provide flexibility to integrate your creativity into application. "Logic will get you from A to B. Imagination will take you everywhere".
  • Trying to display more than one return meta-point value using javascript

    5
    0 Votes
    5 Posts
    2k Views
    phildunlapP
    Thanks for pointing that out Craig! We could fix the if condition for this for the default variable name with, if( this[variableName].value > max && variableName !== "my" ) {
  • Scripting data source points don't get a value

    5
    0 Votes
    5 Posts
    2k Views
    realmoosemanR
    Hey Folks, Thank you so much! It was indeed a newbie thing as suggested by Phil and Fox. Really appreciate your help. Jim.
  • Are values in converted unit available to scripts?

    6
    0 Votes
    6 Posts
    2k Views
    AldoRamosA
    @phildunlap Excellent! That's really useful information.
  • Global Script Validation Requires Save

    2
    0 Votes
    2 Posts
    1k Views
    phildunlapP
    Hi pyeager, Sort of! I think what's happening is that the saved global script is being executed prior to the script that's attempting to be validated (and any other global scripts too for that matter) and so if there is an issue in the previous script saving will be necessary, as it will throw the script error. This was brought to our attention in a previous thread and there is a git issue open in the global scripts' repo about it, but that repo is private.
  • Querying using services.

    2
    0 Votes
    2 Posts
    1k Views
    Jared WiltshireJ
    Looks to me that the JSON store item is not found. Check the XID.
  • When does a change to a global script become effective?

    3
    0 Votes
    3 Posts
    2k Views
    phildunlapP
    Thanks Fox! I have added a note to the Global Scripts page as well.
  • Bogus referenceError?

    19
    0 Votes
    19 Posts
    5k Views
    P
    Thank you!
  • Issue with HTTPBuilder

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    phildunlapP
    I should have added that the HttpBuilder is adding a Content-Type: application/json header if no Content-Type is supplied, which is probably a bad behavior for a GET. I would still suggest pointing these at a Linux system with a listening netcat, though, so that you could see exactly how the HTTP requests were differing. I was able to use that URL with a header of Content-Type: text/plain And oddly no API key required, but that probably means there's some limiter. You may want to remove the image from your initial post, since you included your API key and where it goes. Edit: I have made it such that in the next version no Content-Type header will be added to GET requests if missing.
  • How to backfill Meta Point history

    3
    0 Votes
    3 Posts
    1k Views
    cwangvC
    Hi, Craig My mistake. I used scripting (not meta point) to generate the virtual meter. My bad. I will have another go at the Meta Point later. Have a good day! Thanks.
  • Pagination for a page

    9
    0 Votes
    9 Posts
    3k Views
    richard.mortimerR
    @richard-mortimer said in Pagination for a page: @craigweb said in Pagination for a page: Hi Richard I believe, you do not need your query string function as there is already a component for this. You will need to register you page with the URL of ?page <ma-state-params on-change="PageStart = $stateParams.page; stateParams = $stateParams" update- params="updateParams"></ma-state-params> Here is a help document that explains how to use it with a watchlist: https://help.infiniteautomation.com/linking-to-dynamic-pages Thanks for that, the PageStart variable is read in as what it should be, but seems to be overwritten when I'm reading in the Settings parameters (no matter where I put it on the page), so even when this is at the bottom of the page: <ma-state-params on-change="Settings.PageStart = $stateParams.page; stateParams = $stateParams" update-params="updateParams"></ma-state-params> And this is at the top: <ma-json-store xid="PageConfigXID" value="Settings"></ma-json-store><!-- page configuration data --> The value goes from 2 to 0 with this URL: http://mango2:8080/ui/richard-overview-angular?page=2 Any idea how to make the value stick ... ? Scratch that - I've used two repeats - if the PageStart value doesn't exists - it displays the page as normal, but if it does exist, it does sends it to the second repeat and uses that value for the calculation of where to start the page. Kinda goes against the DRY prinicipal, but works effectively .... So, in the first instance: <div ng-if="!PageStart" class="table" ng-repeat="site in sites.sites | limitTo: Settings.PageSize : Settings.PageStart"> And in the second: <div ng-if="PageStart" class="table" ng-repeat="site in sites.sites | limitTo: Settings.PageSize : (( PageStart - 1 ) * Settings.PageSize)"> Cheers Richard
  • Disable an amChart series upon load

    15
    0 Votes
    15 Posts
    6k Views
    richard.mortimerR
    @richard-mortimer said in Disable an amChart series upon load: I was asked to remove one of the series plot from the graph I was asked to add them back, so glad I asked the question, now it's fixed!! Cheers Richard
  • maJsonStore (JSON store)

    35
    0 Votes
    35 Posts
    28k Views
    richard.mortimerR
    @mattfox said in maJsonStore (JSON store): @richard-mortimer I believe when you did | number:1 and | number:0 was more than sufficient. alternatively just use point.value.toFixed(1) and point.value.toFixed() repectively Thanks - the colon in the | number:1 was interfering with the ternary operator and getting it confused; so, while I could pipe it through, I couldn't modify the final number based on which direction it took - the point.value.toFixed(1) did the correct thing for me ... Cheers Richard
  • Remove date on mouseover from amCharts

    4
    0 Votes
    4 Posts
    2k Views
    MattFoxM
    Anytime