# Flow and Insights

**URL:** <https://community.homey.app/t/flow-and-insights/61855>\
**Category:** Flows\
**Created:** [March 19, 2022, 8:06pm UTC](https://community.homey.app/t/flow-and-insights/61855 "2022-03-19T20:06:25Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![smux84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smux84/32/19877_2.png) [@smux84](https://community.homey.app/u/smux84)\
**Post date:** [March 21, 2022, 12:06pm UTC](https://community.homey.app/t/flow-and-insights/61855/21 "2022-03-21T12:06:53Z")

</div>

In fact, I will try with that. Thank you

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 22, 2022, 11:39am UTC](https://community.homey.app/t/flow-and-insights/61855/22 "2022-03-22T11:39:13Z")

</div>

Nevertheless, here are the flows.

**Required**  
– a Countdown or Timer app like [Chronograph](https://homey.app/en-us/app/nl.fellownet.chronograph/Chronograph/) or [CountDown](https://homey.app/en-us/app/nl.bevlogenheid.countdown/CountDown/)  
– 2 numeric variables (e.g. _ConOld_, _ConCalc_)

_ **When…** _  
– Every 24 hours  
_ **Then…** _  
– Set **Energie** to variable _ConOld_

_ **When…** _  
– Time is 23:59  
_ **Then…** _  
– Start Timer/Countdown with 59 s

_ **When…** _  
– Timer/Countdown is finished  
_ **Then…** _  
– Calculate _ConCalc_ as {{round( **Energie** - _ConOld_,2)}}

_ **When…** _  
– Time is 10:00  
_ **Then…** _  
– Push Notification “Yesterday’s consumption was _ConCalc_ kW/h”

**Info**  
– The result represents the previous day’s consumption of 23 hours, 59 minutes and 59 seconds. So 1 second is missing… 😉  
– The result is given in kW/h with 2 decimals. If the result should be given in W, the formula must be as follows: {{(( **Energie** - _ConOld_)\*1000)}}

I hope I haven’t made a mistake, because I haven’t tried it myself… 😉

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 22, 2022, 3:19pm UTC](https://community.homey.app/t/flow-and-insights/61855/23 "2022-03-22T15:19:09Z")

</div>

Or just use Power by the Hour, and send yourself the total kWh a few seconds after midnight.Or open the PBTH device in the Homey app to see the totals of today and yesterday and last month.  
Or open Insights and see the totals.

That is actually why I created PBTH, so that you do not need to create complex flows or create graphs/reports from exported data.

> **[Power by the Hour](https://homey.app/en-gb/app/com.gruijter.powerhour/Power-by-the-Hour/)**
>
> Summarize the energy/water usage or (solar) production per hour, day, month and year. Use dynamic tariffs.

---

<div class="post-metadata">

**Author:** ![smux84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smux84/32/19877_2.png) [@smux84](https://community.homey.app/u/smux84)\
**Post date:** [March 22, 2022, 3:37pm UTC](https://community.homey.app/t/flow-and-insights/61855/24 "2022-03-22T15:37:48Z")

</div>

> [@Gruijter](#):
>
> Or just use Power by the Hour, and send yourself the total kWh a few seconds after midnight.Or open the PBTH device in the Homey app to see the totals of today and yesterday and last month.  
> Or open Insights and see the totals.
> 
> That is actually why I created PBTH, so that you do not need to create complex flows or create graphs/reports from exported data.

That’s what I was trying to do but in the “when” it just tells me that I can select when a value “greater” “less than” changes there is no “read” command.

How can I do that?

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 22, 2022, 3:45pm UTC](https://community.homey.app/t/flow-and-insights/61855/25 "2022-03-22T15:45:13Z")

</div>

> [@Gruijter](#):
>
> Or just use Power by the Hour

Has already been proposed 2x 😉

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 22, 2022, 3:53pm UTC](https://community.homey.app/t/flow-and-insights/61855/26 "2022-03-22T15:53:16Z")

</div>

> [@smux84](#):
>
> there is no “read” command.
> 
> How can I do that?

[https://homey.app/f/UunlO\_](https://homey.app/f/UunlO_)

You can select any value as tag from the PBTH device:

 ![Screenshot_20220322-165102_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/c/3c87b31df5e16c6df08f12251973a24f6e257f08.jpeg)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 22, 2022, 3:55pm UTC](https://community.homey.app/t/flow-and-insights/61855/27 "2022-03-22T15:55:42Z")

</div>

> [@DirkG](#):
>
> Has already been proposed 2x 😉

So there must be some truth in it. But some people need multiple reminders before a message sinks in 😉

---

<div class="post-metadata">

**Author:** ![smux84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smux84/32/19877_2.png) [@smux84](https://community.homey.app/u/smux84)\
**Post date:** [March 22, 2022, 4:06pm UTC](https://community.homey.app/t/flow-and-insights/61855/28 "2022-03-22T16:06:00Z")

</div>

> [@DirkG](#):
>
> Nevertheless, here are the flows.
> 
> **Required**  
> – a Countdown or Timer app like [Chronograph](https://homey.app/en-us/app/nl.fellownet.chronograph/Chronograph/) or [CountDown](https://homey.app/en-us/app/nl.bevlogenheid.countdown/CountDown/)  
> – 2 numeric variables (e.g. _ConOld_ , _ConCalc_ )
> 
> _ **When…** _  
> – Every 24 hours  
> _ **Then…** _  
> – Set **Energie** to variable _ConOld_
> 
> _ **When…** _  
> – Time is 23:59  
> _ **Then…** _  
> – Start Timer/Countdown with 59 s
> 
> _ **When…** _  
> – Timer/Countdown is finished  
> _ **Then…** _  
> – Calculate _ConCalc_ as {{round( **Energie** - _ConOld_ ,2)}}
> 
> _ **When…** _  
> – Time is 10:00  
> _ **Then…** _  
> – Push Notification “Yesterday’s consumption was _ConCalc_ kW/h”
> 
> **Info**  
> – The result represents the previous day’s consumption of 23 hours, 59 minutes and 59 seconds. So 1 second is missing… 😉  
> – The result is given in kW/h with 2 decimals. If the result should be given in W, the formula must be as follows: {{(( **Energie** - _ConOld_ )\*1000)}}
> 
> I hope I haven’t made a mistake, because I haven’t tried it myself… 😉

Nice work, I will try and I hope to succeed.  
Thank you

---

<div class="post-metadata">

**Author:** ![smux84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smux84/32/19877_2.png) [@smux84](https://community.homey.app/u/smux84)\
**Post date:** [March 22, 2022, 4:51pm UTC](https://community.homey.app/t/flow-and-insights/61855/29 "2022-03-22T16:51:08Z")

</div>

I succeeded thank you, I’m a beginner. Excuse

Thank you so much for your help

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 22, 2022, 5:21pm UTC](https://community.homey.app/t/flow-and-insights/61855/30 "2022-03-22T17:21:20Z")

</div>

> [@smux84](#):
>
> I’m a beginner. Excuse

No worries for asking help on the forum. That is what it is for, as long as you are willing to put in effort yourself. And you did, with success as result 🥳

---

<div class="post-metadata">

**Author:** ![smux84](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smux84/32/19877_2.png) [@smux84](https://community.homey.app/u/smux84)\
**Post date:** [March 23, 2022, 5:30am UTC](https://community.homey.app/t/flow-and-insights/61855/31 "2022-03-23T05:30:07Z")

</div>

Is it possible in any way to recall via link or http command the “Insights” graph of a certain sensor and a certain time slot (example 24h)?

Example:

1. Click link

2. Opens the graph of the  
My humidity sensor of the last 24h (without having to select the brand and then the sensor function and then the manual period is a bit cumbersome)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/1/91fa773285ad35daab6b5d31ebb3f18f4b826fd4.jpeg)

I was also thinking about the “Apple shortcut” app

---

<div class="post-metadata">

**Author:** ![Fred\_ckx](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fred_ckx/32/86217_2.png) [@Fred\_ckx](https://community.homey.app/u/Fred_ckx)\
**Post date:** [July 14, 2024, 6:55pm UTC](https://community.homey.app/t/flow-and-insights/61855/32 "2024-07-14T18:55:45Z")

</div>

I succeeded to create an Advanced Flow where I receive MQTT messages, and extract numerical data from the message content.

I can also export time-series of these numerical data by using Archive Insights.

My ultimate goal in this project is to analyze the incoming messages by topic and to determine the reception rate per topic. So I want to record the **topics** of the incoming MQTT messages and store them in a text variable. So far so good.

Now I was hoping that when I export Insights with Archive Insights, I would get a file with timestamps and as values the recorded topic strings. However, when I do this, only numerical values are exported (e.g. the total message count).

How can I export text variables using Archive Insights, or in any other way?

---

<div class="post-metadata">

**Author:** ![Fred\_ckx](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fred_ckx/32/86217_2.png) [@Fred\_ckx](https://community.homey.app/u/Fred_ckx)\
**Post date:** [July 14, 2024, 7:51pm UTC](https://community.homey.app/t/flow-and-insights/61855/33 "2024-07-14T19:51:00Z")

</div>

I found a way to achieve my goal by using the Google Sheets app. In this way I can append the message topics, including a timestamp to a worksheet in “live” mode.

But I am open for suggestions to do this in some other way.

The nice thing about Archive Insights is that I collect the data directly on my NAS.

[Previous page](https://community.homey.app/t/flow-and-insights/61855.md?page=1)
