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.

  • HTTP modbus data to Mango

    17
    0 Votes
    17 Posts
    4k Views
    MattFoxM
    Righto, I'll be here!
  • Mango State Chart

    8
    0 Votes
    8 Posts
    2k Views
    MattFoxM
    Ronny if you're still around: valuesAxes should be implemented like so: options="{valueAxes:[{autoGridCount:false,gridCount:10}]}" Value axes hold each graph in an array, one javascript object per chart. Happy to expand further if you hit any other speed bumps Also great thinking with the two ma-serial charts stacked on top of one another. Definitely gives the effect you were going for. Fox
  • How to access active events of data point

    2
    0 Votes
    2 Posts
    1k Views
    MattFoxM
    Nope because how the system is implemented - as seen in the API: maPointEventManager service in module ngMangoServices Provides an EventManager factory pointing to the point-value websocket endpoint at '/rest/v1/websocket/point-value' All methods available to EventManager are available. Used by <ma-get-point-value> directive. So the only way to get around this is to write your own controller or component to provide just the data you want... Fox
  • Adding Alarm Level Types

    5
    1 Votes
    5 Posts
    2k Views
    MattFoxM
    @jared-wiltshire said in Adding Alarm Level Types: It is not possible to add/remove or change the colors of the alarm levels.
  • How to Limit Data Sources options

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    CraigWebC
    Please post you entire ma.log file.
  • How to add column to event table?

    4
    1 Votes
    4 Posts
    1k Views
    terrypackerT
    @Nurr we are planning for April/May timeframe.
  • How to get event detector default message as a variable?

    5
    1 Votes
    5 Posts
    2k Views
    terrypackerT
    @Nurr getting the data source configuration will be slightly more complex but possible. Basically you will need to reach out to the Mango database by using the DataSourceDao class to get the data source configuration. The evt variable does not contain the full data source but it does have the data source's id which you can use to get the full data source. Here is an example //Option 1 get the data source id from the event type var id = evt.eventType.dataSourceId; //Option 2 get the id from the point in the context var id = evt.context.point.dataSourceId; //Using a call to the dao, get the data source by id var dataSource = com.serotonin.m2m2.db.dao.DataSourceDao.instance.getDataSource(id); Without knowing which data source type you are using I cannot tell you what property the ip would be stored in. It may be open source in our ma-modules-public repository, if so you can find the property in the xxxDataSourceVO class: https://github.com/infiniteautomation/ma-modules-public
  • User role based menu

    5
    0 Votes
    5 Posts
    2k Views
    MattFoxM
    Thanks Brian, I completely forgot that 'user' is practically hardcoded as a permission level.
  • MangoES Factory reset

    11
    0 Votes
    11 Posts
    4k Views
    AldoRamosA
    No, I agree it shouldn't be too easy; my concern was making sure it would restore the correct MangoES configuration, etc. That's the same concern I have with cloning the configuration from a fresh "Enterprise" install on a non-ES instance. But I have my "default" config file now, so I can move forward simply. Thanks!
  • Question| how to auto-login in mango using parent application

    6
    0 Votes
    6 Posts
    1k Views
    MattFoxM
    Thanks Craig, so as can be seen @shubham, a cookie is in fact generated and part of the header payload.
  • Negative Value. Not Hex Value

    2
    1 Votes
    2 Posts
    1k Views
    J
    Any idea?
  • What is the best practice for 3rd party system big data integration ?

    Unsolved
    2
    0 Votes
    2 Posts
    894 Views
    MattFoxM
    I've mulled over what you have stated: There is sql data source for pulling data in using sql queries but I don't know how complex your system is A second option is using the http retriever and using the responses given to populate different points based upon the data given. Not sure there's a 'best practice ' as I'm unaware if you're just bringing data across or you still need events to fire and meta points/scripts to trigger for given point data. Can you expand on what you want to achieve then perhaps a better route can be taken. Fox
  • Comppound Events

    4
    0 Votes
    4 Posts
    2k Views
    J
    @terrypacker ok, let me see if I have resolved this correctly or if you have a better method. In meta points, I can create binary points to be set upon Event Detectors. I can then create more meta points to combine those binary meta points into logical statements that can then be assigned Event Detectors. This would effectively be the same as a Compound Event Detector. This will work, albeit kind of an ugly solution. Is this the best way to handle it or is there a better way? At first I was hoping there was a way to add Event Detectors as context to a meta point, but not that I could see. Thanks as always for your help.
  • Custom Charts

    6
    0 Votes
    6 Posts
    2k Views
    R
    what i could imagine to have a over layer chart, stacked column chart 90 deg turned, and hide the Y and X axis. What do you think? could that work? and where do i get this option from?
  • Http sender 3th party

    12
    0 Votes
    12 Posts
    4k Views
    MattFoxM
    The url is inside the get call. Not the host part of the header. You want to 'get' calll the page, you're calling the 192.168... at the root level of the server, not the relay page. Secondly, your context point var is not used to correlate to being on or off. Since the point is an alphanumeric and not a numeric/binary, your parameters should be: var parameters = { "turn": info } You're calling a script but I think you are unaware of how everything works. I take it it has been a long time since you've done this.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Can one tell which point has triggered the context update?

    15
    0 Votes
    15 Posts
    3k Views
    A
    I have performed further testing and found the above script needs an Execution delay of at least about 5 seconds to work. This is because if the 2 source data points update within a few seconds, the script is only triggered when the first one is updated, not the second one (ie the script won't trigger again within a few seconds of it running). Unfortunately, further testing has indicated that the script no longer works reliably where there is a comms outage causing a delay in some of the data.
  • Script to convert from Hex to Dec

    4
    0 Votes
    4 Posts
    2k Views
    ThomasEinastoT
    @jorge-gonzalez said in Script to convert from Hex to Dec: 13:32 @Jorge-Gonzalez, documentation to solve your problems. Firstly see what parseInt does - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt There you can see that the hexdecimal value has to be in correct format be it with 0x or without. Your string splits 2 bytes in the hexdecimal format by using a colon. You need to remove it. Simply do it by utilizing .replace method on a string before putting it into parseInt. Or if you have a string which contains multiple values utilize .split method on a string and then put the bytes together before putting the value into parseInt. Replace method explanation https://www.w3schools.com/jsref/jsref_replace.asp Split method explanation https://www.w3schools.com/jsref/jsref_split.asp Following function is following the detailed explanation you provided in the post. function stringsplitter (string) { var result = {}; // This contains the bytes of data result.arrayofbytes = string.split(':'); // Get byte count of data inside the string result.bytecount = result.arrayofbytes.length; // Start at the beginning var variablecounter = 0; result.hexdata = []; result.decimaldata = []; // Loop over the array, but taking into account that we have 2 byte data, use try/catch so that function will return if something should fail try{ for (var x = 0;x < result.bytecount / 2;x++){ result.hexdata[x] = result.arrayofbytes[variablecounter] + result.arrayofbytes[variablecounter+1]; result.decimaldata[x] = parseInt(result.hexdata[x],16); variablecounter += 2; } }catch(err){ return err } // return object with all our data which includes hexdecimal data, decimaldata and byte count inside the string return result; } // Example usage var devicestring = '13:30:27:14:01:33:02:6c:02:76'; var data = stringsplitter(devicestring); //get array in hexdecimal and decimal format var hexdata = data.hexdata; var decimaldata = data.decimaldata; // first value in hexdecimal and decimal format var firstvaluehex = hexdata[0]; var firstvaluedecimal = decimaldata[0]; // Second value in hexdecimal and decimal format var secondvaluehex = hexdata[1]; var secondvaluedecimal = decimaldata[1]; // Following that your post had used an example with the last value var lastvalue = decimaldata[4]; // Should be 23 var lastvaluecorrected = lastvalue * 0.1 - 40; Thomas
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied