# \[APP\]\[Pro\] Insight Trends Reloaded

**URL:** <https://community.homey.app/t/app-pro-insight-trends-reloaded/71307>\
**Category:** Apps\
**Tags:** app, tools, insights, homey-pro\
**Created:** [October 28, 2022, 8:39am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307 "2022-10-28T08:39:36Z")\
**Posts on this page:** 20\
**Page:** 16

<div class="post-metadata">

**Author:** ![L3nny](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/l3nny/32/102010_2.png) [@L3nny](https://community.homey.app/u/L3nny)\
**Post date:** [March 30, 2024, 7:59pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/302 "2024-03-30T19:59:34Z")

</div>

Hey,  
I’m trying to get the time when someone took a shower. I have a humidity sensor in homey in my bathroom. I tried to use the “trend” check of ITR. But it doesn’t work. How can I calculate the trend between two datapoints, that I use the correct value for the ITR flow card.  
Maybe I’m doing it the wrong way. But this is with what I came up with:

1. If humidity becomes greater then 41-60%
2. use ITR to check if the trend was greater than .75 in the past 15 min
3. set var “showered” to yes/true and save current time in ms to var “showering time”
4. for test purposes send a push notification to me

This is what the flow looks like? But it doesn’t work. Any idea what I’m doing wrong or am I going in a complete wrong direction?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/0/00b2b1d87117ccedb7aba30d7b2def35208d9953.jpeg)

This is what I can see in insights:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/9/d9e3f676aec08759c503a6d9a331ec1d54a21d92.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/7/074c75e945fd75c911ffc50994080a90ddf00211.png)

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [March 31, 2024, 11:14am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/303 "2024-03-31T11:14:37Z")

</div>

> [@L3nny](#):
>
> Any idea what I’m doing wrong or am I going in a complete wrong direction?

The Trend is the curve over time. Mostlikely not above 0.75.

Also I would change the trigger to something more simple.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/9/a9a77a0f947f9e1b071be530a39e1fca78995cce.png)

---

<div class="post-metadata">

**Author:** ![L3nny](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/l3nny/32/102010_2.png) [@L3nny](https://community.homey.app/u/L3nny)\
**Post date:** [March 31, 2024, 12:17pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/304 "2024-03-31T12:17:18Z")

</div>

As far as I know, I can use trend to identify rapid increase of a value or am I wrong?

I don’t like the trigger either, do you have a better idea?

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [March 31, 2024, 1:09pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/305 "2024-03-31T13:09:43Z")

</div>

Yes, but you would have to debug the trend value so you know how much it increases while showering.

I would take a trigger every X sec and **if humidity is bigger then** …

I have the same flow. Or had it. I used when humidity is bigger then 65% then wait 2min if it still bigger then 65%. Then I set “showered” true

---

<div class="post-metadata">

**Author:** ![L3nny](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/l3nny/32/102010_2.png) [@L3nny](https://community.homey.app/u/L3nny)\
**Post date:** [April 1, 2024, 11:33am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/306 "2024-04-01T11:33:18Z")

</div>

OK. I was way to high with 0.75. I now use 0.01. Let’s see if it works tomorrow.

> [@spkesDE](#):
>
> I would take a trigger every X sec and **if humidity is bigger then** …

It would look nicer, but from a performance perspective, wouldn’t that put more load to homey pro then my “solution”? Humidity is normally (apart from showering) not changing drastically throughout the day, so in my case if there is nothing to detect it might trigger the flow a few times a day, with every x sec it would be much more. 🤔  
Or is there another reason you would go for the x sec trigger?

---

<div class="post-metadata">

**Author:** ![HvN](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hvn/32/56789_2.png) [@HvN](https://community.homey.app/u/HvN)\
**Post date:** [April 2, 2024, 10:42am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/307 "2024-04-02T10:42:55Z")

</div>

Hi @L3nny, I do the same but instead of humidity, I use temperature. My flow looks like this and it works great except when the washing machine is on, but that is a general problem of the water trigger instead of the douche trigger.

To trigger the change I calculate the difference between “last value” and “first value” over a specific time. I think you can do the same to detect trend changes in your humidity values.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/8/f8de84a2eaabc98d273d167945a290f466a72082.png)

In raw data, you will see something like this.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/3/635dcc8152e059d77c1f50335a76583862250d1a.png)

And I chart.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/a/bac8f7f6d91c173d38e346f8126e37638ba2c8d3.png)

---

<div class="post-metadata">

**Author:** ![MagTer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/magter/32/107154_2.png) [@MagTer](https://community.homey.app/u/MagTer)\
**Post date:** [May 7, 2024, 8:53pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/309 "2024-05-07T20:53:47Z")

</div>

I might have found a small issue with the app. When adding a condition card from this app and inverting it, the text on the card does not change even though the behavior changes.

It could be just for the Swedish translation, not sure.

---

<div class="post-metadata">

**Author:** ![Morgan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/morgan/32/15416_2.png) [@Morgan](https://community.homey.app/u/Morgan)\
**Post date:** [May 9, 2024, 6:46am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/310 "2024-05-09T06:46:55Z")

</div>

No difference in english.  
I think it is hard to just “change” the text. The use of invert on this card is to invert output true to false and vice verse. I never needed it because you can change the operator to accomplish same behaviour (smaller to greater, equal to not equal).

---

<div class="post-metadata">

**Author:** ![MagTer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/magter/32/107154_2.png) [@MagTer](https://community.homey.app/u/MagTer)\
**Post date:** [May 9, 2024, 7:03am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/311 "2024-05-09T07:03:04Z")

</div>

Most condition cards that you can invert change the text upon clicking “invert”. e.g. “is” to “is not”.

---

<div class="post-metadata">

**Author:** ![Morgan](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/morgan/32/15416_2.png) [@Morgan](https://community.homey.app/u/Morgan)\
**Post date:** [May 9, 2024, 7:32am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/312 "2024-05-09T07:32:21Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![Rick\_Heesakkers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rick_heesakkers/32/12127_2.png) [@Rick\_Heesakkers](https://community.homey.app/u/Rick_Heesakkers)\
**Post date:** [June 20, 2024, 9:03am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/313 "2024-06-20T09:03:09Z")

</div>

Guys,

Can anyone EXACTLY explain how to use Insight Trends Reloaded. I can see insights data (rain) for my Tempest device for the past 7 days in a 5 minute interval. I want a (normal) flow to react if the past 24h total rain fall is above x mm.  
How would I do that?

---

<div class="post-metadata">

**Author:** ![Timmm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/timmm/32/110251_2.png) [@Timmm](https://community.homey.app/u/Timmm)\
**Post date:** [June 29, 2024, 6:54pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/315 "2024-06-29T18:54:04Z")

</div>

Hi,  
I am wondering if i can use this app to check if my aqara humidity and temp are still updating.  
Dont know why but once in a while these sensors do not update anymore and I have to manually reconnect them again.

I thought about calculating an average and if it stays the same, that i get a message…

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 29, 2024, 7:11pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/316 "2024-06-29T19:11:19Z")

</div>

@Timmm you can use this script:

> [@A script to check sensor last update](https://community.homey.app/t/a-script-to-check-sensor-last-update/63142/39):
>
> As there is for some time options to see Lastseen timestamp for Zigbee devices, here is the script for Zigbee devices only, which might be more accurate for Zigbee devices. Thanks @Caseda for your overview script wink Version 0.3 - updated for HomeyScript v. 3.5.1 Version 0.3b - fixed for THEN card (returning TEXT value), primary use-better use is for AND card though Version 0.4 - added option to filter out routers and/or end devices Version 0.5 - added option to exclude ZONES, moved varia…

But the Aqara sensors are really good, it’s the combination of zigbee devices you use @ Homey:

> [@A script to check sensor last update](https://community.homey.app/t/a-script-to-check-sensor-last-update/63142/17):
>
> To really solve the quiet sensors: As an example, on a Homey 201x f.i., Aqara sensors don’t get along with Ikea lights. I then got the issue with Aqara’s not reporting anymore after a while.  
> When I didn’t have Ikea lights, or when I replaced them with Lidl lights, I had no issue at all with the Aqara’s.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 29, 2024, 7:15pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/317 "2024-06-29T19:15:49Z")

</div>

> [@Rick\_Heesakkers](#):
>
> Can anyone EXACTLY explain

Not sure if it works that way.  
So, what did you try so far, and show us the flow(s).

---

<div class="post-metadata">

**Author:** ![Timmm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/timmm/32/110251_2.png) [@Timmm](https://community.homey.app/u/Timmm)\
**Post date:** [June 29, 2024, 7:39pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/318 "2024-06-29T19:39:24Z")

</div>

Hi Peter, thanks for your time and effort to look for a solution.  
I have installed that script before, but, as i understand it, it doesnt help that much with the aqara sensors because they are end devices. And are silent anyway a lot of times.

The ikea lights: i have some ikea lights in my system indeed. But not sure if these Aqara sensors are connected to them via Zigbee. I dont have any flow connection between them for sure. I cant change those ikea lights for other lights. Yeah, only 1 lightbulb but further, i have some ikea led ledstrips in some cabinets. Maybe they are connected.?

I just made some flows that update a logic value when the temp or humidity changes. And then, every 4 hours, if the logic value is still the same as the actual value, i know it hasnt been updated in the last 4 hours and i will get a text message. (Is the idea hehe)

---

<div class="post-metadata">

**Author:** ![Rick\_Heesakkers](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rick_heesakkers/32/12127_2.png) [@Rick\_Heesakkers](https://community.homey.app/u/Rick_Heesakkers)\
**Post date:** [July 1, 2024, 7:38am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/319 "2024-07-01T07:38:22Z")

</div>

Hi Peter,

Why would it not work that way? In the meanwhile I’ve figured it out, but documentation is unclear about HOW to use the app.  
The “Calculate trend”-card informs me ‘To use the results you need to use the ‘Trend calculated’-WHEN card’ which led me to think that in one flow I needed to start it with the first card and end it with the last card mentioned :-p  
For everyone interested the first card is used in a flow and triggered for example by a time- or an event-card. The second card would be used to start a second flow (as the trigger event) to do anything you like with the calculated results.

However, I found another issue related with the Tempest (weater) device and the Insight Trends…

The Tempest device has it’s own app and it shows rain (amount and severeness) in the most “zoomed in”- option in a 1-minute interval for the last 24 hours. In the Insight Trends app on Homey I can now say “Calculate for Rain (mm) based on the last 1 hours” and it will return me - amongst others - the average rain (mm) over the last hour, but does it in a 5-second interval on the last 1 hour? That’s 12 samples per minute times 60 (minutes) makes 720 samples.  
In this way - to get the total rain (mm) in the last hour - I take the average and multiply it by the datapoints - which gives me a number that’s much too high.  
When i divide the datapoints by 12 first (thus forcing the same 1-minute interval the Tempest gives) it will give me the correct number…

---

<div class="post-metadata">

**Author:** ![Johan.N](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan.n/32/102876_2.png) [@Johan.N](https://community.homey.app/u/Johan.N)\
**Post date:** [December 6, 2024, 2:05pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/320 "2024-12-06T14:05:38Z")

</div>

Dear @spkesDE ,  
I’m a happy (and heavy) user of Insight Trends reloaded. One of my use cases, is to calculate some annual totals with a simple trend analysis based on the max minus min value over a period defined by the # days in the current year.

I recently discovered, that above a certain number of days, the trend calculation crashes with “Cannot read properties of undefined” errors.

The strange thing is that I already discovered at the start, that it gives that error if data points are missing. In my case I discovered that the min. starting data (DD-MM-YY) to use in my calculation was 01-05-2024.

But now that that date is further in the past, I’m getting these errors again unfortunately.

Can it be that when using timeframe “Days”, there is an absolute maximum (200 days?) or something that restricts me here ?

If so, is there another easy manner in which I can calculate the trend between e.g. 01-01-2024 and today being 6-12-2024 ? (Of course I already can easily calculate the number of days that is, but the calculation still crashes even though I suspect the involved insight data points are there).

Thanks so much for your reply !

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [December 6, 2024, 5:39pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/321 "2024-12-06T17:39:05Z")

</div>

I’m not sure. Could you send me a diag. report?

At the end I only request the datapoints from you homey and do some math on it.

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [December 10, 2024, 1:29pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/322 "2024-12-10T13:29:38Z")

</div>

> [@spkesDE](#):
>
> **rend**  
> a number between -1 and 1 that indicates whether the sensors’ measurements are increasing or decreasing (and by how much/slowly). For instance, a score of 0.75 indicates a sharp upward trend, while -0.1 denotes a mild negative trend.

I have tried to figure out how to calculate increase / decrease e.g. in delta-C / 15min from “Trend”

Was truing to calculate e.g. Trend \*(1000 \* 60) \* 15 (or something similar tried as well) but cannot figure out to get reasonable result. Obviously can calculate from other values, but direct use would be nicer.

Now using this to calculate (working just fine) both trend and change of trend (derivative) unified to 15min (to allow change of observed time as/if needed (slow / fast signal etc…)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/5/65f356c8c2d3ea060ef8e27f9130e025951af9bd.png)

Any advice to simplify?

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [January 13, 2025, 8:30pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/323 "2025-01-13T20:30:19Z")

</div>

Does anyone know how to use the **calculate trend** flow card to get:

- The trend data as of the start of the day? So not the last day/24 hrs, but only as of the start of the day.
- The time stamp of the min and max values? Like the time stamp of the first and last datapoint.

[Previous page](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307.md?page=15)

[Next page](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307.md?page=17)
