• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. Balistar
    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
    B
    • Profile
    • Following 0
    • Followers 0
    • Topics 21
    • Posts 75
    • Best 2
    • Controversial 0
    • Groups 0

    Posts made by Balistar

    • RE: MQTT Publish

      @Rav-Panchalingam
      Node Red.
      https://flows.nodered.org/node/node-red-contrib-bacnet
      https://cookbook.nodered.org/mqtt/publish-to-topic

      posted in User help
      B
      Balistar
    • Over the last few month very little participation from staff.

      Something is seriously going wrong at mango-os. Or am I the only one that has noticed that more and more posts remain unanswered and that there is almost no participation from the company's staff.
      Over the last few months there have been very few or no post by Jared Wiltshire, Joel Haggar, Phil Dunlap or Terry Packer.

      Craig Web seemed to be posting for a while, but has also stopped a month ago.

      The only one who seems to be frequently posting is Matt Fox, and he does not work at mango-os as far as I can see,

      This forum is more or less the only reason we have chosen Mango. Other SCADAs mosty don't publicly post solutions and answers to issues. Is Mango-OS going this way?

      posted in Mango Automation general Discussion
      B
      Balistar
    • RE: Big News! Infinite Automation, Mango and BitBox USA have merged to create Radix IoT

      Congratulations.

      I see references to 4.0, any info on that?

      posted in Announcements
      B
      Balistar
    • RE: HTTP JSON Retriever - Set point gives error on save.

      Thanks Fox.
      Using normal HTTP Retriever the "Settable" works. Just not the with the JSON variant.

      But even if there is a fix for the JSON version, I suspect that the HTTP JSON Retriever will, like the normal one, do a SET with a GET method Query. While there is no official method to do a HTTP "set", a POST or PUT would be a lot more appropriate than a GET.

      {"method":"GET","path":"/api","query":{"name":"airtemp","value":"25"},"headers":{"x-forwarded-for":"103.30.92.123","x-forwarded-proto":"http","x-forwarded-port":"80","host":"80a86fbe836e421a7363a19aee8ef3d8.m.pipedream.net","x-amzn-trace-id":"Root=1-5ec232c0-a1ad0510c55a8440ee963140","user-agent":"Apache-HttpClient/4.5.5 (Java/11.0.5-ea)","accept-encoding":"gzip,deflate"}}
      

      I will probably write a script that retrieves and sets points through the devices REST API.

      Your edit relates to HTTP receiver, not the retriever.

      posted in How-To
      B
      Balistar
    • HTTP JSON Retriever - Set point gives error on save.

      I have define a HTTP JSON Retriever Source and added a Set Point URL. This saves OK.

      0_1589779390993_fef686c6-85d0-45bd-b9b5-28b56092a515-image.png

      Data point definition saves and validates fine.
      However, The when the "Settable" box and Set Point Name are configured saving the point returns an error.

      0_1589779718614_57f6b84e-3e37-4858-8ee1-b3fd7d982843-image.png

      Internal Server Error — java.lang.ClassCastException: class com.serotonin.m2m2.http.vo.HttpJsonRetrieverDataSourceVO cannot be cast to class com.serotonin.m2m2.http.vo.HttpRetrieverDataSourceVO (com.serotonin.m2m2.http.vo.HttpJsonRetrieverDataSourceVO and com.serotonin.m2m2.http.vo.HttpRetrieverDataSourceVO are in unnamed module of loader java.net.URLClassLoader @560513ce)
      

      Any advice? Documentation is a little thin on this/

      Version 3.7.1

      A previous similar question was not really answered:
      Re: How to set a value using http

      posted in How-To
      B
      Balistar
    • RE: API permissions - User who has permission on DataSource cannot create Datapoint to that source.

      No need for MangoUI other than now and then do Admin stuff, We use our own Dashboards.

      0_1581995259249_Image 130.jpg

      The API will be used in device on-boarding. Admin creates User, JWT, DataSource (device). Sets new user role to DataSource. This info will be set in device, which creates its own DataPoints (15 to 50) and uploads measuring data to the system from then on.

      The JWT is not ideal from a security stand point, but good enough got us at the moment.

      0_1581995701589_Image 131.jpg

      posted in User help
      B
      Balistar
    • RE: API permissions - User who has permission on DataSource cannot create Datapoint to that source.

      Thanks. My goal is to keep the API request JSON as small as possible, so I omitted as much as possible to the POST request to create a DP. Too much.

      You are right.

        "readPermission":"emon3175585",
        "setPermission":"emon3175585",
      

      needed to be added.

      {
        "name": "test12-test2",
        "xid": "test12-test2",
        "dataSourceXid" : "test12",
        "readPermission":"emon3175585",
        "setPermission":"emon3175585",
        "pointLocator" : {
             "startValue" : "0",
             "modelType" : "PL.VIRTUAL",
             "dataType" : "NUMERIC",
             "settable" : true,
             "changeType" : "NO_CHANGE",
             "max": 100,
             "maxChange": 0.01,
             "min": 0
          }
      }
      

      My concern is the API, so that is solved.

      The GUI DP creation permission may still have a problem as there is no SAVE button.

      posted in User help
      B
      Balistar
    • RE: API permissions - User who has permission on DataSource cannot create Datapoint to that source.

      There is no console error because there is no SAVE button to press.

      Using the API with JWT issued to user emon3175585:

      curl --location --request POST 'http://xx.xx.xx.xx:8080/rest/v2/data-points' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Bearer eyJhbGciOiJFUzUxMiJ9.eyJzdWIiOiJlbW9uMzE3NTU4NSIsImV4cCI6MTU4MTk5NjgxMywiaWQiOjQsInYiOjEsInR5cCI6ImF1dGgifQ.AClqeOT6yAQCjGMYfXaMlDVgAcVOftGy3TSCrjxWat-Iz2yFut5nP4wntnE1xas3VtieFbxVwffbhmXwngPhHi8VAEFPPoaCD11unJ5_VTVWJkwnx73Eq8L2sbI9abLVM_CXXXXXXXXXXXXXX' \
      --data-raw '{
        "name": "test12-test2",
        "xid": "test12-test2",
        "dataSourceXid" : "test12",
        "pointLocator" : {
             "startValue" : "0",
             "modelType" : "PL.VIRTUAL",
             "dataType" : "NUMERIC",
             "settable" : true,
             "changeType" : "NO_CHANGE",
             "max": 100,
             "maxChange": 0.01,
             "min": 0
          }
      }'
      

      Results in error: 422 Unprocessable Entity

      {
        "result": {
          "messages": [
            {
              "level": "ERROR",
              "message": "Must retain permission",
              "property": "readPermission"
            },
            {
              "level": "ERROR",
              "message": "Must retain permission",
              "property": "setPermission"
            }
          ]
        },
        "mangoStatusCode": 4002,
        "mangoStatusName": "VALIDATION_FAILED",
        "localizedMessage": "Validation failed"
      }
      
      posted in User help
      B
      Balistar
    • RE: API permissions - User who has permission on DataSource cannot create Datapoint to that source.

      Naturally. But that was set already:

      0_1581992332387_Image 129.jpg

      posted in User help
      B
      Balistar
    • RE: API permissions - User who has permission on DataSource cannot create Datapoint to that source.

      Thanks for your fast response.

      I am probably missing something.

      New DataSource created by Admin. User (emon3175585) given permission to edit the DataSource.

      0_1581985065225_Image 127.jpg

      Yet, when user (emon3175585) logs in, the user cannot create new DataPoint.

      0_1581985190960_Image 128.jpg

      posted in User help
      B
      Balistar
    • RE: API permissions - User who has permission on DataSource cannot create Datapoint to that source.

      Fox. Running Core 3.7.3.

      Admin creates new USER. Admin creates DataSource and gives READ and WRITE access to new user ONLY for that DataPoint.

      New USER can EDIT DataSource, but cannot create DataPoints .Both through GUI and API with JWT.

      Once Admin Creates a new DataPoint for that DataSource new user can edit that DataPoint.

      The intent of Permission to a DataSource works correctly after Admin has created one and assigned read/write permissions for that DataSource to a User, that User has edit/set ability to all DataPoints of that DataSource without that user having explicit read/write permission to those DataPoints. I guess permission inheritance works for this.

      posted in User help
      B
      Balistar
    • API permissions - User who has permission on DataSource cannot create Datapoint to that source.

      A attempt will be awarded a 422 http code. "Must retain permission". Not a 401 "Not Authorized". So perhaps I am missing something.

      I am not sure if this makes sense. If the admin chooses to give a user edit access to a DataSource, it seems logical that that user should also be able to create DataPoints. If the admin is concerned with DataSource security, the admin should not give the user edit permission to the DataSource, but only to DataPoints.

      posted in User help
      B
      Balistar
    • RE: Minimum required Mango REST V2 API JSON values documentation

      Thanks Terry,

      Almost. Mango API needs double quotes around names and values. Anyway this works:

      {
        "name": "emon3175585-19",
        "xid": "emon3175585-19", <-- no need if you want Mango to auto create
        "dataSourceXid" : "emon3175585",
        "enabled": true,
        "pointLocator" : {
             "startValue" : "0",
             "modelType" : "PL.VIRTUAL",
             "dataType" : "NUMERIC",
             "settable" : true,
             "changeType" : "NO_CHANGE"
          }
      }
      

      To add a few more codes:
      201 - Created
      403 - no authorization

      posted in User help
      B
      Balistar
    • Minimum required Mango REST V2 API JSON values documentation

      To start with there is nothing at http://MANGO-IP:8080/rest/v2/swagger/v2/api-docs

      Nor can I find any detailed information.

      Specifically I would like to know the required minimum json values for

      PUT /rest/v2/data-points (create data-point)

      The example in Swagger lists all values, but there is no indication which values are required and which values are set to default when left out. The full PUT request to create a point is (relatively) large 1634 bytes for the request data below.

      Also, I am looking for a list of error codes for each API.

      {
        "xid": "Dummy12345-1",
        "name": "Dummy12345-1",
        "enabled": true,
        "deviceName": "dummy12345",
        "readPermission": "",
        "setPermission": "",
        "pointFolderId": 0,
        "purgeOverride": false,
        "pointLocator": {
          "max": 100,
          "min": 0,
          "maxChange": 0.1,
          "startValue": "50",
          "modelType": "PL.VIRTUAL",
          "dataType": "NUMERIC",
          "settable": true,
          "changeType": "BROWNIAN",
          "values": []
        },
        "chartColour": "",
        "loggingProperties": {
          "cacheSize": 1,
          "loggingType": "INTERVAL",
          "tolerance": 0,
          "discardExtremeValues": false,
          "intervalLoggingType": "AVERAGE",
          "intervalLoggingPeriod": {
            "periods": 1,
            "type": "MINUTES"
          },
          "overrideIntervalLoggingSamples": false
        },
        "textRenderer": {
          "type": "textRendererAnalog",
          "format": "0.00",
          "suffix": "",
          "useUnitAsSuffix": false
        },
        "chartRenderer": {
          "type": "chartRendererImage",
          "timePeriod": {
            "periods": 1,
            "type": "DAYS"
          }
        },
        "rollup": "NONE",
        "simplifyType": "NONE",
        "simplifyTolerance": "NaN",
        "simplifyTarget": 1000,
        "templateXid": null,
        "dataSourceXid": "dummy12345",
        "tags": {},
        "plotType": "SPLINE",
        "dataSourceTypeName": "VIRTUAL"
      }
      
      posted in User help
      B
      Balistar
    • RE: Bulk data upload with HTTP Receiver possible? - SOLVED by using API REST instead

      Solution is to use REST API instead.

      curl -X POST "http://192.168.1.2:8080/rest/v2/point-values?fireEvents=NEVER"

      API follows JSON syntax "Square brackets hold arrays and values are separated by ,(comma)"

      [
        {
          "annotation": "",
          "dataType": "NUMERIC",
          "timestamp": 1576117390000,
          "value": 227.1,
          "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
        },
        {
          "annotation": "",
          "dataType": "NUMERIC",
          "timestamp": 1576117400000,
          "value": 228.1,
          "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
        },
          {
          "annotation": "",
          "dataType": "NUMERIC",
          "timestamp": 1576117410000,
          "value": 229.1,
          "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
        },
        {
          "annotation": "",
          "dataType": "NUMERIC",
          "timestamp": 1576117342000,
          "value": 220.1,
          "xid": "DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae"
        }
      ]
      

      Full CURL with this body:

      curl -X POST "http://192.168.1.2:8080/rest/v2/point-values?fireEvents=NEVER" -H "accept: application/json;charset=UTF-8" -H "Content-Type: application/json;charset=UTF-8" -H "X-XSRF-TOKEN: 58594b34-9a0d-4417-9b23-xxxx" -d "[ { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117390000, \"value\": 227.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }, { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117400000, \"value\": 228.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }, { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117410000, \"value\": 229.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }, { \"annotation\": \"\", \"dataType\": \"NUMERIC\", \"timestamp\": 1576117342000, \"value\": 220.1, \"xid\": \"DP_a9b3bce6-98ea-493a-b840-2450f3ffc3ae\" }]"
      
      posted in How-To
      B
      Balistar
    • Bulk data upload with HTTP Receiver possible? - SOLVED by using API REST instead

      Is there a way to bulk upload to the HTTP Receiver?
      With value and time

      Something like:

      parameterName=value@time

      temp=21.2@1576137626&
      temp=21.3@1576137636&
      etc...

      I can only get the first temp.

      posted in How-To
      B
      Balistar
    • RE: Has HTTP JSON Retriever properties changed in 3.7.3? - Solved

      Thanks. New version solved issue.

      posted in User help
      B
      Balistar
    • Has HTTP JSON Retriever properties changed in 3.7.3? - Solved

      After upgrade from 3.4 to 3.7.3 HTTP JSON Retriever points started throwing events.

      Timestamp was not parsable, value= for point L1 Volt
      

      In point properties the Value JSON pointer is of course defined.
      The Time JSON pointer is not, simply because the JSON does not have it. This was not an issue before, and events were not thrown in 3.4. In 3.7.3 it does.

      What is the best way to set properties without a Time pointer?

      posted in User help
      B
      Balistar
    • Upgrade from 3.4 to 3.7.3 hangs with mysql connect

      I have upgraded all modules from 3.4 to 3.7.4.
      Loading system hangs at "Initializing pooled connection manager"

      INFO  2019-12-10T11:01:47,493 (com.serotonin.m2m2.Main.loadModules:650) - Loading module 'internal', v3.7.0 by Infinite Automation Systems Inc. 
      INFO  2019-12-10T11:01:50,104 (com.serotonin.m2m2.Lifecycle.loadLic:583) - Checking license... 
      INFO  2019-12-10T11:01:50,252 (com.serotonin.m2m2.db.BasePooledProxy.initializeImpl:36) - Initializing pooled connection manager
      

      mySQL only gets one hit from mango:

      2019-12-10T03:01:50.888382Z         8 Connect   root@localhost on mango using SSL/TLS
      

      When I comment-out all mysql enteries in overrides/properties env.properties and remove the h2 comments, systems loads OK (with obliviously very old settings before we moved to mysql.)

      Ubuntu 19:10
      mysql 8:0.18

      posted in User help
      B
      Balistar
    • RE: How to do custom dashboards now?

      Hi Jared,
      Since the new UI Module, the vendor CSS files, that are suppose to be loaded automatically, are blocked from loading in my Custom Dashboard.

      mangoUi~ngMango~ngMangoServices.js:39 Refused to load the stylesheet 'http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'".
      

      I believe I changed everything in my dashboard and is following your admin template.
      Other than styling my dashboard works fine.

      mangoUI 3.4.5
      on Chrome 67

      posted in Dashboard Designer & Custom AngularJS Pages
      B
      Balistar