Skip to main content
1-Visitor
September 29, 2016
Question

Websocket connection between Thingworx and a websocket-server.

  • September 29, 2016
  • 1 reply
  • 7492 views

Hello community,

I want to open a websocket connection between Thingworx and a websocket-server for subscribing data.

I have seen that such services for http protocol exist in Thingworx:

var result = Resources["ContentLoaderFunctions"].LoadJSON(params);

So my question is:

Is there any possibility to do almost the same via websocket communication?

Thanks a lot for help,

Max

1 reply

5-Regular Member
September 30, 2016

Why aren't you just using the EMS or one of the SDKs, which handle the websocket communication for you?

mrenner1-VisitorAuthor
1-Visitor
October 4, 2016

Thanks for comment.

Yes I could handle the websocket communication using one of the SDKs.

But I thought there will be an out of the box solution for websockets in thingworx.

Do you know if there is any way to do this out of the box?

mrenner1-VisitorAuthor
1-Visitor
October 12, 2016

Thanks again for your help Aanjan.

I have not a possibility of accessing the server through REST calls because its a websocket communication via websocket protocoll.

When you say "If there is no API to hit/ access, we might need to look into leveraging lua." do you mean to use the EMS and write a websocket client in LUA Script?