Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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.
Solved! Go to Solution.
@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
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