athombv / homey-web-api-issues

This issue tracker is for Homey Developers using the Web API.
4 stars 1 forks source link

Better control of export of insights #13

Closed Abrissirba closed 3 years ago

Abrissirba commented 4 years ago

I would like to export insights data from homey to another application but I can't find a way to export all data from the log. The only way to control the timespan I have found is to use the resolutions that are available in the insights app, https://insights.homey.app/. I seem to get all values if the resolution is LastHour but the larger the resolution is the less values I get. I guess the values are aggregated to improve performance and since the graphs can't display that many datapoints pixelwise.

The lack of control over how which datapoints that are exported prevents med from getting all data back in time when setting up a new integration. It also makes the integration less robust since to be able to get all values the integration needs to be operational 24/7 and run every hour to be able to use the LastHour resolution. If the integration for some reason would be down for a couple of days, there would be no way to get all the data since the last successful export.

WeeJeWel commented 3 years ago

Unfortunately for your use case, Homey does not save data the way you want it, but it saves the data aggregated.

The only way if you want the raw data is to keep listening for any update and save that yourself somewhere else.