Skip to main content
1-Visitor
May 24, 2016
Question

Setting property of a thing with value, time stamp and quality

  • May 24, 2016
  • 6 replies
  • 2717 views

I have different properties for several things which have a value, time stamp and quality. The value should be logged and I should be able to add an alert level. What is the best way to set up these properties?

6 replies

5-Regular Member
May 24, 2016

Steven, what type of properties would they be? If the properties are going to be the same on multiple Things, you can set them on a ThingTemplate level or branch out to ThingShape levels, it would depend on your use case. Can you expand on your use case as well?

1-Visitor
May 24, 2016

Hey,

I have added them on a ThingShape level so I can easily add them to different things. I'm actually looking for a property basetype like a VTQ where besides the value, I can also set the timestamp and quality.

I think I found a solution requiring a bit more properties but it is manageable. I also found that it also better to use a Stream in stead of a streamValue because then I can use my timestamp in stead of the system time. But when I run my code a couple of times, only a random amount of stream values are actually added.

5-Regular Member
May 25, 2016

Just so I understand, you run code to add/ update stream entries but not all entries are getting added/ updated?