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

Getting Remote Thing Enabled Status on SDK

Highlighted
Level 1

Getting Remote Thing Enabled Status on SDK

Hi Team,

I am trying to check thing enabled status on SDK side. based on thing enabled status, i want to perform different operations.

Please find the code below to get thing enabled status on SDK side:

VirtualThing thing = mClient.getThing(ThingName);

bool b = thing.isEnabled();

This Enabled status always returns true though thing is not active on the server. Please provide your inputs on this.

3 REPLIES 3

Re: Getting Remote Thing Enabled Status on SDK

What SDK and what version of that SDK is being used?

Meghan

Re: Getting Remote Thing Enabled Status on SDK

Hi Meghan,

It is Dot net SDK and 5.0 version.

Radhakrishnan.

Re: Getting Remote Thing Enabled Status on SDK

The isEnabled property and method you are using pertain to the VirtualThing, meaning the Thing running on the Edge device.

Since the Thing on Composer was disabled there is no ability to access the properties, services, or events to check the value of the isEnabled property on the Thing because they would fail with a sequence of messages stating something like the following, when using the SteamSensor Example specifically:

[O: com.thingworx.communications.client.TwApiWrapper] [Error] twWApi_InvokeService: Error invoking service on Platform. EntityName: SteamSensor1 ServiceName: UpdateSubscribedPropertyValues

[O: com.thingworx.communications.client.TwApiWrapper] Error invoking Service for Entity. Internal Server Error. (Code 1110) twWApi_InvokeService returned 1110. EntityType: Things EntityName: SteamSensor1 ServiceName: UpdateSubscribedPropertyValues

[O: com.thingworx.communications.client.things.VirtualThing] overwriting Property value in PendingPropertyUpdate collection