• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. dmsmith

    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
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 13
    • Best 0
    • Controversial 0
    • Groups 0

    dmsmith

    @dmsmith

    0
    Reputation
    653
    Profile views
    13
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    dmsmith Unfollow Follow

    Latest posts made by dmsmith

    • Updating Data Point value via REST API

      Hi Joel, Phil,

      Wondering if I'm missing something - when attempting to update a data point's value via the REST API (/v1/point-values/{xid}) I am finding that items with a "dataType" of alphanumeric will update as expected, but items with a "dataType" of numeric will not (fail with a 406 error). To double check I have taken a single data point which has a type of numeric and continually fails to update via the API and changed its dataType to alphanumeric, and suddenly it starts updating as expected. Upon returning the dataType setting to numeric it once again fails. Flip-flop between the 2 dataTypes and the update works and doesn't respectively.

      The JSON from the put command is very very basic and all I did is add or delete ALPHA from the relevant location in the dataType line:

      {
      "dataType": "NUMERIC",
      "value": "4321",
      "timestamp": 0,
      "annotation": ""
      }

      Am I missing something? Should there be some additional required information/step for "numeric" dataTypes?

      Cheers,

      David

      posted in User help
      D
      dmsmith
    • Accessing API via php script

      Hi Joel, Phil,

      Been trying to get a listing of all of a given data point via the swagger API: /v1/point-values/{xid}/latest

      Given there are several hundred entries that I need a response for I am trying to script the process but keep running into the issue of "failed to open stream: HTTP request failed! HTTP/1.1 403 Access Denied" even though a copy & paste of the string into a browser works perfectly.

      The script in question is very simple:

      <?php
      $dpval = 2; //up to 321
      $dpnum = str_pad($dpval, 16, "0", STR_PAD_LEFT);
      $dpstring = "DP_HGU1_2_UII_$dpnum";
      $url = "http://<ip.address>:8080/rest/v1/point-values/$dpstring/latest?useRendered=true&unitConversion=false&limit=100&useCache=true";

      while ($dpval <= 321) {
      echo $dpstring;
      echo "<br>";
      echo file_get_contents($url);
      echo "<br>";
      echo "<br>";
      $dpval++;
      }
      ?>

      Have also tried numerous variations with various permutations with fopen and stream_context_create.

      Cheers,

      David

      posted in Dashboard Designer & Custom AngularJS Pages
      D
      dmsmith
    • RE: Mango on Ubuntu 14.04

      @mihairosu
      Hi. What happens when you try to manually start Mango after boot? What process do you use to do that?

      Cheers,

      David

      posted in Mango Automation Installation
      D
      dmsmith
    • RE: Mango on Ubuntu 14.04

      OK, that did the trick thanks Phil. Even though sudo echo $PATH didn't suggest that the path was being reset, adding those lines into the init script showed that it actually was being reset. Launching with sudo -E ./ma.sh start worked correctly! :)

      posted in Mango Automation Installation
      D
      dmsmith
    • RE: Automate Template Configuration Import

      @phildunlap said:

      Hi dmsmith, glad to have escaped quotation marks. :)

      :-D

      At the moment there is nothing in Template Configuration module to enable that, but it seems like it would be fairly simple to add to a URL handler that just builds the context to parse the template out of the request.

      This would be an excellent addition to the Template Configuration module.

      There is also a JSON importer that will scan a folder and import any configurations it finds, but I am unsure if we made that available generally or not.

      Short of the above this would be very useful. Could I also grab a copy?

      Cheers,

      David

      posted in Scripting general Discussion
      D
      dmsmith
    • RE: Mango on Ubuntu 14.04

      Definitely not empty - 156 jar files in there.

      posted in Mango Automation Installation
      D
      dmsmith
    • RE: Mango on Ubuntu 14.04

      Thanks Joel.

      It's definitely the JDK.

      /usr/lib/jvm/oracle_jdk8# javac -version
      javac 1.8.0_66

      I have indeed created that service, I just have a habit of going directly to ma.sh instead :)

      posted in Mango Automation Installation
      D
      dmsmith
    • RE: Mango on Ubuntu 14.04

      Hi Phil,

      OK, so using sudo from the regular user rather than su-ing :

      ml350g5@HPS350G5:/opt/mango/bin$ sudo echo $JAVA_HOME
      /usr/lib/jvm/oracle_jdk8
      ml350g5@HPS350G5:/opt/mango/bin$ sudo ./ma.sh start
      MA_HOME is /opt/mango
      ml350g5@HPS350G5:/opt/mango/bin$ /opt/mango/bin/ma-start.sh: line 94: java: command not found
      ma-start: MA started with Process ID: 21182
      ma-start: no restart flag found, not restarting MA
      ma-start: MA done

      Immediately prior to this Mango was running correctly when started by root. As root I issued "ma.sh stop" which completed successfully, exited from the root shell, and then did what you see above. Any thoughts?

      Thanks!

      posted in Mango Automation Installation
      D
      dmsmith
    • Automate Template Configuration Import

      Hi Joel, Support,

      In Mango's "Template Configuration Import" function I have created a template with a single global variable (%%text%%) which will create a data sources and multiple data points exactly as I need. I have been trying to find how I can pass this variable to Mango in the simplest possible way in order to have it create a new device configuration with no further manual interaction. Is there a simple GET or POST argument that can be passed to the templateConfig.shtm to provide this value? There's nothing in the Swagger Rest API that seems to address this.

      Cheers,

      David

      posted in Scripting general Discussion
      D
      dmsmith
    • RE: Mango on Ubuntu 14.04

      Thanks Phil. There was nothing in the database that couldn't be recreated relatively easily so went ahead and moved the old databases directory aside and did an 'ma.sh start' - has worked nicely. Have only had Mango installed for around 2 or 3 weeks and haven't initiated a db upgrade so I'm not sure where that would have gone wrong.

      Thanks for the help.

      posted in Mango Automation Installation
      D
      dmsmith