Spatial Context - Trace your home's floor plans and place your real devices on them (Physical context for AI assistants)

I have been using Claude to review, clean-up and manage my smart home for the past 6 months. This included re-building a lot of automations, cleaning up things I have created and then never used, a 70+ device migration from ZHA to Z2M (including migration to SMLIGHT LAN-based co-ordinator), building blueprints for lighting and presence and much more.

Along the way, I found that Claude was asking me for context around device placement (especially stabilising the Zigbee network). So I decided to create this app/integration as a project for myself to see if the idea of providing the AI assistant with this context would help.

I also wanted this app to feel like you are just using another part of HA (specifically not like a default AI look interface that has become popular), so have leaned on the UI elements from HA with a bit of inspiration from Unifi’s InnerSpace application.

This is very early in development so any bug reports, ideas or suggestions are very welcome.

2 Likes

Works great, super intuitive. Please add more design features (like basic furniture, trees etc etc). Could get the floor alignement working neither the zigbee mapping. But great for a version 0.1

1 Like

Spatial Context — v0.3.0-beta.2

A custom Home Assistant integration for tracing your home’s floor plans and placing your real devices on them at true physical positions — giving an AI assistant real spatial context for your home, not just a flat list of entity names. Live Zigbee/Wi-Fi/Matter mesh overlays, plus a Property tab to see every building at a glance.

What’s changed since the first beta (v0.1.0-beta.1):

  • Property tab — place your whole property (a multi-story house, a detached garage, etc.) on a site photo and see how every building relates at a glance
  • Wall thickness — walls now carry a real thickness in cm, with RF attenuation and drawn line width scaling to match once calibrated; added Eastern European block/Poroton material presets
  • Simpler device placement — you place a device, not one of its confusing internal entities; pins now show each integration’s own brand icon
  • Click any mesh line — Zigbee/Wi-Fi/Matter connectivity overlay lines are now click-to-inspect, and links to devices on other floors/buildings draw as directional stubs instead of just vanishing
  • Floor tabs now show your real HA floor icons and remember your pan/zoom per tab
  • Fixed: drawing walls/rooms or placing devices could silently fail entirely on HA installs reached over plain HTTP (not HTTPS)
  • Fixed: Wi-Fi mesh links not resolving for most integrations, and the Zigbee coordinator showing no links at all
  • Docs overhaul — a proper step-by-step Getting Started guide, reorganized README, and refreshed screenshots
  • Plus security audit, and lots of other little bug fixes…

Spatial Context - v0.6.0-beta.1:

Thank you for all the community feedback on Github, lots of fixes and updates:

Quick rundown of what’s landed since v0.3.0-beta.2:

Units & measurements

  • App-wide Metric/Imperial toggle in a new Settings menu — applies instantly, shared by everyone who opens the panel
  • Wall thickness and door/window width now have their own inline cm/m (or in/ft) picker, editable live instead of via a pop-up prompt
  • Doors/windows now render at their own wall’s real thickness, instead of one fixed width for every opening

Drawing usability

  • Drag-and-drop a background image straight onto the canvas
  • Keyboard shortcuts: Esc to cancel, Delete to remove a selection, Enter to finish a wall
  • Live snapping while tracing walls/rooms — onto nearby existing edges, and aligned horizontal/vertical — shown before you click, with a visual guide for closing a shape precisely. Hold Shift to disable it
  • Align Floors’ resize buttons now anchor at the center of your current view instead of silently drifting the image on every click — should make precise alignment much easier

Rooms & devices

  • Room/zone styling is now per-room — visibility, fill color, fill opacity, and border opacity, right on that room’s own panel
  • Fixed: the device picker and map pins could show the wrong icon/name when a helper integration (Dynamic Energy Cost, powercalc, a virtual switch_as_x light, a utility meter, etc.) attached its own entities to another integration’s device
  • Device picker sidebar is now resizable (drag its left edge) and every row shows a full tooltip, not just already-placed ones

Zigbee & Wi-Fi mesh

  • Zigbee mesh results are now cached — opening the mesh layer is instant once warm, instead of a 1-2+ minute scan every time. A new spatial_context.refresh_zigbee_mesh service lets you pre-warm it overnight via automation, and the scan timeout is now configurable in Settings
  • Wi-Fi mesh overlay now supports TP-Link Deco (thanks to a community-contributed patch)

Also

  • A real app icon, replacing the placeholder — sidebar, header, and the “Add Integration” picker
  • A handful of smaller polish fixes: auto-selecting a device right after you place it, no more accidental text-selection while panning, clearer jamb marks on doors/windows, a fixed “wrong target” error on two backend services

Hmm, hadn’t considered trees etc, ill give it some thought. Feel free to add a feature request on GiHub if you are able to.

Floor alignment has been fixed in recent updates I think. Let me know if its now working for you.

Spatial Context update: v0.3 to v0.14

A quick update on HA Spatial Context, the app I built to give Claude real physical context about my home. The last time I posted it was v0.3.0-beta.2, and it’s now at v0.14.0-beta.1. A lot has changed, mostly from using it on my own house and from the feedback and issues people sent in.

Connectivity Map

This is the part I use most. You can overlay live network links on your floor plan, coloured by signal quality:

  • Zigbee (Zigbee2MQTT), with the mesh cached and LQI corrected per device, since chipsets report it differently
  • Wi-Fi, for UniFi, TP-Link Omada and TP-Link Deco
  • Matter/Thread
  • Bluetooth, which is new. It links each BLE device to the ESPHome proxy that hears it best.

Property tab

You can place each building and your outdoor devices (garden lights, gate sensor) on a site photo. As of v0.14 you can also use a live street map or aerial imagery as the background (needs HA 2026.10+).

Easier to use

  • Undo/redo and auto-save
  • Snapping while tracing walls and rooms
  • Drag whole rooms around, with their devices following
  • A searchable icon picker
  • Better mobile layout
  • A built-in debug report if something goes wrong

It’s still beta, and translations aren’t done yet, so it stays beta until they are. Bug reports, ideas and suggestions are still very welcome.