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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

how to check if a remotething is bound

ravila
1-Newbie

how to check if a remotething is bound

Below is a platform service that is called from an EMS to determine if a remotehing running

on a server is bound to the platform.  I used the Thing Service under TW Composer to help create

this code:

var params = {

    name: ThingName /* STRING */

};

// result: BOOLEAN

var result = Resources["EntityServices"].IsRemoteThingBound(params);

I pass in a thing string name(ThingName) and it returns result(a Boolean true/false).

This issue is that the result value is always true, even when the thing is not bound or if

the thing does not exist on the platform or within the EMS as a virtual thing.

Ideas on what I'm doing wrong?

1 REPLY 1
Aanjan
9-Granite
(To:ravila)

Rick, you can check the isConnected property on the Remote Thing itself. It will be set to true only when the Remote Thing is connected.

Top Tags