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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

how to check if a remotething is bound

ravila
1-Visitor

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
12-Amethyst
(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.

Announcements


Top Tags