FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
90 views 0 comments
by anonymous
Hi,

I am sending device commands to multiple devices and capturing the output using the  SocketIO-based Status API.

Commands are very simple. Just an "echo" to make sure that the on-device execution is as simple as possible.

API used is:

/api/devices/{device_id}/command

When I send the commands sequentially to the devices (one by one) I reliably receive the expected "completed" message with the output of the echo command as generated on device.

When I send commands to multiple devices concurrently, the results are mixed. The number of "completed" messages varies. In most cases at least a few responses will never be sent from RMS.

Initially I was creating a separate, shortlived socket connection with a single channel subscription  for each device command. Suspecting that this was not ideal, I am now using a shared connection and subscribe  / unsubscribe to the  status channels on one socket connection.

Both approaches lead to the same mixed result wrt receiving "completed" messages.

Is sending concurrent device requests and receiving responses to / from RMS supported? Or am I supposed to limit the number of concurrent requests and capture the responses sequentially?

Regards,

Bob

1 Answer

0 votes
by anonymous
Hello,

  

I'm sorry for the delayed response.

On the 27th of February, RMS will be undergoing maintenance. Could you check if this behavior is still present then, and if it is, send me an example of the requests you are sending via private messages. I'll try to replicate the issue on my end.

  

Best regards,
DaumantasG