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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Check Whether a Thing's Properties Have Changed

Ascherer17
14-Alexandrite

Check Whether a Thing's Properties Have Changed

I'm wanting to check whether the Thing's properties have been updated within a certain period.  I've tried the "HavePropertiesChangedSince()" service, but it seems to include the metadata properties such as "name," "description," "tags," and "thingTemplate" in its decision.  I only need to know if my custom properties (Temperature for example) have changed.

 

Any ideas on a way to accomplish this?  Is there a way to get a list of the custom properties on a Thing without the metadata properties?

1 ACCEPTED SOLUTION

Accepted Solutions

You can build your own check easily with GetPropertyValuesAsMultiRowTable which includes last value and timestamp.

 

Or also you can try to subscribe to AnyDataChange event and act accordingly, I think they are not thrown for the previous properties you had said (well name and thingTemplate can't change)

View solution in original post

4 REPLIES 4

You can build your own check easily with GetPropertyValuesAsMultiRowTable which includes last value and timestamp.

 

Or also you can try to subscribe to AnyDataChange event and act accordingly, I think they are not thrown for the previous properties you had said (well name and thingTemplate can't change)

Ascherer17
14-Alexandrite
(To:CarlesColl)

GetPropertyValuesAsMultiRowTable() still includes the metadata properties in the list of Properties. 

Also I'm finding that the timestamps for 'name', 'description', 'tags', etc. get updated every time you Save the Thing.  

Yes I know, but it's super easy to ignore them (it are four and always the same).

slangley
23-Emerald II
(To:CarlesColl)

Hi @Ascherer17.

 

If the response provided by @CarlesColl helped you to solve your issue, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags