# Motion Alarm History / Insights

**URL:** <https://community.homey.app/t/motion-alarm-history-insights/48336>\
**Category:** Questions & Help\
**Tags:** official, tools, insights\
**Created:** [June 11, 2021, 9:34pm UTC](https://community.homey.app/t/motion-alarm-history-insights/48336 "2021-06-11T21:34:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rEnDfOLi](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rEnDfOLi](https://community.homey.app/u/rEnDfOLi)\
**Post date:** [June 11, 2021, 9:34pm UTC](https://community.homey.app/t/motion-alarm-history-insights/48336/1 "2021-06-11T21:34:04Z")

</div>

In the Official Doc’s [App Reference (link)](https://tools.developer.homey.app/docs/apps-reference) it says that the `alarm_motion` capability both “supports” `insights` and is `gettable`.

Meanwhile, there is no “motion alarm” option available in the Insights UI. Looking into fetching them somehow through the API returns only the most recent 50 “events” for a device’s capability. While trying to work around this using the other available “resolutions”/time period selections return a 500 response stating that `boolean_with_resolution_not_allowed`.

Is there indeed a limit of how far back motion alarms are stored (if so, is there are reason for it?), or can it be fetched by other means?

Based on [this post in the old forums (link)](https://forum.athom.com/discussion/comment/76539/#Comment_76539), it might seem that at least downloading longer periods of motion alarms was possible back in 2018?

I see that there was a request for the same in 2019 (link removed due to limitation in the forums…) perhaps, with some proposed workarounds - but wouldn’t it be best if it indeed was made available through the insights?

This chart below is not that interesting as it only has the latest 50 “state changes” but could be across longer periods of time.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/3/133f1b35cf6648a23514803e0da85351a9124ed4.png)

---

<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:** [June 12, 2021, 6:08am UTC](https://community.homey.app/t/motion-alarm-history-insights/48336/2 "2021-06-12T06:08:14Z")

</div>

It sounds like 50 events is some sort of arbitrary limit that Athom imposes on storing boolean data. I believe that boolean data previously wasn’t stored in Insights at all due to the fact that it cannot be averaged, which is how the Insights database works for numerical data: the older the data, the more condensed it gets by storing averages instead of actual values. So now apparently booleans are stored, but only the last 50 of them.

How I read the old post is that the creator of the heatmap was using an external database to store values, and use that database as source for the heatmap. Insights is nice for Joe Sixpack, but if you want to do proper data analysis you should consider exporting to InfluxDB or Prometheus (a Homey app exists for both).

Completely unrelated: an API returning 500 when the query isn’t valid? Who thinks of these things…

---

<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 13, 2021, 12:58pm UTC](https://community.homey.app/t/motion-alarm-history-insights/48336/3 "2021-06-13T12:58:11Z")

</div>

> [@robertklep](#):
>
> Insights is nice for Joe Sixpack

😂 🤣

---

<div class="post-metadata">

**Author:** ![rEnDfOLi](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rEnDfOLi](https://community.homey.app/u/rEnDfOLi)\
**Post date:** [April 16, 2023, 9:54pm UTC](https://community.homey.app/t/motion-alarm-history-insights/48336/5 "2023-04-16T21:54:24Z")

</div>

Just found a even better example/visualization, by someone called Solweb, illustrating it in Grafana with influxdb.

However, I’m still dumbfounded why this should not be possible in Homey natively…

Image credit to [Influxdb and Grafana - Homey](https://homey.solweb.no/custom-integrations/influxdb-and-grafana)

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