• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. terrypacker
    3. Posts

    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.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    • Profile
    • Following 0
    • Followers 6
    • Topics 5
    • Posts 482
    • Best 27
    • Controversial 1
    • Groups 1

    Posts made by terrypacker

    • RE: Editing mango.properties for Process Event

      The settings introduced in mango 5.2.0

      ## Settings for event handlers
      # Enable the process event handler
      event-handlers.process.enabled=false
      # Enable interpolation for the process event handler command
      event-handlers.process.interpolation-enabled=false
      
      posted in Mango Automation general Discussion
      terrypackerT
      terrypacker
    • RE: Mango V4

      Also @paulolando91 I see the REST URL you are using is wrong, there is no v4 API. The REST api is versioned differently to the Mango version. So its best to use the alias latest so that your URL would be something like:

      <img src="/rest/latest/file-stores/default-filestores/Generator01.png">
      posted in User help
      terrypackerT
      terrypacker
    • RE: Delay SMS notification from Event Handler

      @ryanlo In addition to what @MattFox is saying you should also see an Event / Alarm in the UI to correspond to the event being detected. The handler should be linked to that event and as Matt said, if you setup logging correctly you will also see it in the logs.

      posted in User help
      terrypackerT
      terrypacker
    • RE: Delay SMS notification from Event Handler

      @ryanlo the other thing you could do, if you think its the SMS relay then add another reliable email address to the handler so it send the message to multiple addresses. If the SMS address is delayed but the other one (gmail or something) gets it almost immediately you will know its the relay and not Mango.

      posted in User help
      terrypackerT
      terrypacker
    • RE: Move Data Points to new Data Source

      @tomatopi there is going to be 2 major parts to your solution:

      A. Setting up the HTTP Retriever data source and points into a single request that gets the data into the desired points.

      B. Retaining the history on the existing points so that new history is appended to it.

      I'll focus on B here:

      1. You could try modifying the points via the JSON import/export to move them onto a single data source.
      • The general idea here is that if it is possible to reconfigure the points you would need to ensure that the seriesId in the database doesn't change. So use the XIDs to move the points and not create new ones.
      1. You could create an entirely new set of points and migrate existing data into them.
      • There are NoSQL tools in Mango for migrating data which you would need to explore.
      1. You could create an entirely new set of points and then before you start them for the first time changing the series ID for them to point to the existing data.
      • This would be done after you setup the new points by a Filestore Javascript.

      All of this information hinges on the fact that you are on at least Mango 4. It can probably be done in Mango 3 but we didn't have the seriesId concept so the solution would be different. In Mango 3 the time series data is directly linked to the data point's id column in the database. In Mango 4 we added a column called seriesId to the dataPoints table to allows us to move the time series data between points if we needed to.

      The caveat here is that you can only move data between points that have the same data type. For example Numeric time series can only be assigned to other Numeric points, not a Binary point.

      posted in User help
      terrypackerT
      terrypacker
    • RE: Disabling Event Handlers - User

      @hayden_AUS we added permissions like this in Mango 4+, but there are only 2 levels for Event Handlers. View and Edit. If you wanted a user to be able to disable the event handler they would need to have the edit permission for that handler. Which would allow them to change any setting on it.

      In Mango 3 Event Handlers are a superadmin thing only.

      What @MattFox is suggesting is a common pattern that we use also, put your alarming logic inside Meta points and then set a basic event detector (State Detector) on the Meta point which can raise the event and handle it.

      posted in User help
      terrypackerT
      terrypacker
    • RE: Docker and Mango v5.0.2

      @tungthanh500 there are ways around this. In Mango 5 the default is to have HTTPS enabled on first start. This also enables HSTS which redirects from the HTTP port to HTTPS. You can change these settings by injecting mango properties into the container or modifying the mango.properties file you are loading.

      Take a look at these properties:

      # Note: Enabling SSL/TLS also turns on HSTS by default, see the ssl.hsts.enabled setting below
      ssl.on=true
      ssl.port=8443
      
      ...
      
      # Configure HSTS (HTTP Strict Transport Security)
      # Enabled by default when ssl.on=true
      # Sets the Strict-Transport-Security header, web browsers will always connect using HTTPS when they
      # see this header and they will cache the result for max-age seconds
      ssl.hsts.enabled=true
      ssl.hsts.maxAge=31536000
      ssl.hsts.includeSubDomains=false
      

      And how to inject them into the container as env variables: https://docs-v5.radixiot.com/configure-mango-properties

      Just note that if you change the HSTS settings you will need to clear your browser cache since it will have cached the entry to always use HTTPS already.

      posted in Mango Automation Installation
      terrypackerT
      terrypacker
    • Rate of Change Detector - Looking for real world use cases.

      We are looking for examples of how our Rate of Change event detector is being used. We have a list of features and changes for upcoming releases of Mango so I am investigating the use of this detector because it is on our list.

      Please let us know the configuration you are using and why please.

      Thanks!

      posted in Mango feedback
      terrypackerT
      terrypacker
    • RE: BACnet publisher issues on RD121C unit

      @Ruan-0 I think you might be confused. A Mango BACnet publisher makes Mango into a BACnet device that can be read. If you want to write to a BACnet device you probably want to be using a BACnet data source and then setting the data point value in Mango which will then write the value to the remote device.

      posted in How-To
      terrypackerT
      terrypacker
    • RE: apiv3

      @Jdiaz-co that endpoint only accepts a single point value (as you have discovered). Referring back to my first post I think you are looking for this new v3 endpoint:

      POST rest/v3/point-value-modification/import using a JSON model as the body. (See swagger UI for this)

      I don't think this is exposed in the UI so you will need to use Swagger. However the POST body will need to look like this:

      [
        {
          "xid": "MY_POINT_1_XID",
          "value":  1.0,
          "timestamp": "ISO Formatted Date String",
          "annotation": "can be null or any string"
      }, {
         ....
      ]
      

      The idea being that you supply the xid for the point you want to set the value for.

      posted in Mango Automation general Discussion
      terrypackerT
      terrypacker
    • RE: apiv3

      @Jdiaz-co I just checked and there is still and endpoint available via PUT. If you configure a data point to be 'settable' in the Mango UI and then open Chrome Dev tools while on the Data Point Details page you can set the value and see the PUT request. I can't upload images to the forum due to some problem. But here is the general output from the developer tools view:

      Request URL:  https://localhost:8443/rest/latest/point-values/DP_0f3b0e5d-b9ca-4f2f-916b-f2ddcadbba8a?unitConversion=true
      Request Method: PUT
      Status Code: 201
      
      Payload:
      {
        "value":50,
        "dataType":"NUMERIC",
        "annotation":"Set from web by user: admin"
      }
      
      posted in Mango Automation general Discussion
      terrypackerT
      terrypacker
    • RE: apiv3

      @Jdiaz-co I'm a little confused by your phrasing. Maybe use some URLs as examples. But are you asking if there exists a REST v3 endpoint to PUT multiple point's values or if one exists for v1?

      There are POST methods for v3. I can't say for v1 as I don't have the code checked out.

      POST rest/v3/point-values using a JSON model as the body (this is not recommended and deprecated)

      POST rest/v3/point-value-modification/import using a JSON model as the body. (See swagger UI for this)

      posted in Mango Automation general Discussion
      terrypackerT
      terrypacker
    • RE: Making a module for alternative url path other than UI

      So if you are writing your own module you could then reconfigure all the default URLs too so on login you get pointed to your pages, that is done with a DefaultPagesDefinition

      https://github.com/MangoAutomation/ma-dashboards/blob/main/UI/src/com/infiniteautomation/ui/UIDefaultPagesDefinition.java

      posted in User help
      terrypackerT
      terrypacker
    • RE: Making a module for alternative url path other than UI

      Sorry, I posted something else here so I should probably try to answer your question out of curtesy. I tried to ask some developers about this but didn't get any answers. My guess is that yes it can be done but you would need to add some backend code to hook into the Spring Web context and serve up your resources. You basically would need to map your URL to a controller that serves the resources.

      This is how the UI module does it:

      https://github.com/MangoAutomation/ma-dashboards/blob/main/UI/src/com/infiniteautomation/mango/webapp/UIForwardingFilter.java

      posted in User help
      terrypackerT
      terrypacker
    • RE: Feature Request: run the main loop of start() method of TcpSlave/UdpSlave in another thread

      @gbccccc first you need to define what "new slave is started successfully means".

      If just binding to the port and waiting for connections is enough then you can assume that if you call the method and a ModbusInitException is thrown then it is not running. Otherwise it is bound to the port and waiting for connections.

      If you want to know that something is connected you could extend the TcpSlave class like this:

      public class MonitoredTcpSlave extends TcpSlave {
      
          public MonitoredTcpSlave(int port, boolean encapsulated) {
              super(port, encapsulated);
          }
      
          public boolean hasConnection() {
              return !listConnections.isEmpty();
          }
      }
      

      As a last resort you could create your own TcpSlave by extending com.serotonin.modbus4j.ModbusSlaveSet.ModbusSlaveSet

      posted in Wishlist
      terrypackerT
      terrypacker
    • RE: Cannot build with maven for custom module

      @MattFox the problem isn't specifically with our repo. The way maven works is that it checks all the repositories you have listed in the module's POM or its parent POMs in some order.

      That plugin isn't owned by us and thus isn't hosted in our maven repository. What your goal should be is to figure out why your build isn't finding it on the public maven repositories such as this one:

      https://mvnrepository.com/artifact/org.codehaus.mojo/build-helper-maven-plugin/1.9.1

      or this one:

      https://central.sonatype.com/artifact/org.codehaus.mojo/build-helper-maven-plugin/1.9.1

      I'm pretty sure the problem is that your computer can't reach Maven central because of a proxy or some other problem. I would start by looking there, perhaps delete your

      ~/.m2
      

      directory and rebuild. Let me know if that solves it or you have a different problem.

      posted in Mango feedback
      terrypackerT
      terrypacker
    • RE: Bacnet Alarms

      @Krish1998 it would help if you would be very specific as to what you are try to do and supply some code examples. However you might be able to use a

      DeviceEventListener
      

      See: https://github.com/MangoAutomation/BACnet4J/blob/master/src/main/java/com/serotonin/bacnet4j/event/DeviceEventListener.java

      And an example use here:
      https://github.com/MangoAutomation/BACnet4J-samples/blob/master/src/test/java/com/infiniteautomation/bacnet4j/npdu/ip/BacnetIpListenerDiscoveryExample.java

      posted in BACnet4J general discussion
      terrypackerT
      terrypacker
    • RE: point set timestamp

      @Sean It looks to me like the point you are setting has a 5 minute logging period. So I would check the logging settings for your point. If it is set to Interval logging it won't log every value you send in to it. Since you are querying the values from the database it will only return values that are logged:

      1684906212836 -> Wednesday, May 24, 2023 5:30:12.836 AM GMT
      1684906512836 -> Wednesday, May 24, 2023 5:35:12.836 AM GMT
      1684906812836 -> Wednesday, May 24, 2023 5:40:12.836 AM GMT
      1684907112836 -> Wednesday, May 24, 2023 5:45:12.836 AM GMT
      

      If you want access to cached values (i.e. values not yet in the database but being used for interval logging) you would want to do this:

      var from = 1684906200000;
      var to = 1684907500000;
      var useCache = true;
      point.pointValuesBetween(from, to, useCache);
      
      posted in User help
      terrypackerT
      terrypacker
    • RE: point set timestamp

      @Sean it looks like you are testing this by 'validating' the script. During validation the value is not actually set into the database but instead just printed to the result to show that if the script was really run it would have been set. So that is why when you try to get the values in the next part of the script it returns the real values from the database and your values that were set are not present. This can be kind of confusing but is done so that you can test the script and not have to worry about modifying the values in the system.

      Hope that helps.

      posted in User help
      terrypackerT
      terrypacker