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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Real value of property "lastConnection" lost after save thing

amejia1
10-Marble

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.

ACCEPTED SOLUTION

Accepted Solutions

yes, that's the way it works

View solution in original post

4 REPLIES 4

@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

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.

yes, that's the way it works

mgoel
17-Peridot
(To:rosharma)

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

Announcements


Top Tags