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.
GET realtime function
-
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.
-
@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...
-
So I tried to modify the function that get my point values like below and I get some errors.
param.points* get my xid's.
Maybe I've done something wrong there.
-
You can subscribe to the points in the loop, but you only need one websocket to service all the points you would subscribe to.
-
@phildunlap I've made the changes like in the picture from below, but when I try to print into console it give me undefined.
-
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.