# Insights Homey cloud api

**URL:** <https://community.homey.app/t/insights-homey-cloud-api/115981>\
**Category:** Questions & Help\
**Created:** [September 13, 2024, 4:07pm UTC](https://community.homey.app/t/insights-homey-cloud-api/115981 "2024-09-13T16:07:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amersfoort](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Amersfoort](https://community.homey.app/u/Amersfoort)\
**Post date:** [September 13, 2024, 4:07pm UTC](https://community.homey.app/t/insights-homey-cloud-api/115981/1 "2024-09-13T16:07:02Z")

</div>

I would like to retrieve Insights data from my Homey 2023 using cloud api.  
Using the following url, I get the today’s power data:

```auto
https://[myHomeycloudid].homey.athom-prod-euwest1-001.homeypro.net/api/manager/insights/log/homey:device:1991e290-989e-45d6-abc3-c16886af9cbe/homey:device:1991e290-989e-45d6-abc3-c16886af9cbe:measure_watt_avg/entry

```

How to get this power data of the last 31 days via the Homey cloud api ? Changing the filter on the Homey Insights webpage doesn’t change the url.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 13, 2024, 4:37pm UTC](https://community.homey.app/t/insights-homey-cloud-api/115981/2 "2024-09-13T16:37:41Z")

</div>

> [@Amersfoort](#):
>
> Changing the filter on the Homey Insights webpage doesn’t change the url.

It does for me:

```auto
https://XXX.homey.homeylocal.com/api/manager/insights/log/homey:manager:system/homey:manager:system:clock/entry?resolution=last31Days

```

This is the relevant documentation: [ManagerInsights - Homey Web API](https://athombv.github.io/node-homey-api/HomeyAPIV2.ManagerInsights.html#getLogEntries)

---

<div class="post-metadata">

**Author:** ![Amersfoort](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Amersfoort](https://community.homey.app/u/Amersfoort)\
**Post date:** [September 22, 2024, 8:48am UTC](https://community.homey.app/t/insights-homey-cloud-api/115981/3 "2024-09-22T08:48:01Z")

</div>

I’m using cloud api v3 getting Insights data. Without the “resolution” parameter I get data starting at [dateyesterday]:22:00:000Z time which is 0:00 CET (=my time zone). Using the “resolution=last31Days” parameter each day starts at 00:00:00Z which is 2:00 CET. This seems not to be consistent.  
Can I setup anywhere the starting time of compressed data? My timezone is GMT + 2.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 22, 2024, 9:28am UTC](https://community.homey.app/t/insights-homey-cloud-api/115981/4 "2024-09-22T09:28:02Z")

</div>

> [@Amersfoort](#):
>
> Without the “resolution” parameter I get data starting at [dateyesterday]:22:00:000Z time which is 0:00 CET (=my time zone). Using the “resolution=last31Days” parameter each day starts at 00:00:00Z which is 2:00 CET. This seems not to be consistent.

I think this is a fundamental issue with the way Homey fills the RRD database that is used for this information.

The time data written to the database is in UTC, so when it writes a datapoint for 02:00CET it gets stored as 00:00Z. Say that it does this hourly.

Then the data gets consolidated by the database (which happens for older data), and say that it will consolidate to a 6-hour average. That means that for a single day, you have data points at 00:00Z, 06:00Z, 12:00Z, 18:00Z.

So 00:00Z is the first available data point for a day, and 18:00Z is the last one. Converted to your local timezone that’s 02:00CET and 20:00CET. There is no data point available anymore for 00:00CET.

For shorter-range resolutions it will use the data points that are stored per hour.

> [@Amersfoort](#):
>
> Can I setup anywhere the starting time of compressed data? My timezone is GMT + 2.

Not that I can see, it only supports fixed resolutions.

You can try creating an issue on Github (I think this issue is SDK-related and not Web API-related, so [here](https://github.com/athombv/homey-apps-sdk-issues/issues/)), but I don’t think this is something that’ll ever get fixed.
