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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Getting Remote Thing Enabled Status on SDK

rkandasamy
1-Newbie

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
mhollenbach
5-Regular Member
(To:rkandasamy)

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

Meghan

Hi Meghan,

It is Dot net SDK and 5.0 version.

Radhakrishnan.

mhollenbach
5-Regular Member
(To:rkandasamy)

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

Top Tags