# Storing energy data

**URL:** <https://community.homey.app/t/storing-energy-data/127635>\
**Category:** Energy\
**Created:** [January 13, 2025, 7:55pm UTC](https://community.homey.app/t/storing-energy-data/127635 "2025-01-13T19:55:07Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZeroSugar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/zerosugar/32/34211_2.png) [@ZeroSugar](https://community.homey.app/u/ZeroSugar)\
**Post date:** [January 13, 2025, 7:55pm UTC](https://community.homey.app/t/storing-energy-data/127635/1 "2025-01-13T19:55:07Z")

</div>

I would like to setup a system on which i can store my energy data in a database (thinking about mysql, influxdb, prometheus, etc…) and on which i can show the data in graphs (eg with grafana). Preferably i would like to put the database on the google cloud…if possible  
For the above i would like to have your advise on what to choose for this?  
Thanks in advance !

---

<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:** [January 13, 2025, 10:00pm UTC](https://community.homey.app/t/storing-energy-data/127635/2 "2025-01-13T22:00:50Z")

</div>

> **[Archive Insights](https://homey.app/en-us/app/com.gruijter.insights2csv/Archive-Insights/)**
>
> Make backups of all insights

> **[InfluxDb](https://homey.app/en-us/app/homey.influxdb/InfluxDb/)**
>
> Metrics exporter for InfluxDb

> **[Google Sheets](https://homey.app/en-nl/app/com.google.sheets/Google-Sheets/)**
>
> Append to Google Sheets from a Flow.

Interesting topic:

> [@Influx + Grafana](https://community.homey.app/t/influx-grafana/45928):
>
> Hi, I am trying to get more detailed insights by using Influx and Grafana. (by means of the Homey influx app) But it is not as user friendly as I was hoping. I already installed the programs and they are linked to my Homey and to each other. Could somebody explain how to make nice graphs and statistics? For example a bars view with daily power usage (from a Smart switch with Power by the Hour), etc. Thanks!

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 14, 2025, 9:40am UTC](https://community.homey.app/t/storing-energy-data/127635/3 "2025-01-14T09:40:41Z")

</div>

> **[MySQL](https://homey.app/de-de/app/de.ronnywinkler.mysql/MySQL/)**
>
> Verwende deine MySQL-Datenbank in Homey

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 14, 2025, 4:13pm UTC](https://community.homey.app/t/storing-energy-data/127635/4 "2025-01-14T16:13:09Z")

</div>

Here is an example for writing values via flow into a database. If mySQL makes sende depends on the way you want to visualize the data.  
As small version you could use MS Excel with a mySQL ODBC addon. Then you can create Pivot tables and charts.

> [@\[APP\]\[PRO\] MySQL-Client](https://community.homey.app/t/app-pro-mysql-client/62459/2):
>
> Examples: SELECT Select one value from your database in the THEN part of your flow: [grafik] Use the flow trigger in the IF part of your flow to receive the first value of the result. You can use the Query-ID used in the SELECT above to filter your flow (react only on this kind of query). [grafik] Use the value in your flow. Take a look at the local flow tags you can use: [grafik] Use the first valus as number or text, write the complete JSON result to the timeline or what ever you ne…

---

<div class="post-metadata">

**Author:** ![ZeroSugar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/zerosugar/32/34211_2.png) [@ZeroSugar](https://community.homey.app/u/ZeroSugar)\
**Post date:** [January 15, 2025, 3:53pm UTC](https://community.homey.app/t/storing-energy-data/127635/5 "2025-01-15T15:53:26Z")

</div>

Thanks Peter and Ronny for your help !

---

<div class="post-metadata">

**Author:** ![GeL](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gel/32/17161_2.png) [@GeL](https://community.homey.app/u/GeL)\
**Post date:** [January 18, 2025, 2:23pm UTC](https://community.homey.app/t/storing-energy-data/127635/6 "2025-01-18T14:23:34Z")

</div>

I have set up a dedicated InfluxDB + Grafana server (Debian) which is also accessible from the internet. InfluxDB runs with 2 databases, first DB is old data from my HomeAssistant system that I don’t use anymore, but of which I still have the data. Second DB is my Homey Pro data. Both combined in one graph each to have data continuity.

So in my case, InfluxDB app (Homey) =\> Grafana.

Hereunder a screenshot, it does everything that Insights is missing and it’s rather simple to setup.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/2/c2147d7753fd46d5daf9cd06906705f0384d11f4.jpeg)

---

<div class="post-metadata">

**Author:** ![Astrapowerrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/astrapowerrr/32/78916_2.png) [@Astrapowerrr](https://community.homey.app/u/Astrapowerrr)\
**Post date:** [March 5, 2025, 7:01pm UTC](https://community.homey.app/t/storing-energy-data/127635/7 "2025-03-05T19:01:15Z")

</div>

how do you get the old history, thats in homey transfered to influxdb?  
like last month last year etc

---

<div class="post-metadata">

**Author:** ![Henrik\_Johnsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henrik_johnsson/32/13707_2.png) [@Henrik\_Johnsson](https://community.homey.app/u/Henrik_Johnsson)\
**Post date:** [March 6, 2025, 3:31am UTC](https://community.homey.app/t/storing-energy-data/127635/8 "2025-03-06T03:31:49Z")

</div>

I would argue that Homey doesn’t store any worthwhile historic data, all you have is averages with ever decreasing resolution.

---

<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:** [March 6, 2025, 4:11am UTC](https://community.homey.app/t/storing-energy-data/127635/9 "2025-03-06T04:11:04Z")

</div>

Indeed. But it’s not _ever_ decreasing 😉 After a month and onwards, it’s averaged to one mean value a day

> ![1000044992](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/5/b58c16b0f8c5ec044b40fba7d92b0984a463dc7f.jpeg)

---

<div class="post-metadata">

**Author:** ![Astrapowerrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/astrapowerrr/32/78916_2.png) [@Astrapowerrr](https://community.homey.app/u/Astrapowerrr)\
**Post date:** [March 6, 2025, 8:00am UTC](https://community.homey.app/t/storing-energy-data/127635/10 "2025-03-06T08:00:38Z")

</div>

Besides the discussion about what to call it, I’m mainly looking for a way to export the data we’re talking about to Influx.

Does this have to be done manually per device, or is it possible to push the "database with stored data " in Homey to Influx using a flow card?

i dont mind that its increased. its just for archiving. i know its there and just want to save it to a place were i kan keep it save.

---

<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:** [March 6, 2025, 1:46pm UTC](https://community.homey.app/t/storing-energy-data/127635/11 "2025-03-06T13:46:08Z")

</div>

> [@Astrapowerrr](#):
>
> just want to save it to a place were i kan keep it save.

You can achieve this with the [Archive Insights app](https://homey.app/en-nl/app/com.gruijter.insights2csv/Archive-Insights/) linked earlier by @Peter_Kawa.

You can use a flow to e.g. export all insights every day at the end of the day for all devices in one go and store them on an FTP-server/NAS. The app creates a zip-file per Homey app. The zip-file includes all insights for all devices created by that app. Both in csv- and json-formats.

---

<div class="post-metadata">

**Author:** ![Astrapowerrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/astrapowerrr/32/78916_2.png) [@Astrapowerrr](https://community.homey.app/u/Astrapowerrr)\
**Post date:** [March 6, 2025, 8:30pm UTC](https://community.homey.app/t/storing-energy-data/127635/12 "2025-03-06T20:30:36Z")

</div>

that app i tried. but i coulndt just get a instant graph out of that data in a click.  
thats what ik like from influx/grafana 1 click and i have my visualistation.  
and the csv i create from that app isnt annoted so i cant import into influx.

its all so complicated for a noob like me hahaha

but the question stays open. is it possible to push/pull the archived data what is on my homey to influx. with for example the influx flow cards?

---

<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:** [March 7, 2025, 2:10am UTC](https://community.homey.app/t/storing-energy-data/127635/13 "2025-03-07T02:10:06Z")

</div>

This is not possible with “1 click”.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 7, 2025, 8:30am UTC](https://community.homey.app/t/storing-energy-data/127635/14 "2025-03-07T08:30:23Z")

</div>

> [@ZeroSugar](#):
>
> I would like to setup a system on which i can store my energy data in a database

If ‘Energy data’ means gas and electricity usage…

For exactly this, I still have Domoticz running on my NAS. It stores all data from my P1 meter and has some simple graphics built in.

 ![1000123245](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/3/2384597167182863531e2589ed90166094364667.jpeg)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 7, 2025, 8:40am UTC](https://community.homey.app/t/storing-energy-data/127635/15 "2025-03-07T08:40:32Z")

</div>

If you are interested in only some devie insights, you could use the MySQL app. You can push every capability change to a database. It’s not Influx, but just to store it’s a possible way.

---

<div class="post-metadata">

**Author:** ![ReneO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/reneo/32/3522_2.png) [@ReneO](https://community.homey.app/u/ReneO)\
**Post date:** [March 8, 2025, 10:03pm UTC](https://community.homey.app/t/storing-energy-data/127635/16 "2025-03-08T22:03:05Z")

</div>

You could let Homey save data in a Googlesheet and use the googlesheet plugin for grafana. (I have no experience with this myself)
