[APP] [PRO] Timeline Export

Timeline Export

Your Homey timeline doesn’t keep everything forever, and once a notification is cleaned up it’s gone. Timeline Export lets you save it first: pick the categories, dates or words you care about and download the result as CSV (for Excel or Google Sheets) or JSON (for your own tools).

Link to app: Timeline Export | Homey

Version 1.1.0: see [APP] [PRO] Timeline Export - #2 by Morten_Bech
Version 1.2.0: see [APP] [PRO] Timeline Export - #8 by Morten_Bech
Version 1.2.1: see [APP] [PRO] Timeline Export - #10 by Morten_Bech

Features

  • Export the whole timeline, or filter by category, date range and text
  • CSV with semicolon, comma or Tab separator (special characters like æ, ø, å show correctly in Excel)
  • JSON with all fields, for scripts and other tools
  • Each line has both the original UTC time and the local time in your Homey’s time zone
  • Flow cards to export automatically, for example every night, and send the link or content on
  • Copy to clipboard as an alternative to downloading

Requirements

  • Homey Pro (the app uses the Homey Web API, which is not available on Homey Cloud)
  • A personal API key with read access to notifications only (see Getting started)
  • Does not work on Homey models older than Homey Pro (Early 2019), as personal API keys are not available there

Getting started

  1. Install the app from the link above
  2. In the Homey web app, go to Settings → API Keys and create a new key. Give it access to read notifications only
  3. Open the app’s settings, paste the key and press Save API key
  4. Choose your filters and press Download CSV or Download JSON

Good to know

  • Export works best from my.homey.app in a browser on a computer. In the mobile app, downloads may not work, so use Copy to clipboard there
  • If the file doesn’t download automatically, use the links that appear below the buttons. Hold Ctrl (Cmd on Mac) while clicking, otherwise the link may not open (for example in Chrome)

Privacy

  • The app only reads the timeline. It never changes or deletes notifications
  • Your API key is stored only in the app’s settings on your own Homey and is never sent anywhere else
  • Never share the API key with anybody, and limit its access when you create it (the app only needs read access to notifications)
  • Export files are stored temporarily on your Homey in a folder with a random, unguessable name, and are deleted automatically when the link expires (15 minutes by default, up to 24 hours as set in the app settings)

Feedback

This is a test version, so all feedback is welcome, both good and bad. Please post here, or report bugs on GitHub: Issues · DrChip666/dk.timelineexport.DrChip666 · GitHub

Update: v1.1.0 – Flow cards and link lifetime

Timeline Export can now run on its own from Flows, so you can for example export the last week every Sunday evening and send the link to your phone.

Test version: Timeline Export | Homey

New Flow cards

  • Then: Export the timeline as [CSV/JSON] for [the whole timeline / the last 24 hours / the last 7 days / the last 30 days]
  • When: The timeline was exported, with these tags:
    • Local link (works on your home network)
    • External link (works from anywhere)
    • File name, Notifications, File type, Period and Link expires

Both cards work in standard Flows, not only in Advanced Flow.

Example:

  1. When it is Sunday 23:00 → Then Export the timeline as CSV for the last 7 days
  2. When The timeline was exported → Then send a push notification with the tags External link and Notifications

Link lifetime

In the app settings you can now choose how long links work: 15 minutes, 1 hour, 6, 12 or 24 hours. The default is 15 minutes. After that the file is deleted from Homey and the link stops working, also if Homey restarts in between.

You can also choose to start the The timeline was exported card when you download from the settings page. This is off by default.

Setting up the external link

The app learns your Homey’s external address the first time you open its settings via remote access. Do this once:

  • open the app settings at my.homey.app while you are away from home, or
  • open them in the Homey app on your phone with Wi-Fi turned off

The settings page then shows which address is used. Until then the External link tag stays empty.

If external links stop working at some point, just open the app settings via remote access again and the address is updated.

Privacy

  • The external link goes through Homey’s own remote access, not directly to your home, so your IP address is not shown
  • The link does contain your Homey’s ID. Nobody can log in with it, but treat links as semi-private: share them with people you trust, and don’t post them publicly
  • Every export gets its own random, unguessable folder, and the file is deleted when the link expires
  • The app still only reads the timeline and never changes or deletes notifications

Feedback is very welcome, here or on GitHub: Issues · DrChip666/dk.timelineexport.DrChip666 · GitHub

Would it be possible to have a Flow card that returns the export in a tag on the THEN export?

I would like to be able to setup a Flow to do regular exports to backup past events for fault diagnosis… I’m guessing asking to include app setting to export to an SMB share (like a NAS) woould be a HUGE ask, and unreasonable to expect. But passing the export in a tag value would allow the use of apps like Email Sender to email the CSV export, allowing for easy import in to a spreadsheet.

Thank you kindly for your consideration, and your work on this app.

Hi @Drako74, thanks for the idea, it makes good sense for fault diagnosis.

Tags on a Then card would hide it from standard Flows (Homey only shows Then cards with tags in Advanced Flow). So my plan is to add a “Content” tag to the existing When card The timeline was exported instead. Then this works in a standard Flow:

  1. When Sunday 23:00 → Then Export the timeline as CSV for the last 7 days
  2. When The timeline was exported → Then Email Sender with the Content tag

As far as I can see, Email Sender can’t attach files, so the CSV would go in the email text. Use its plain text card, otherwise the line breaks are lost. I’d also add Tab as separator, so you can paste straight from the email into Excel or Google Sheets and get proper columns.

Would that cover what you need? And roughly how many notifications would one export hold (daily or weekly)? I need to check how large a tag Homey accepts.

About the NAS: SMB is indeed a big one, and so is SFTP/FTP. I want to keep the app slim and let users handle further export with other apps.

BTW: is the current When card perhaps already enough? It has a Local link and an External link tag to the CSV file, so you can put the link in the email with Email Sender and download the file from there. Just set the link lifetime to 24 hours in the app settings (the default is 15 minutes), and open the settings once via remote access so the external link is filled in. You could even automate downloading the file when the email arrives.

How about adding both? Then those of us that prefer to use Advanced Flows can utilise that method on the THEN card, but it would also be available by the Content tag for people who prefer Standfard Flows.

No, unfortunately Email Sender can’t attach files (I might suggest that to that app developer as an enhancement, as it would be very useful). Yes that’s how I would use it with existing Email Sender functionality (unless you fancied adding app settings for an SMTP server to send the file as an attachment in a future version possibly?) The Tab separator is a good idea, thank you.

I think it would be sensible to just export the previous day, on a daily basis. Or the export and subsequent email would get a bit silly.

Thank you kindly good sir :saluting_face: for such a prompt and helpful response, it is greatly appreciated.

Thanks @Drako74, good points!

Adding both makes sense. I’ll keep the current Then card as it is (so it stays in standard Flows) and add a second Then card for Advanced Flow that returns the export as tags. The Content tag will also be added to the When card The timeline was exported, and Tab will be added as separator.

For daily exports I’ll add a “yesterday” period. “The last 24 hours” depends on exactly when the Flow runs, so you could get small gaps or overlaps. “Yesterday” covers the whole previous day, so every notification ends up in exactly one export.

SMTP with attachments isn’t planned for now, as I want to keep the app slim, and attachments really belong in a mail app. So suggesting it to the Email Sender developer is a great idea!

I’ll post here when the new test version is ready. - 30 min or so

Thank you kindly good sir :saluting_face: very productive and greatly appreciated :smiley:

Update: v1.2.0 – Content tag, Tab separator and “yesterday”

Thanks to @Drako74 for the ideas! v1.2.0 is now available as a test version:

What’s new

  • Content tag on the When card The timeline was exported. It holds the whole export as text, for example to send with the plain text card in Email Sender
  • New Then card for Advanced Flow: Export the timeline as [format] for [period] and return it. It gives the links and the content directly as tags. The original Then card is unchanged, so it still works in standard Flows
  • Tab as CSV separator. Paste the content from an email straight into Excel or Google Sheets and the data lands in columns
  • “Yesterday” as period: the whole previous day (00:00–23:59 in your Homey’s time zone), so daily exports never overlap or leave gaps

Daily backup example

  1. When the time is 00:05 → Then Export the timeline as CSV for yesterday
  2. When The timeline was exported → Then Email Sender (plain text) with the Content tag

How large can it get?

In my tests a busy day was 56 notifications (about 8 KB), and the whole timeline, 250 notifications (about 44 KB), also went through fine as a tag.

It looks like Homey only keeps the latest 250 notifications and removes the oldest. On a busy day that’s only 4–5 days of history, so a daily export is a good way to keep a longer record.

Privacy

The timeline can be quite personal (when you leave home, motion, alarms). Links expire, but the Content tag in an email stays in the mailbox, so think about who you send it to.

Feedback is very welcome, here or on GitHub: Issues · DrChip666/dk.timelineexport.DrChip666 · GitHub

Flow created and tested with the new version and it works an absolute treat :ok_hand::smiley:

Thank you kindly good sir :saluting_face:

Update: v1.2.1 – no more “full access” warning

After feedback from the Homey review team, the app no longer asks for full access to your Homey, so the warning “This app can manage your entire Homey” is gone when you install it.

What this means for you:

  • The app now always reads the timeline with your personal API key. If you already added one in the app settings, nothing changes
  • If you haven’t: create a key in the Homey Web App under Settings → API Keys, give it access to read notifications only, and paste it in the app settings
  • The key is stored only in the app’s settings on your own Homey and is never sent anywhere else
  • The app does not work on Homey models older than Homey Pro (Early 2019), as personal API keys are not available there

v1.2.1 has been submitted for review. Test version: Timeline Export | Homey