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

Real value of property "lastConnection" lost after save thing

SOLVED
Level 7

Real value of property "lastConnection" lost after save thing

Hello,

 

I use the value of the "lastConnection" property to display the date of the last connection of the device to server. The problem is that when i save the Thing after a modification of a script in the ThingTemplate the value of the "lastConnection"  gets updated with the current date (I'm losing the date which the equipment  is really connected).

Is it normal?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Real value of property "lastConnection" lost after save thing

yes, that's the way it works

4 REPLIES

Re: Real value of property "lastConnection" lost after save thing

@amejia1 : definitely this is bound to happen as you put the entity to edit mode the entity will lost connection and once again you save the entity the connection is created thereby updating the last connection with current date/time -- ideally this is the way it shall work

if connection is made and it never breaks then last connection date would never get changed , it would remain the same as it was the first time and if connection breaks due to any interruption then ideally the last connection date should be updated

Re: Real value of property "lastConnection" lost after save thing

Hello rosharma,

 

If I understand correctly I should avoid saving (edit) the Thingtemplate  used by our things if the solution is already used by our customers because all the instances (things) of the ThingTemplate, will lose information about the last connection.

 

Thank you.

Re: Real value of property "lastConnection" lost after save thing

yes, that's the way it works

Re: Real value of property "lastConnection" lost after save thing

Hi @amejia1

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark the answer as accept as solution for the future reference. Thank you in advance.

Regards-Mohit Goel