Homey Community Forum

[APP] Insight Trends

Introduction

Homey features powerful insights that allow you to see all sensor measurements and it’s development in the past. Get one step further and not only see the insights put also act accordingly or even see a little bit into the future!

Coming soon!

The app provides a bunch of action- and condition flow cards where you select an insight (a device and a capability, i.e. temperature outside) and a scope to analyse (i.e. the last 15 minutes). The following results will then be calculated:

  • Trend: a value between -1 and 1 indicating if the sensors measurement is going up or down (and how fast/slow). for example a value of 0.75 means the trend is going up rapidly while -0.1 means a slight downwards trend
  • Min/max: the minimal/maximal value discovered within the scope
  • Average: the average of all values in the scope (arithmetic mean)
  • Median: if all values would get sorted and if you take the value in the middle this is the median
  • Standard deviation: indicator active/inactive the measured value or how ‘spreaded’ the data set is
  • Dataset size: how many measurements the scope has. This can be useful to determine how trustworthy the results above are. For example if you have a sensor that only reports every 30 minutes and your scope is one hour you will get some results but they are based on just two measurements so the trend is maybe not that accurate. Important: a bigger scope might not have a bigger dataset than a smaller one as the accuracy (and therefore the sample points) also get is reduced.

Example usage scenarios

  • If you have an humidity sensor and you want an alarm to go off if the humidity is too high. When you take a shower it might be that the alarm goes on because you have a very high humidity for a short amount of time which is okay. Before you trigger the alarm you now might check the average humidity over the past 4 hours and only trigger the alarm if also this value is high.
  • Long term analysis: you could analyse if for example the temperature is going up or down over a longer period of time and accordingly take measurements early (heating/cooling). Because you are considering a longer period of time this basically excludes short term events such as a rainy weekend during the summer.
  • You not only get the current measurements but you also get insights how it came to the current measurement. If you’re monitoring the temperature for example you would see from the trend if the temperature raised/dropped rather fast or slowly which can indicate different reasons, i.e. an open window versus a minor problem with your heating system.
  • Less complex flow scenarios: for some reason you might need to now if the temperature went bellow zero in the last night. Instead of having to listen to all events and store the lowest temperature and resetting this variable you might just use the insights to check this at any time for any scope.
  • Act early: instead of triggering an alarm when it is already too late you might analyse the trends and give a warning early. For example you might want to prevent mold by monitoring humidity and temperature. Depending of the current values and also it’s trends you then can detect this risk early!
  • Detect if some behaviour starts to change: for example if you have a vibration sensor on your washing machine you could see if something is wrong if the standard deviation increases over time.

16 Likes

V2.1.1

  • Fixed wrong ordering of the insights
  • Provided a new error trigger card

V2.1.0

  • Some small fixes

V2.0.0

  • UI with live preview and statistics
  • Return current value in the calculations
  • Support for boolean based insights

V1.0.0

  • Initial release

reserved too

Love this idea,

Having the mode (modus) would be great too.
The mode is the value that appears most often in a set of data values

Good idea, do you have any example where that could be useful?

I am monitoring the water Temperature of my heater (Ingoing and outgoing)
I prefer to see the modus rather than the avarage or median
Example:
Measurements 70, 70, 70, 70, 60, 40, 40, 30, 30,
Median is 60
Avarage is 53.3
Modus is 70

2 Likes

How expensive is an insights card in terms of CPU and memory use? I can see how useful it is, but I’m worried it will be a heavy operation that you might need to call periodically.

Good question! Actually it is suprisingly low, I’ll be able to get into more details soon (fetching log entries is around a few 100 ms in general and calculating things is even faster). Calculating a few trends per second should not be a problem but maybe you should not query it all the time for all your devices.

3 Likes

Please note that there is a conflict between athom and the developer of this application as athom actively demands implementation of features they want to have and otherwise wont publish the app in their store. as this software was developed in no relation to athom and as the developer isn’t a paid contractor or in a similar relation to athom this cannot be accepted. the developement and the support of this application is herby terminated until further notice. If you have questions, please ask Athom

4 Likes

Anyway the app is splendid! Thank You for your effort to make Homey more useful and effective. Your app has made my flows much more simple to configure.

Despite the conflict, I am happy with this app… Let’s see if this flow will work out for me when showering, purple line, three moments… When motion is detected > switch light on + kick off the attached flow…

Trends only works retrospectively. Do you not think you need to trigger flow on change of humidity?

Thanks @Morgan!

For now I created a flow: Based on movement, lights+log writing… Including starting of this flow… this flow should start and than trigger should come because of these spikes in humidity. The humidity is continuous changing… Up but also down… Any suggestions are welcome.

I also want that when there is no humidity change, still the lights switch on when motion is detected… that’s why I separated these flows…

I stumbled into a problem with the app. If have more than one scope calculated, in different flows, for a capacity like outdoor temperatur, the When-card “Trend calculated” do not recognize which scope it shall report for.
I have one scope for outdoor temperatur to calculate minimum temperatur the last 8 hours.and another scope for outdoor temperatur to calculate the average temperatur the last 7 days.
Either of these to flows fires the “Trend calculated” and I do not now which scope is used. :frowning:

Is there a way to set a variable to the calculated mean for example? So if I want to calculate the average temperature of the last 24 hours, can I write this number to a variable? I can trigger actions when a calculation had been done but can’t seem to find the result of the calculation…

This flow runs when a trend calculation is made. Then it updates a variable with minimum value rounded to 1 decimal. Then it is sent to my mobile.

Might be a solution to put the trend calculated in a Logic vartemp1 and vartemp2 for each “temp” and use thatvariable furtheron?
edit: was not really wake yey, you already figured that out :wink:

Question to @MadMonkey

spoiler=Fixed (LogicVariable was not updated properly)

spoiler

I’m doing the following to respond to a trend in a Logic variable
1 - IF sometrigger THEN set “LogicVariable”
2 - IF every 5 min THEN calculate trend “LogicVariable”
3 - IF calculated trend “LogicVariable” THEN something

But the trigger on the third flow doens’t fire. It works when I use flow 2 and 3 with a devicevalue (f.e. temperature)

Other thing Id like to mention: filtering doens’t work when selecting a value to calculate and the list seems unsorted. Maybe a fix for when you have come to agreement with Athom

And would be nice to have the calculated value available when using Trend for the AND or THEN part. As far as I can see this is not the case.
For example:
IF every 1 hours
AND calculate Trend [average] < 100
THEN push [average] to User

Or
IF every 1 hours
AND trigger
THEN calculate [Average] + push [Average] to user

As far as I can see [average] is only available when you use a calculation as trigger?

@MadMonkey
What?? They want you to give (as in: they won’t purchase it, you must hand it over) your invented features to them, or else they ban your app?
This is fu…
Or am I getting it wrong?
You can publish @ Community Store without Athom interfering, but thats not what this is about, is it?
Let me know if I can do something
Peter

But @zakraket, you can! (I use the test version )

BUT… You only can’t see/retreive the actual value of [average] (sorry).
This is more of a way to inform you if the average dropped or rised @ last hour.

1 Like

Good news everyone! The conflict could be resolved and the app will be further supported. I’ve got a lot of positive feedback and I really appreciate this. Please note that I propably won’t be able to track all requests and questions as there are just too many apps and channels to support. The best way for bug reports and feature requests would be github (will be back soon) while everyone is invited to ask questions here. Thanks for your support!

PS: please consider a small donation if you like the app and if you would like to support further developement.

8 Likes