# \[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:** 11

<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:** [May 16, 2023, 9:08pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/201 "2023-05-16T21:08:12Z")

</div>

Yeah, it’s the internal id of that variable. Not your display name. You have to figure it out what variable it is.

---

<div class="post-metadata">

**Author:** ![Johan\_Persson1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_persson1/32/48190_2.png) [@Johan\_Persson1](https://community.homey.app/u/Johan_Persson1)\
**Post date:** [May 16, 2023, 9:10pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/202 "2023-05-16T21:10:32Z")

</div>

> [@spkesDE](#):
>
> se.tstorm.nicehashremot

That app was uninstalled a long time ago! 😀

---

<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:** [May 16, 2023, 9:12pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/203 "2023-05-16T21:12:13Z")

</div>

Ahh ,that makes sence. But the insights still exist.

---

<div class="post-metadata">

**Author:** ![Johan\_Persson1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_persson1/32/48190_2.png) [@Johan\_Persson1](https://community.homey.app/u/Johan_Persson1)\
**Post date:** [May 16, 2023, 9:24pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/204 "2023-05-16T21:24:50Z")

</div>

Insights for nicehash and tasmota are removed.

Reselected the variables Gen24 P\_PV both logic and BLL

In developer tools I can search for devices with a certain id, can i search for a specific variable’s id somewhere?

Maybe a script or something?

---

<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:** [May 16, 2023, 9:27pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/205 "2023-05-16T21:27:38Z")

</div>

> console.log(await Homey.logic.getVariables());

using homey script

---

<div class="post-metadata">

**Author:** ![Johan\_Persson1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_persson1/32/48190_2.png) [@Johan\_Persson1](https://community.homey.app/u/Johan_Persson1)\
**Post date:** [May 16, 2023, 9:30pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/206 "2023-05-16T21:30:34Z")

</div>

Now I got some other faults.

30481793-44a9-4c84-b9dc-a9a47d9253e4

 ![IMG_5289](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/7/17605e5d63fad4b4dceafa7d684046e38c45c2c1.jpeg)  
 ![IMG_5290](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/8/7854a792eb6af618a2ec3d139619636eb9139a56.jpeg)

---

<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:** [May 16, 2023, 9:32pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/207 "2023-05-16T21:32:17Z")

</div>

The time span looks like its to small. It’s only 1 data point.

```auto
[log] 2023-05-16 21:20:00 [InsightTrendsReloaded] Got 1 from getLogs. The tokens are: {
  min: 0,
  max: 0,
  mean: 0,
  median: 0,
  standardDeviation: 0,
  trend: NaN,
  firstvalue: 0,
  firstvalue_timestamp: 1684272000000,
  firstvalue_time: '16/05/2023, 23:20:00',
  lastvalue: 0,
  lastvalue_timestamp: 1684272000000,
  lastvalue_time: '16/05/2023, 23:20:00',
  size: 1
}

```

---

<div class="post-metadata">

**Author:** ![Johan\_Persson1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_persson1/32/48190_2.png) [@Johan\_Persson1](https://community.homey.app/u/Johan_Persson1)\
**Post date:** [May 16, 2023, 9:50pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/208 "2023-05-16T21:50:23Z")

</div>

62fb9d32-b6bf-46a1-8542-5b0858d09217

Found the variables with their long id’s. Removed them and created new variables with the same friendly names.

Next run, I got this:

The top trend calculation, triggered the error after 1-2 secs.  
The bottom calculation waited like a whole minute, then triggered the error shown.

If I enter a trend calculation for, let’s say 5 minutes, can I replace the number 5 with a variable set to 5?

 ![IMG_5291](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/1/319a926a24fa04cac587b57d949af1b632026985.jpeg)  
 ![IMG_5292](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/1/913067bf6d68f27b4bce1763e3cd50f275a5dd8f.jpeg)

---

<div class="post-metadata">

**Author:** ![Johan\_Persson1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_persson1/32/48190_2.png) [@Johan\_Persson1](https://community.homey.app/u/Johan_Persson1)\
**Post date:** [May 17, 2023, 12:42am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/209 "2023-05-17T00:42:38Z")

</div>

Hi Florian!

I’m getting the values off my Fronius inverter via MQTT every few seconds, saving the values to a variable. Then I’m calculating the trends based of that variable.

It worked using older versions of ITR, but sadly the newest version is reporting errors.  
The developers are looking at it…😀

/Johan

---

<div class="post-metadata">

**Author:** ![Florian\_Schmidbauer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/florian_schmidbauer/32/30157_2.png) [@Florian\_Schmidbauer](https://community.homey.app/u/Florian_Schmidbauer)\
**Post date:** [May 17, 2023, 7:29am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/210 "2023-05-17T07:29:40Z")

</div>

Hi Johan,  
OT: maybe i should rework my flows to collect data via MQTT as you do… 5 min data intervals for PV Trends are very inacurate. At the moment i have the workaround to trend over 11 minutes (3 datapoints and recalculate the trend with {{trend/(datapoints-1)\*datapoints}} because the last one is always 0)  
Cheers, Florian

---

<div class="post-metadata">

**Author:** ![Johan\_Persson1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_persson1/32/48190_2.png) [@Johan\_Persson1](https://community.homey.app/u/Johan_Persson1)\
**Post date:** [May 17, 2023, 10:57am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/211 "2023-05-17T10:57:46Z")

</div>

Hi SpikesDE!

At the moment I’m running the 1.2.0 version and I noticed that on some of my trend cards I got network errors. It was based on a variable of mine called ‘ProdActualW’. I created a brand new variable called ‘Prod Actual W’, and replaced the old variable everywhere in my flows where it was used.

Look and behold, it worked. Trend calculations worked like a charm.  
So there must be something wrong with some of the variables.

I will install the latest experimental version I got from Sharkys and see if it works.

Pictures FYI

 ![IMG_2165](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/f/ff042f229d21496dfd9f735c8741b5162ada6a75.jpeg)  
 ![IMG_2166](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/b/8be50e5d6066d3095a7b29cf3dfd2d32240dc580.jpeg)

---

<div class="post-metadata">

**Author:** ![Johan\_Persson1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_persson1/32/48190_2.png) [@Johan\_Persson1](https://community.homey.app/u/Johan_Persson1)\
**Post date:** [May 17, 2023, 11:09am UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/212 "2023-05-17T11:09:28Z")

</div>

No, it did not help with a brand new variable.

6adb2e55-9f10-468d-a44c-77ce29131403

 ![IMG_2167](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/8/a835d826887bfdc810f2a802d4da171d82815423.jpeg)  
 ![IMG_5303](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/e/9ee112e6bd1b1f7865dce746ca009f8cbcb34482.jpeg)

---

<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:** [May 17, 2023, 1:30pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/213 "2023-05-17T13:30:46Z")

</div>

There is nothing I can’t do. It’s an issue on Athom Side or on your side.

---

<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:** [May 17, 2023, 1:53pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/214 "2023-05-17T13:53:18Z")

</div>

Just a thought: clear cache and reload my.homey.app,  
or open it in a private tab and test again.

I’ve seen all kinds of weird issues when the web app is not working with actual data anymore after x hours.

---

<div class="post-metadata">

**Author:** ![P\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/p_w/32/71251_2.png) [@P\_W](https://community.homey.app/u/P_W)\
**Post date:** [May 17, 2023, 3:21pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/215 "2023-05-17T15:21:48Z")

</div>

Hi there and thanks for the effort but where is the _“he last value being null”_ option that was build in @version 1.2.0. ? Because i guess the error “Invalid type for token “trend” expected 'number” but got 'null"  
is because the latest verlues are null in the time range selected and not a value.

---

<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:** [May 17, 2023, 4:11pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/216 "2023-05-17T16:11:06Z")

</div>

Strange. I’ll re-add this ASAP

---

<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:** [May 17, 2023, 4:18pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/217 "2023-05-17T16:18:02Z")

</div>

# [Version 1.4.0 is live](https://homey.app/a/com.spkes.insightTrendsReloaded/test/) 🎉

> ## Changes
> 
> - Re-Added the filter for null values

---

<div class="post-metadata">

**Author:** ![P\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/p_w/32/71251_2.png) [@P\_W](https://community.homey.app/u/P_W)\
**Post date:** [May 17, 2023, 5:17pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/218 "2023-05-17T17:17:55Z")

</div>

hi this solved the error indeed. only thing left now for me is number of data points that are collected. my interval was on 3 min. but this gives a error because i can see that the app only collects a datapoints once every 5 min. this means that only when selecting a min of 15 min. interval gives a trend value of 3 points.  
so dont know if this can be fixed or setup.  
thanks in advance!

---

<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:** [May 17, 2023, 5:19pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/219 "2023-05-17T17:19:33Z")

</div>

Did this work before?

---

<div class="post-metadata">

**Author:** ![P\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/p_w/32/71251_2.png) [@P\_W](https://community.homey.app/u/P_W)\
**Post date:** [May 17, 2023, 5:23pm UTC](https://community.homey.app/t/app-pro-insight-trends-reloaded/71307/220 "2023-05-17T17:23:11Z")

</div>

> [@Johan\_Persson1](#):
>
> So there must be something wrong with some of the variables.
> 
> I will install the latest experimental version I got from Sharkys and see if it works.
> 
> Pictures FYI
> 
> ![IMG_2165](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/f/ff042f229d21496dfd9f735c8741b5162ada6a75.jpeg)

yes it did, my origional settings where a trend calc. every 30 sec. for humidity over a timespan of 3 min. and these settings worked uptill the problems occurred 9 days ago accoring to my logging

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

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