How I built a self-maintaining Homey documentation system with Claude

Written, of course, with the help of Claude…

The problem

When you’re deep in a flow at midnight adjusting a lux threshold or rewiring a logic branch, you know exactly what you’re doing. Six months later, you don’t. Which flows read the Holiday mode variable? What’s the contract between the heating watchdog and the house state flow?

This gets harder as a setup grows. I have 114 flows and over 230 devices, spanning energy management, security, heating, presence, lighting, climate monitoring, audio, and more. Each area is typically several flows working together — reading shared variables, triggering each other, depending on the same physical devices. Some individual flows are substantial pieces of engineering in their own right: the Sleep routine runs to 193 cards; the SolarEdge watchdog to 166. There’s no way to keep a reliable mental model of all of it. I needed documentation.

Not just a list of flows — structured notes explaining how each area of the system actually works: the triggers, the conditions, the logic branches, the inter-flow dependencies, the devices and variables involved.

Documenting everything with Claude

My documentation lives in NotePlan, a markdown notes app that doubles as a personal knowledge wiki. NotePlan has its own MCP server, which means Claude can read, write, and maintain notes directly — it’s how I manage a lot of structured knowledge, and it became the natural home for Homey documentation too.

For Homey access, most users on Claude will reach for the Athom public MCP server. I’m on a team account that doesn’t allow unapproved cloud MCPs, so I had Claude build me a local Node.js MCP server talking to Homey’s local REST API directly. It exposes tools to fetch flows by ID, list variables, list devices, and list zones — enough for Claude to read and understand the full detail of any flow.

Then I created a documentation skill: a structured prompt that guides Claude through documenting one area of the system at a time. For each area it fetches the relevant flows in full, reads through all the cards and arguments, and produces a structured note covering the system overview, each flow in detail, and a dependencies table listing every variable, device, and third-party app involved. Each note also cross-links to related areas — the security note references the house states note, which references the presence note.

The result is 17 notes plus a hub index, covering: energy management, house states, presence and modes, heating (main house and garden room), audio and announcements, lighting (downstairs, upstairs, occupancy/light level, and outdoor), security, Apple TV and media, system and maintenance, notifications, the workshop, guest network, and climate monitoring.

The new problem: drift

Documentation written once becomes wrong. A lux threshold gets tuned. A timer gets adjusted. A flow gets renamed. A new motion sensor gets added to a zone and three flows quietly start depending on it. You refactor how presence detection works and the variable that six other flows read gets replaced by two new ones. Gradually — sometimes suddenly — the notes drift away from reality. With 114 flows across 17 notes, staying on top of this manually is not realistic.

The documentation is genuinely useful when I’m making changes — I’ll often have the relevant note open while I’m editing flows. But then expecting myself to accurately remember and document every change I just made, every time, was never realistic. I needed a system that would come along after me and do it thoroughly and automatically — which sounded like a job for Homey!

Having already been through the documentation process with Claude, I asked it what would make things more efficient and fully automated. That conversation shaped the key design decisions: how to detect changes cheaply without fetching every flow, how to store enough state to make updates surgical rather than wholesale, and how to keep the whole thing observable. Claude designed the full architecture in chat, building directly on what we’d learned from the documentation skill.

The sync system

This part was built in Claude Code, which also updated the local MCP server with the new tools it needed. The solution has three additional pieces. A Homey SDK v3 companion app runs on the Pro and polls Homey’s internal REST API every five minutes. On each poll, it computes a SHA-256 hash of the full card payload for every flow and diffs it against a stored snapshot — catching changed thresholds, timer durations, announcement strings, and variable references at the individual card level. Everything lands in a rolling changelog persisted in Homey settings.

Two new MCP tools expose this: get_changelog returns structured change entries since a given date; list_flows_metadata returns lightweight snapshots for all flows without pulling full card payloads. Each documentation note now carries YAML frontmatter — flow IDs, per-flow hashes, and a last_synced timestamp — so the system knows the exact baseline state when a note was last verified. The system also maintains a flow manifest in NotePlan: a central index mapping every flow ID to its documentation note, with card counts and hashes tracked for every documented flow.

A sync skill ties it together. When I ask Claude to sync, it reads the changelog since the earliest last_synced across all notes, groups changes by documentation note, and presents a plain-English summary for review before touching anything: “Security states: lux threshold 1000->500. Downstairs Hall lights: new motion sensor trigger added.” I can approve, skip, or defer individual items. The result is documentation that reflects exactly what Homey is actually doing right now — without me having to touch it.

The thoroughness comes from the diff quality. Because the companion app captures the exact card-level change at poll time, Claude isn’t guessing what changed — it knows. That’s what makes it possible to update one sentence in one note without disturbing anything else.

Of course, I’m still tinkering. Next up is automating the sync itself using Cowork scheduled tasks so it runs without me having to prompt it at all. I’m also iterating on the documentation format and adding richer cross-referencing between notes — partly for my own navigation when reading them directly, and partly so that when I’m chatting with Claude about my setup, it can move fluently between related areas without losing context.

As an extra bonus on top of this, I’ve now added another end point to my local MCP server which exposes the API of the Simple System Log app so Claude can review logs. This is the basis of a new homey diagnostics skill which uses the logs, the other MCP server features and the documentation in NotePlan to help answer questions and diagnose the cause of weird behaviour

Music to my ears, can you share a screenshot of the documentation… And willing to share this capability?

I just started to create Claude skills (so I can build own apps)

Happy to share. I actually already put my MCP server I a public GitHub repo as it was the easiest way for me to deploy easily to multiple machines and keep them up to date with the latest version. So that’s at GitHub - jmdraper/homey-mcp · GitHub

I don’t want to share my actual docs but I had Claude create an example template based on my current docs - attached.

I haven’t got round to putting the Homey app in a repo yet but will do when I get a moment. Or you can ask Claude to create one to interact with this MCP!

---
flow_ids:
  - 00000000-0000-0000-0000-000000000001
  - 00000000-0000-0000-0000-000000000002
flow_snapshot:
  00000000-0000-0000-0000-000000000001:
    name: "Example flow A"
    enabled: true
    broken: false
    cards: 12
    hash: a1b2c3d4e5f67890
  00000000-0000-0000-0000-000000000002:
    name: "Example flow B"
    enabled: true
    broken: false
    cards: 8
    hash: 0987654321abcdef
last_synced: "2026-05-27T10:00:00Z"
---
# Homey [area] — [topic]
[[Homey Documentation]]

One-sentence description of what this area of automation does and why it exists.

See also: [[Related note A]] (brief description), [[Related note B]] (brief description).

## Contents
- System overview
- Flow: Example flow A
- Flow: Example flow B
- Dependencies
  - Homey apps
  - Homey variables
  - Physical and virtual devices
  - Inter-flow dependencies
  - External dependencies

## System overview
Brief description of the physical setup and how the components fit together: hardware devices, cloud services, key variables or modes the whole system pivots on.

Include a summary table if there are structured concepts (e.g. operating modes, tariff windows, thresholds).

| Mode / state | Description |
|---|---|
| Example mode | What it means and which flows it gates |

## Flow: Example flow A
**Purpose:** One sentence on what this flow does and why it exists.

**Trigger — [trigger description]:** Describe what causes the flow to fire.

**Condition — [condition label]:** Describe the branch condition and what each path does.

**Action — [outcome]:** Describe what the flow does in the happy path.

**Watchdog / edge case:** If the flow has suppression timers, retry logic, or override paths, describe them here. These are often the most important parts to document.

**State written:** List any variables this flow sets that other flows depend on.

## Flow: Example flow B
**Purpose:** One sentence on what this flow does and why it exists.

**Trigger — [trigger description]:** Describe what causes the flow to fire.

**Action — [outcome]:** Describe what the flow does.

## Dependencies

### Homey apps
| App | Version | Used for |
|---|---|---|
| App Name | 1.2.3 | Brief description of which actions/triggers it provides |

### Homey variables
| Variable | Type | Used by | Purpose |
|---|---|---|---|
| variable_name | boolean | Flow A, Flow B | What it represents and why it matters. Flag if written by one flow and read by another — these are the highest-risk dependencies. |

### Physical and virtual devices
| Device | ID | Role |
|---|---|---|
| Device Name | 71e66f94 | Trigger: Motion alarm. Control target: On/off |

### Inter-flow dependencies
| Flow | Depends on |
|---|---|
| Example flow A | Reads `variable_name` set by [[Homey other note]] — must run after that flow has written a value |

### External dependencies
| Dependency | Risk if unavailable or changed |
|---|---|
| Cloud service / API name | Describe what breaks if it's down or its configuration changes |