cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

how to get data via TCP

SOLVED
Highlighted

how to get data via TCP

Hi, i'm beginner

Our customers want to see information from clients (Edge Devices) at ThingWorx.

I tested it with "socket test".

This seems to be done in a 1: 1 fashion.

How can I get information from multiple clients over TCP in ThingWorx?

Should I use the SDK or node.js?

If so, how do I configure it?

Note: Please let me know if you have any related cases

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to get data via TCP

It would be great to have more information around the use case.

In general you can connect various Things to ThingWorx using the SDK or e.g. the REST API.

If there are multiple clients connecting to ThingWorx, each of those needs to be represented by one Thing in ThingWorx.

If all those clients are the same devices but e.g. in different locations ThingWorx modelling lets you create Shapes and Templates that can be used to already pre-define the actual Things.

It will depend on the actual device / client on what implementation to choose. For some the C-SDK might be the best, for devices with more resources maybe the JavaSDK. For devices that only connect to update a specific property a REST API call could work (which has more HTTP overhead than the SDK calls).

There's a lot of the design depending on what resources are available and what protocol / programming language you're comfortable with.

The main point however is, that each individual (physical) device needs to be represented by one (virtual) Thing in ThingWorx.

In Mashups you can then e.g. visualize multiple Things and values at once by using the Template and e.g. the GetImplementingThingsWithData service. This allows to query data for all devices that are based on a specific template.

I'm not sure if that helps or answers your question... if not a bit more context around the actual use case would be quite helpful.

Cheers,

Michael

View solution in original post

1 REPLY 1

Re: how to get data via TCP

It would be great to have more information around the use case.

In general you can connect various Things to ThingWorx using the SDK or e.g. the REST API.

If there are multiple clients connecting to ThingWorx, each of those needs to be represented by one Thing in ThingWorx.

If all those clients are the same devices but e.g. in different locations ThingWorx modelling lets you create Shapes and Templates that can be used to already pre-define the actual Things.

It will depend on the actual device / client on what implementation to choose. For some the C-SDK might be the best, for devices with more resources maybe the JavaSDK. For devices that only connect to update a specific property a REST API call could work (which has more HTTP overhead than the SDK calls).

There's a lot of the design depending on what resources are available and what protocol / programming language you're comfortable with.

The main point however is, that each individual (physical) device needs to be represented by one (virtual) Thing in ThingWorx.

In Mashups you can then e.g. visualize multiple Things and values at once by using the Template and e.g. the GetImplementingThingsWithData service. This allows to query data for all devices that are based on a specific template.

I'm not sure if that helps or answers your question... if not a bit more context around the actual use case would be quite helpful.

Cheers,

Michael

View solution in original post