Your Smart Home Doesn't Need the Cloud — Mine Almost Doesn't (OpenClaw + Home Assistant + Raspberry Pi 5
Your Smart Home Doesn't Need the Cloud —
Mine Almost Doesn't
OpenClaw + Home Assistant on a Raspberry Pi 5. The brain is local. The AI API isn't — and that's okay. Here's what it can actually do.
Setting Up the Home Assistant Skill
This guide assumes OpenClaw is already installed as a HAOS add-on with Telegram working. Start with Part 1 first — it covers installation, security, and the initial setup.
Open the SSH terminal (via the Advanced SSH add-on or the OpenClaw web terminal) and run:
root@openclaw:/# npx clawhub search home assistant home-assistant Home Assistant (3.721) home-assistant-clawbradge Home Assistant Clawbridge (3.524) home-assistant-agent-secure Home Assistant Agent (Secure) (3.446)
Three main options appear. Here's why we pick home-assistant:
| Skill | Approach | Verdict |
|---|---|---|
home-assistant | Direct REST API — full control, bidirectional webhooks | ✅ Best choice |
home-assistant-clawbradge | ClawBridge API middleman — adds an extra dependency | ⚠️ Avoid |
home-assistant-agent-secure | Routes through HA's own NLU — limits what Claude can understand | ❌ Too restrictive |
root@openclaw:/# npx clawhub --workdir /config/clawd install home-assistant
If it says Already installed — it may have been pulled in automatically. That's fine, move to Step 3.
- Click your profile avatar — bottom left of the HA sidebar
- Scroll to the bottom → Long-Lived Access Tokens
- Click Create Token → name it
openclaw - Copy the token immediately — it's shown only once
Anyone with this token can control every device in your home. Store it securely — never paste it in forums or commit it to git. If accidentally exposed, delete it immediately in HA and create a new one.
root@openclaw:/# mkdir -p ~/.config/home-assistant root@openclaw:/# cat > ~/.config/home-assistant/config.json << 'EOF' { "url": "http://192.168.x.x:8123", "token": "YOUR_TOKEN_HERE" } EOF
Replace 192.168.x.x with your Pi's local IP address.
localhost refers to the Docker container, not the Pi. http://supervisor/core rejects long-lived user tokens with a 401. Use your Pi's actual local IP address — e.g. http://192.168.1.x:8123. Set a static DHCP lease in your router so this IP never changes.
root@openclaw:/# chmod +x /config/clawd/skills/home-assistant/scripts/ha.sh root@openclaw:/# export PATH="$PATH:/config/clawd/skills/home-assistant/scripts" root@openclaw:/# echo 'export PATH="$PATH:/config/clawd/skills/home-assistant/scripts"' >> /etc/environment root@openclaw:/# ha.sh info {"message":"API running."}
API running means you're connected. If you get a 401, the token is wrong — generate a new one in HA.
By default OpenClaw's tool profile is set to messaging — which intentionally limits the agent to chat-only. For a home assistant that actually does things, switch it to full:
root@openclaw:/# openclaw config set tools.profile full
Then restart the add-on from Home Assistant → Apps → OpenClaw Assistant → Restart. This loads the home-assistant skill and full tool access into the agent's context.
Skills are loaded into the agent's context at startup. Installing mid-session doesn't make them available until the next restart — this is the single most common "why isn't my skill working" question.
Claw In Action — Real Conversations
๐ง Humidity: 25.0%
Pretty comfortable temp, though 25% humidity is on the dry side. ๐️
A standard HA dashboard returns 23.8. Claw returns 23.8°C — dry side for your region ๐️. The AI layer adds context and judgment, not just raw data.
No confirmation prompt for routine home control — Claw executed immediately. The safe-exec approval workflow is smart enough to classify HA service calls as low-risk. Asking "are you sure you want to turn on the lights?" every time would be exhausting.
✅ Enabled (36)
- Morning Routines, Before Sleep, Lets Sleep
- AC Auto (above/below threshold)
- Robot Vacuum (start, stop, recharge, low battery)
- Presence Detection (on/off, proximity)
- PC Control (turn on/off, monitors ready)
- Weather Announce, Rain Sound, Play Melody
- Weekly Cleaning Schedule
- + 25 more...
❌ Disabled (1)
- Vacuum Charging Off
| ๐ฅ Wall Socket 2 | 153.6 W |
| ๐ฅ PC Socket | 74.2 W |
| ๐ฅ Mini Fridge | 49.5 W |
| 4 Main Monitor | 38.5 W |
| 5 Second Monitor | 12.9 W |
| 6 Vacuum Socket | 7.8 W |
Total tracked: ~337 W
Wall Socket 2 is the biggest draw at 153.6W — do you know what's plugged into it? Might be worth investigating if that's unexpectedly high.
Claw didn't just list the numbers. It noticed an anomaly — one socket drawing significantly more than expected — flagged it, and asked a follow-up question. That's genuine reasoning over your home's data, not a dashboard query.
Honest Limitations
The AI reasoning (Claude Sonnet 4.6) runs on Anthropic's cloud API. Your home data, automation names, and sensor readings are sent to Anthropic's servers for each query. The execution is local — the thinking is cloud. If privacy is a hard requirement, look at local models via Ollama instead of the Anthropic API.
Claw is reactive, not proactive by default. It responds when you message it. It doesn't automatically know when motion is detected or a door opens — unless you set up HA webhooks to push events to OpenClaw. That's a more advanced setup not covered here.
Each conversation starts fresh. Claw doesn't remember that you asked about the vacuum last Tuesday. The memory skill helps but requires the agent to explicitly save things — it doesn't happen automatically.
Claw finds entities by name. If your entities have cryptic auto-generated names like switch.j65152198_97f0_socket_1 it will struggle to map natural language to the right device. Rename your entities in HA to human-readable names — it makes a huge difference.
Every Telegram message is an API call to Anthropic. Light use (a few queries a day) costs pennies. Heavy use — asking for status updates every few minutes — adds up. Set a monthly spend limit in the Anthropic console.
Switching to full tool profile gives Claw shell access, file read/write, web fetch, and more — not just HA control. The safe-exec skill adds an approval layer for dangerous commands, but be aware of the expanded surface area. Don't share your Telegram bot with others once this is enabled.
Think of Claw as a very capable assistant who can see and control your smart home — but needs to be asked. It's not an autonomous agent watching everything in real time. It's a brilliant responder that has full access when you engage it.
Commands to Try on Telegram
You don't need to know that the vacuum is vacuum.cleaning_bot. Just say "start the robot vacuum" and Claw figures out the right entity. The more human-readable your HA entity names are, the better this works.
Lessons Learned
localhost doesn't work — use your Pi's IP. Inside the Docker container, localhost refers to the container itself. http://supervisor/core rejects long-lived user tokens with a 401. The correct URL is your Pi's local IP: http://192.168.x.x:8123. Set a static DHCP lease in your router so it never changes.
tools.profile must be set to "full" for the HA skill to work. The default messaging profile intentionally limits the agent to chat-only — no exec, no file access, no HTTP calls. This is a deliberate safety default, not a bug. Switch to full after you've secured the bot (Telegram allowFrom, dmPolicy pairing).
ha.sh isn't in PATH by default. The skill installs to /config/clawd/skills/home-assistant/scripts/ha.sh but doesn't add itself to PATH. You need to chmod +x it and add the scripts directory to /etc/environment manually.
The agent may claim it can't make HTTP requests even after the skill is installed. This is a tool profile issue — the agent was running under messaging profile mid-session. After switching to full and restarting the add-on, the confusion resolves. Always restart after changing the tool profile.
No confirmation prompt for home control — this is correct. Safe-exec's risk model classifies HA service calls (turn on lights, start vacuum) as LOW risk and executes immediately. Only dangerous shell commands (rm -rf, disk operations) trigger an approval request. This is the right behaviour for a home assistant.
Entity naming in HA directly affects how well Claw understands commands. Auto-generated entity IDs like switch.j65152198_97f0 confuse the agent. Rename your entities and devices in HA to human-readable names — switch.pc_power, switch.kitchen_speaker etc. It takes 10 minutes and makes a huge difference.
Claude adds context, not just data. Asking "what's the humidity?" returns a number from any dashboard. Asking Claw returns the number plus a comment about whether it's comfortable, dry, or unusual for your climate. This contextual reasoning is the actual value-add of the AI layer over standard HA dashboards.
Power anomaly detection emerged naturally. We didn't ask Claw to flag anomalies — we asked for a power ranking. It noticed one socket drawing significantly more than others and flagged it unprompted. This kind of emergent reasoning is what makes the setup genuinely useful rather than just a voice-controlled dashboard.
Push HA events to Claw — motion detected, door opened, automation triggered. Makes Claw proactive, not just reactive.
Schedule a morning briefing — weather, calendar, power overnight, vacuum status — delivered to Telegram automatically.
Have Claw remember your preferences — "I like the AC at 22°C when I'm working" — and apply them proactively.
If you have IP cameras, pull a snapshot to Telegram on demand — or automatically when motion is detected.
Comments
Post a Comment