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

Making an estimation according to logged temperature property values

SOLVED
Highlighted
Newbie

Making an estimation according to logged temperature property values

Hello everyone,

I'm trying to make an estimation about the duration of a cooling down process according to the measured temperature datas. I'm inteding to do this by writing a service to compare logged temperature values from the sensor and calculate the change of the temperature in a specific time intervall. I created a value stream and logged the temperature property, however I don't know how to retrieve the logged values with a custom service. I couldn't also find a tutorial about this. Can someone help me about this topic?

Thank you!

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Making an estimation according to logged temperature property values

I just created a subscription according to the DataChange of temperature. In that subscripton I substracted the old value of the data from the new value of the data and set that result as a property called tempDiff (me.tempDiff = eventData.oldValue.value-eventData.newValue.value;). According to this difference the estimated cool down time is calculated.

2 REPLIES 2

Re: Making an estimation according to logged temperature property values

You can retrieve property values through the Thing assigned to the value stream using a snippet QueryPropertyHistory (for example) against the time interval.  Returned result will be in an infotable format. Also, you may use a FOR function to loop through the values treating it as a table.

Re: Making an estimation according to logged temperature property values

I just created a subscription according to the DataChange of temperature. In that subscripton I substracted the old value of the data from the new value of the data and set that result as a property called tempDiff (me.tempDiff = eventData.oldValue.value-eventData.newValue.value;). According to this difference the estimated cool down time is calculated.