Temperature Trend Logic

Is anyone willing to share their temperature trend logic?

I've written some but it's not as elegant as I desire. I imagine the 'Rising' and 'Falling' states will be derived from the 'Stable' logic.

I only use temperature trend to notify the household if the upstairs windows should be open (to cool the upstairs) or closed (to avoid warming it too much…).

The code does a compare of the previous temp to the current temp, and then stores the current temp in the previous temp variable.

Gents,

I would appreciate if you can let me now know what RM features or/and Hubitat functions you’ve used to build up the temperature trend logic.

Sorry for these basic questions being still on the learning curve.

The reason for my question above is to build up a temperature trend logic to control the underfloor heating. because these type of heating systems ( despite of pleasant they are) they are so slow to adjust .

Other application that I had in mind was predictive maintenance ( I.e. approaching time to change whole house water filters or air filters for instance but not limited).

Happy to share any outcomes after implementation.

Thank you posting this interesting discussion.

Here’s how I set it up à while back. I would likely separate in different rules if I re-did it today though…

Hi Sebastien,

Thank you for your help.

Your template make it quite easy for me.

In essence my trigger will be the changes in temperature of an outdoor sensor and the rest of the rule will be similar with your apart of being based on temperature levels rather than humidity

Many thanks again

1 Like

Here's another one in case you're interested. "Backyard" is populated by rounding the temperature of a SmartThings motion/temp sensor that's hanging in a solar radiation shield in the back yard giving me hyper local outside temp. IF I'm in my study, it announces the temperature and trend. Unless I flip a virtual Mute Temperatures switch. Works great.

This is what I came up with. It's definitely more elegant than my first attempt. We'll see if it works.

image

The problem with this solution is (obviously?) the 0.9 offset. Each temperature zone your monitoring:

Internal room, Garage, Front porch, Fridge, Freezer, etc.

will have a different rate of change and each sensor (if different makes and models) will have different reporting frequencies.

Therefore, Stable cannot be universally defined, I don't believe.

I recommend starting with a lower offset and monitoring your sensor temp logs. If you see Falling->Rising->Falling or Rising->Falling->Rising, increase the offset until those temp deltas become Stable.

Or I may be totally confused :confused:

Also,

If your temp sensor only reports in whole numbers, the offsets are useless, delete them.

If your temp sensor only reports when a change occurs, the Stable condition will never be set so I recommend adding a Periodic Schedule trigger of X minutes.