• Recent
    • Tags
    • Popular
    • Register
    • Login

    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

    GET realtime function

    Dashboard Designer & Custom AngularJS Pages
    3
    26
    11.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • phildunlapP
      phildunlap
      last edited by phildunlap

      For values from the past you should continue to use the point-values endpoint. Iirc, the majority of your queries were only for the current, latest value, which the websocket can keep up to date for you.

      S 1 Reply Last reply Reply Quote 0
      • S
        sky_watcher @phildunlap
        last edited by

        @phildunlap Ok, so I get it wrong... The function that I showed here was the function for my points for my graphic because that was the most time consuming, the function for the points only wasn't so time consuming and I thought that I can use WebSockets to reduce the time for the function that get my points for the graphics...

        1 Reply Last reply Reply Quote 0
        • S
          sky_watcher
          last edited by

          So I tried to modify the function that get my point values like below and I get some errors.

          0_1544819808415_2018-12-14_22-34-55.jpg

          param.points* get my xid's.

          Maybe I've done something wrong there.

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            You can subscribe to the points in the loop, but you only need one websocket to service all the points you would subscribe to.

            S 1 Reply Last reply Reply Quote 0
            • S
              sky_watcher @phildunlap
              last edited by

              @phildunlap I've made the changes like in the picture from below, but when I try to print into console it give me undefined.

              0_1545066582221_2018-12-17_19-08-38.jpg

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by

                Nothing is returned from the subscribe function, so the command you have stopped on wouldn't have anything to print. Because the JavaScript in a browser executes in a single threaded way, the onmessage function couldn't log anything if execution is paused.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post