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

Set lastConnection via REST and not Edge Microserver

tsands
1-Newbie

Set lastConnection via REST and not Edge Microserver

I am developing an interface for a set of devices that will not be using an Edge Microserver. The Things created are templated on the RemoteThingWithFileTransfer. So, it inherits the isConnected and lastConnection properties. If I only ever send data to these Things via REST calls, these two properties do not get set. How do I make sure these are set? Or, at least the lastConnection property is set?

4 REPLIES 4
PaiChung
21-Topaz II
(To:tsands)

I recommend you create your own two properties in addition for this.

We can definitely do this. Does this defeat the purpose of automatic monitoring of Remote Things from the Monitoring menu in Composer?

mhollenbach
5-Regular Member
(To:tsands)

You can rework the MonitoringDeviceStatus Mashup if you duplicate it. You would then pull in remote devices to the list on the right based on your new property values you have created. If you tried to use that monitoring page otherwise you would never see anything as connected if you are not binding remote things.

Meghan

mhollenbach
5-Regular Member
(To:tsands)

The lastConnection property and isConnected property are set whenever a remote device is bound to the RemoteThing, so to answer your question, you simply need to bind a device to your RemoteThing to change those two property values.

All of the property updates, for these two properties, are done in the ThingWorx platform code for a RemoteThing class. Since these properties are read-only, only the platform will be able to manipulate that value, so I also recommend creating your own property for lastConnected as well as isConnected as Pai suggested above.

Meghan

Announcements