SmartHub: an OpenClaw chat layer for controlling and configuring Home Assistant

Hi everyone,

I’ve been building a project called SmartHub. It is an OpenClaw-based chat layer on top of Home Assistant, so I can control devices, check state, and create automations from a normal messaging app instead of always using the HA UI or editing YAML.

This is not meant to replace Home Assistant. HA stays the source of truth and the actual device/control layer. SmartHub sits above it and lets an AI agent talk to HA through structured tools.

High-level flow:

Discord / Telegram / WhatsApp / Feishu
        |
        v
OpenClaw agent
        |
        v
ha-mcp structured tools
        |
        v
Home Assistant
        |
        v
Devices, entities, automations, integrations

What it can do today:

  • control devices from chat, e.g. turn off the living room lights
  • check state, e.g. what devices do I have? or why is the bedroom so hot?
  • create automations from natural language, e.g. turn off the TV at 3pm every day
  • guide integration setup flows, including OAuth/config-flow steps
  • maintain device-specific notes in plain markdown skill files
  • run on top of a normal HA Docker setup

The main thing I focused on is safety. I do not want an AI agent to have unrestricted write access to my home.

So persistent or destructive actions require explicit confirmation:

  • creating/modifying/deleting automations
  • adding/removing integrations
  • removing or renaming devices/entities
  • restarting/reloading HA
  • restoring backups
  • downloading HACS repositories

There are two layers:

  1. The agent instructions require a summary and confirmation before persistent changes.
  2. A deterministic PreToolUse approval hook blocks the actual destructive tool call unless the user’s latest message is an explicit confirmation like yes, confirm, ok, etc.

Normal non-persistent actions like turning on a light, setting the AC temperature, or reading sensors do not require confirmation.

The other part I’m experimenting with is the skill-file approach. Device quirks live in markdown files under tools/, for example:

  • Xiaomi Home integration notes
  • Xiaomi TV quirks
  • AC command examples
  • automation creation workflow
  • service/domain references

The idea is that the agent should learn the local home setup over time instead of treating every device as a generic entity.

Current caveats:

  • It is early and mostly tested on my own Home Assistant setup.
  • It currently assumes OpenClaw and an LLM provider are configured.
  • Home Assistant stays local, but prompts may go to the model provider unless you configure OpenClaw with a local model.
  • Simple commands still have too much latency because they go through the LLM path.
  • The installer is designed around Docker-based HA setups, so HA OS / Supervised users may need changes.

I would really like feedback from HA users on a few specific things:

  • Would this safety model be enough for you to trust it with your own HA instance?
  • Which HA actions should always require confirmation?
  • Does the markdown skill-file approach make sense, or should device/routine knowledge be structured differently?
  • How would you route simple commands like turn off the lights without paying the full LLM latency cost every time?
  • If you use HA Assist today, what would this need to do differently to be worth using?

Repo:

Demo / landing page:

I’m not trying to pitch this as finished. I’m sharing it because I’d like technical feedback from people who actually run Home Assistant and understand where this kind of thing can go wrong.

2 Likes

Hi Tommy! Tring to build something similar. I got a Rb Pi that i set Home Assistant on. Got my OpenClaw and Pi connected thru Tailscale, and trying to use Home Assistant REST API to connect the devices/integrations. Will be taking a look at your repo!