Skip to main content
1-Visitor
February 25, 2016
Question

how to check if a remotething is bound

  • February 25, 2016
  • 1 reply
  • 1451 views

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

5-Regular Member
February 25, 2016

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.