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

    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

    Balistar

    @Balistar

    2
    Reputation
    1.8k
    Profile views
    75
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Balistar Unfollow Follow

    Best posts made by 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
    • 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

    Latest 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