[HomeyScript] Regular system overview by email with a change summary

[HomeyScript] Schedule a system overview by email and include a summary of what has changed

TL;DR: A HomeyScript (v1.5.6) that emails you a clean HTML overview of your whole Homey system: apps, flows, devices, Z-Wave, Zigbee, backup/storage/memory health, moods, alarms, and more, with a “Summary & Actions” section up top that only shows what changed since the last run (new broken flows, apps that started crashing, WiFi drops, throttling, a firmware update, a stale backup, etc.), so you don’t have to read the whole report every time. No recipient hardcoded; you set your email via a flow argument.

Script + setup instructions: see below

Hi all,

I wanted a quick way to keep an eye on my Homey Pro without manually clicking through apps, flows, and devices every week, so (together with Claude :wink: ) I put together a HomeyScript that builds an HTML “system overview” and emails it to me. Since it’s grown into something reasonably polished, I figured it might be useful to others too.

What it does

  • Pulls together everything HomeyScript can see: system info & uptime, update availability, last backup, storage & memory usage, throttling/under-voltage status, users, apps (incl. channel and disabled/crashed breakdown), basic + advanced flows, logic variables, HomeyScript scripts, devices (virtual, infrared, other, group devices), moods, alarms, Z-Wave, and Zigbee.
  • Builds a clean HTML report (table of contents, collapsible-feeling sections, back-to-top links) and emails it to you via any app that provides a “send email” flow action card.
  • The best part, in my opinion: it remembers the previous run’s state (in a logic variable it manages for you) and puts a “Summary & Actions” section at the top with just what changed: new broken or disabled/crashed flows and apps, WiFi/Ethernet/throttling status changes, new users added, devices added/removed, a firmware update or Homey rename, a stale backup, and so on. Item names are shown in bold, so you know exactly what to look at without reading the whole report every time.
  • Runs whenever you want: daily, weekly, whatever your own flow trigger dictates. It doesn’t assume a schedule.
  • A setting to send a short Summary-only email on runs where nothing changed, and only include the full detail report when something actually needs attention.
  • A couple of settings near the top you’ll likely want to change: your fallback email address and your timezone (so the date/time in the email matches your local time rather than the sandbox’s default).

What it looks like

What you need

  • A Homey :slight_smile: (Homey Pro, or Homey Self-Hosted).
  • The HomeyScript app.
  • Any app that provides a “send email” flow action card. I use the “Email Sender” app, but anything with a sendmail-style card works (or a small tweak if yours differs; see the gist’s README).
  • A basic flow: time trigger → “Run script with argument” → your email address as the argument. That’s it: no recipient hardcoded in the script itself, so it’s easy to reuse.

Where to get it

Feedback welcome

I’ve been running this for a while and it’s caught a few things I would’ve otherwise missed (a flow that quietly broke, an app that started crashing after an update). If you spot something odd for your setup, or have ideas for what else would be worth surfacing in the summary, let me know; happy to keep improving it.

Nice start of a wrapper for the overview script from Caseda

Okay, not wrapper but adaptation. Would like it to be more compact. Some listings cry for multi columns.

Thanks for the remark! I will check if I can integrate some of Caseda’s output that is now lacking in my overview.
My primary goal with this script is to track and record changes, not necessarily to send the overview.
I may include an option to include the detailed overview only in case of a change, to keep things clean and simple.

Updated to v1.1 with your remarks. Thanks again!

Tried your script. It always says: first run.
Am using a homey pro 2023

Thanks for reporting this, indeed a bug.

The comparison snapshot (a Logic variable the script manages called Overview_previous_snapshot) was only ever updated if it already existed (like on my Homey), but the script never actually created it in the first place. So on a fresh install it never got created, the snapshot was never saved, and every run started from scratch and reported “first scan”.

Fixed in v1.1.1 (link updated in the first post). If you update to the new version: the very next run will still say “first scan” (since there’s genuinely nothing to compare against yet at that point), but the run after that should correctly show a comparison.

Let me know if it works for you now.

Your fix worked.

Hi

I’m having an issue where the Manual and automatic when run dont apper to send the email, the end of the script says it sent it to my email address.

I’m using emil sender and a gmail email account and when i use the test settings in email sender i get the test email.

I changed the default email to my gmail address i also followed the instructions to creat a flow to trigger the script and i put my email into the argeument.

I’m not sure if ive missed something btw

Please read app page info @ app store, Jason :wink:

Here’s a direct link for you to create the needed Gmail “app password”:
https://support.google.com/accounts/answer/185833?hl=en

Ive managed to do that before i started seting up the script.

It’s now working so i take it something hadent updated or saved..

Glad it’s working now!
But your remark triggered me to add an extra check. So, I’ve just pushed v1.1.2, which at least makes sure the script reports an error if Email Sender does hand one back, instead of silently saying “sent” either way.

My five cents:
When you compare unreachable zwave nodes you don‘t list them. On compare of removed/ added zwave devices the list is a continous comma seperated list like:
…scan:Plug 1, Device door! ….
Guess the other lists have same layout, or? I prefer a bit easier readable listing.
And when I use the flag: don’t show battery zwaves the log says: none though it should be at least: not listed. Better skip the header too.

Thanks for your feedback. Fixed all your points in v1.2.0:

  1. Unreachable Z-Wave nodes now list which nodes, not just a bare count. Same fix applied to “unknown type” nodes.
  2. Names in the Summary now show as a proper bulleted list instead of one comma/and-joined sentence, so should be much easier to scan.
  3. The battery-devices header (and every other toggle-gated header/list in the report) is now skipped entirely when its setting is off, instead of staying visible with a misleading “— none —”. While fixing this I found the same bug also silently affected the comparison logic for several other categories (not just the on-screen display), so that should be fixed too.

Let me know if anything still looks off.

Looks good.

@DGalama Thanks for a very usfull script, but also so very clear instructions

Nice.
But the email option does not work here… I installed the “send mail” app and test mails arrive ( telenet)
But it looks like no other mails seem to work.
I guess that is not the problem of your script. Suggestions for other options besides email?

Indeed probably nothing to do with the HomeyScript. Have you checked the Troubleshooting section in the README? Also, have your seen this comment by Peter_Kawa?

And of course, you can always run the script in the Homey app in your browser and check the output there.

I had the same problem, what fixed it for me is to first restart the “Send mail” app after saving the correct settings.

Does it work when you define the correct fallback email address in the script and don’t use the email as argument in the Homeyscript flowcard?

Near the top of the script, find this line:

const DEFAULT_MAIL_TO = 'your.email@example.com';

Replace your.email@example.com with your own email address, leave the single quotes around it.