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

    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

    Best posts made by terrypacker

    • RE: Datafile Source - Datetime is in UTC

      To use a specific Timezone:

      DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm").withZone(DateTimeZone.UTC);
      
      posted in User help
      terrypackerT
      terrypacker
    • New Developer Documentation

      Hi All,

      Just wanted to let you know we have updated our developers documentation. We have separated it into 2 parts, Angular for the UI and Java for the backend. As of Mango 3.7 there is a new 'development' mode that can save time developing. Check them out here:

      UI Development Process

      Eclipse for Java

      posted in Development general discussion
      terrypackerT
      terrypacker
    • RE: MODBUS RTU 1ms inter-byte delay ISSUE

      xbastek,

      You say:

      But i don't know how to update this files in my mango installation...

      It will be far easier for you to upgrade to Mango 2.6.0 that has all the work done for you. It will be pre-released very soon.

      Thanks,
      Terry

      posted in Modbus4J general discussion
      terrypackerT
      terrypacker
    • RE: Schedules don't trigger handlers after power loss

      @nachum37 thanks for making us aware of this, I will take the information you provided here and have our team replicate what is happening so we can fix any problems we find.

      posted in Mango feedback
      terrypackerT
      terrypacker
    • RE: HSTS causing HTTPS redirect loop

      I wrote this help article not too long ago which may provide some insight into configuring the Apache proxy.

      https://help.infiniteautomation.com/proxy

      posted in User help
      terrypackerT
      terrypacker
    • RE: Basic Module Development Questions

      Sorry, our maven repository only holds the latest snapshot versions and lets the older ones roll off. The latest version is 3.6.1-SNAPSHOT for the api module. Since that version will also eventually drop off of the repository I would suggest you use the release version of the api module as that will always be available. So change the dependency from 3.6.0-SNAPSHOT to 3.6.0 and you should be good to go.

      posted in Development general discussion
      terrypackerT
      terrypacker
    • RE: Help understanding addresses (offsets)

      @vanjr something isn't quite right with the image you posted. First try to understand what function code 02 is doing, Read an Input Status at an offset starting from 10001.

      https://www.simplymodbus.ca/FC02.htm

      Maybe I'm missing something but it doesn't seem possible that there is an input register at location 100001 as that offset from 10001 is larger than the 2 bytes that are allowed for the offset in the protocol message of function code 02. My guess is that there is a display error in the software you are using and the address is really 10001 in which case the offset is 0.

      posted in Modbus4J general discussion
      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: Mango API POST /rest/v2/point-values - Import Point Values

      @MattFox just letting you know I've tried in the past to fix this but didn't have much luck. But I tried again today and managed to make an improvement. There are likely other models that will suffer from this problem so when Mango 3.7.0 is released if you see any more of these types of problems please let us know.

      Here is the git issue if you are interested in following:

      https://github.com/infiniteautomation/ma-modules-public/issues/72

      posted in User help
      terrypackerT
      terrypacker
    • RE: Dynamic select statement from SQL table using SQL data source

      @Nurr

      There is the possibility to use the Email Event handler to do this. If you return "CANCEL" from the script on an email event handler it won't actually send an email. Leveraging this one could write a script to make an SQL query for the numbers and then call your global script. You can call Java code directly from the script but it will require some knowledge of Java and how to use it within the Nashorn Javascript Engine. There should be some examples of this on our forum. Basically the script needs superadmin permission and you must use the full package and class name when you reference a Java class.

      If you are game to give it a try, here is some documentation on the SQL api for Java:
      https://docs.oracle.com/javase/tutorial/jdbc/basics/processingsqlstatements.html

      As a side note Mango 4.0 will have a Message event handler that will allow using Twilio and in the future other platforms to send messages.

      posted in Mango Automation general Discussion
      terrypackerT
      terrypacker
    • RE: Upgrade 3.7.1 Questions

      @BG I am pretty sure there will be no problems with the versions of MariaDB that support JSON columns. To make a long story short we have not tested it with MariaDB but the only place we use the JSON type column so far is in the create table script for the users table so the alias they have will be fine on that statement.

      In the future we may actually create queries that introspect the data in that column but this will likely be for custom modules and not part of the standard Mango application. Also H2 does not support JSON column types so all of our queries basically use that column as a LONGTEXT type currently.

      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: Using PUT for data entry causes fatal error

      @MattFox you are correct we were busy with the release of Mango 3.7.x. I'm making some assumptions here but the "too many open files" problem can be caused by the ulimits being too low on a linux system. Each process is assigned a limit to the number of open files it can have and this will need to be increased on a Mango instance with a large number of data points. Since the database is sharded there will be multiple files open for each data point when reading and writing to the database.

      Take a look at this post on how to increase these limits:

      https://forum.infiniteautomation.com/topic/2624/mango-locking-up-after-2-8-4-update/2

      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
    • Mango 4.2.0 Release

      Version 4.2.0

      • Mango is now built for Java 11, it is now a hard requirement to use Java 11 or higher to run Mango
      • Fix bugs in ipv6 network tools to accurately whitelist ipv6 addresses, would previously blacklist all ipv6
      • Fix bugs when importing data points that include event detectors after exceeding the amount of data points allowed by the license
      • Availability to monitor the common pool size inside ForkJoinPool, as an internal point for metrics.
      • Fix bug in data point notify events to more accurately fire the correct event types that control meta points and event detectors
      • Add properties to enable/disable disk usage monitoring for SQL and TSDB directories (internal.monitor.diskUsage.monitorSql and internal.monitor.diskUsage.monitorTsdb)
      • Disable disk usage monitoring for SQL and TSDB directories by default
      • Add property to enable/disable use of OSHI native library for metrics (internal.monitor.enableOperatingSystemInfo)
      • Only get and update the process once when polling OSHI native library
      • Remove system metrics that called getAllStackTraces(): com.serotonin.m2m2.rt.maint.WorkItemMonitor.maxStackHeight and com.serotonin.m2m2.rt.maint.WorkItemMonitor.threadCount
      • Dont allow concurrent polling for metrics in ServerMonitoringService and DiskMonitoringService
      • Fix bug where "sessionCookie.persistPeriodSeconds" setting was ignored
      • Add setup page to configure admin password and locale on first login
      • Move timezone env property use to be before Logging initializes so logging uses this timezone
      • Add comma separated env property for MySQL backups to allow passing options to mysqldump, for large systems use db.mysql.extraDumpArgs=--single-transaction,--skip-lock-tables
      posted in Announcements
      terrypackerT
      terrypacker
    • RE: Multiple point values inserted via API all use latest timestamp inside metapoint

      Great news. Also no worries, we all really appreciate the help you provide on the forum so its good to be able to pay you back.

      posted in User help
      terrypackerT
      terrypacker
    • RE: using the rest api to query multiple XID pointValues versus single XID

      Dan,

      There is no way to currently get a list of realtime values for multiple points by filtering by data point XID. The next release of Mango will have some RQL endpoints. I can see if I can put it in for the realtime endpoint, this would allow you to perform SQL-like queries via the URL such as:

      http://localhost:8080/rest/v1/realtime.json?in(xid,(DP_1,DP_1))&limit(100)

      More on RQL here: https://github.com/persvr/rql

      For now you could just request ALL the realtime data and filter it by XID on the client side. See this:

      http://localhost:8080/rest/v1/realtime.json?limit=100

      Where the limit is greater than or equal to the number of points in your Point Hierarchy.

      posted in Dashboard Designer & Custom AngularJS Pages
      terrypackerT
      terrypacker
    • RE: bulk update polling intervals on datapoint

      @djmolloyjr22

      The REST api has a feature that allows bulk updating of data points via a PUT of a JSON array, but this has not been rigorously tested and is still in Beta. Use at your own risk since not every type of data point has been verified to work. I would suggest making a backup of your database prior to testing your specific updates.

      Here is the basic idea:

      1. Make a GET request to {YourMangoHost}/rest/v1/data-points to get all your data points as an Array in JSON format
      2. Edit your JSON
      3. Do a PUT request with the edited array of data points as the payload to {YourMangoHost}/rest/v1/data-points

      Note that since the JSON structure for a Data Point in the REST API is different than the Mango JSON Export you cannot use one with the other.

      posted in How-To
      terrypackerT
      terrypacker
    • RE: Decimal Places at Publisher

      Basically you cannot represent 30.03 exactly in binary.

      The publisher is sending the raw value of the data point, which is represented by a Java double as the value you are seeing sent out 30.029...

      When using a TextRenderer (which only happens for display purposes) you can set it to round the value via the pattern on it. That is why in the UI it looks correct but it is actually stored as 30.029....

      (11110.00000111101011100001)₂ = (1 × 2⁴) + (1 × 2³) + (1 × 2²) + (1 × 2¹) + (0 × 2⁰) + (0 × 2⁻¹) + (0 × 2⁻²) + (0 × 2⁻³) + (0 × 2⁻⁴) + (0 × 2⁻⁵) + (1 × 2⁻⁶) + (1 × 2⁻⁷) + (1 × 2⁻⁸) + (1 × 2⁻⁹) + (0 × 2⁻¹⁰) + (1 × 2⁻¹¹) + (0 × 2⁻¹²) + (1 × 2⁻¹³) + (1 × 2⁻¹⁴) + (1 × 2⁻¹⁵) + (0 × 2⁻¹⁶) + (0 × 2⁻¹⁷) + (0 × 2⁻¹⁸) + (0 × 2⁻¹⁹) + (1 × 2⁻²⁰) = (30.02999973297119140625)₁₀
      
      posted in User help
      terrypackerT
      terrypacker
    • RE: JsonEmport not working for me

      @Phillip-Weeks
      That bug is fixed in 3.7.x I was not aware it was in the 3.6 release. I am planning another 3.6 release in the next few weeks so I'll get that fix in there. In the meantime you cannot end a script with a comment line. So adding a newline after that I think should work.

      posted in How-To
      terrypackerT
      terrypacker