Smart Home Control: OpenClaw + Home Assistant
Integrate Home Assistant with OpenClaw for AI-powered smart home control. Voice commands, automation routines, energy monitoring, and device management.
Prerequisites
OpenClaw installed and running · Home Assistant instance running (local or remote) · Home Assistant admin access
Smart Home Control: OpenClaw + Home Assistant
Imagine walking into your home and saying "I'm home" and having your lights adjust, music play, temperature set, and doors unlock—all based on your preferences. This is possible when you connect OpenClaw to Home Assistant. Instead of separate apps for lights, temperature, security, and music, you have one unified AI that orchestrates everything through natural conversation.
Why OpenClaw + Home Assistant?
Home Assistant is the de facto open-source smart home platform. OpenClaw adds AI to it.
Without OpenClaw: You tap individual app icons for each device. "Adjust light to 60%," "Set temperature to 72," "Play music," "Lock door." Four separate interactions. With OpenClaw: You say, "Goodnight" and OpenClaw:- Dims all lights to 10%
- Sets temperature to 68°F
- Locks front and back doors
- Closes all blinds
- Disables doorbell notifications
- Activates night mode on security system
All from one command.
Prerequisites & Setup
What You Need
- Home Assistant running (local network or cloud with remote access)
- OpenClaw installed and accessible
- Smart home devices (any brand that Home Assistant supports)
- Admin access to both Home Assistant and OpenClaw
Installing Home Assistant (If Needed)
If you already have Home Assistant running, skip this section.
Option 1: Docker (Easiest)docker run -d --restart=always \
-v /PATH/TO/homeassistant:/config \
-e TZ=America/New_York \
-p 8123:8123 \
--name homeassistant \
homeassistant/home-assistant:latest
Access at: http://localhost:8123
Download Home Assistant OS from homeassistant.io and flash to a microSD card. Works on any Raspberry Pi 4+.
Option 3: Supervised (Linux)Follow the official installation guide at homeassistant.io/installation
Integrating Home Assistant with OpenClaw
Step 1: Generate Home Assistant API Token
- Log into Home Assistant at
http://localhost:8123 - Click your user profile icon (bottom left)
- Scroll to Long-Lived Access Tokens
- Click Create Token
- Name it: "OpenClaw Integration"
- Copy the entire token (long string starting with
eyJ0eXAi...) - Keep this secret—it grants full Home Assistant access
Step 2: Install the Home Assistant Skill in OpenClaw
- Go to Settings > Skills Marketplace
- Search for "Home Assistant"
- Click Install
- Wait for installation (usually 10-20 seconds)
- Once installed, go to Settings > Skills > Installed
- Find "Home Assistant" and click Configure
Step 3: Configure the Home Assistant Integration
A configuration form appears with these fields:
Home Assistant URL: http://192.168.1.50:8123
(If remote: https://yourha.duckdns.org:8123)
API Token: [Paste your long-lived access token]
Device Names: [Auto-populated list of your devices]
Default Zone: Home (for location-based automations)
Enable Voice Control: [Toggle ON]
Temperature Unit: Fahrenheit (or Celsius)
Update Interval: 30 seconds
Fill in each field:
- Home Assistant URL: The address where Home Assistant runs
http://192.168.1.50:8123
- Remote: https://yourname.duckdns.org:8123 (with port forwarding)
- API Token: Paste the token from Step 1
- Device Names: The list of devices in your Home Assistant should auto-populate
- Click Test Connection
If successful, you'll see: "Connected to Home Assistant. Found X devices."
Step 4: Activate the Skill
Toggle the Home Assistant skill to Enabled in your skills list.
Congratulations! OpenClaw can now control your home.
Controlling Devices: Examples
Lights
Turn on/off:"Turn on the living room lights"
"Turn off bedroom lights"
"Turn off all lights"
Brightness:
"Set living room light to 50% brightness"
"Dim the kitchen light"
"Brighten the hallway"
Colors (if RGB bulbs):
"Set bedroom light to red"
"Change kitchen light to warm white"
"Make the porch light blue"
Temperature & Climate
"Set temperature to 72 degrees"
"Turn on the AC"
"Lower the heat by 2 degrees"
"What's the current temperature?"
"Is the AC running?"
Doors & Locks
"Lock the front door"
"Unlock the garage door"
"Check if the front door is locked"
"Lock all doors"
Media & Entertainment
"Play music in the living room"
"Play NPR on the kitchen speaker"
"Pause the TV"
"Volume to 50%"
Blinds & Shades
"Open the living room blinds"
"Close all blinds"
"Set office blinds to 75%"
Multi-Device Scenes
Instead of controlling individual devices, trigger entire scenes:
"Goodnight" → Locks doors, dims lights, sets AC to 68°F
"Movie time" → Closes blinds, dims lights to 5%, sets surround sound
"Movie done" → Restores all settings
"I'm leaving" → Turns off all lights, locks doors, enables security
"I'm home" → Turns on entry lights, unlocks door (if trusted)
Setting Up Scenes in Home Assistant
Scenes are groups of device states that trigger together. Set them up in Home Assistant, then control them with OpenClaw.
Creating a Scene
In Home Assistant:
- Go to Settings > Automations & Scenes > Scenes
- Click Create Scene
- Name: "Goodnight"
- Add devices:
- Bedroom light: Off
- Living room light: Off
- Kitchen light: Off
- Thermostat: 68°F
- Bedroom blinds: Closed
- Click Save
Now in OpenClaw:
"Goodnight" → Activates the Goodnight scene
Common Scenes to Create
Morning- Lights: 100% brightness, warm white
- Music: Radio starts playing
- Coffee maker: Turns on
- Temperature: 70°F
- Curtains: Open
- Lights: 75% brightness
- Music: Off
- Door locks: Enabled
- Thermostat: Set to eco mode
- All non-essential devices: Off
- Lights: 10% brightness, red accent lighting
- Curtains: Closed
- Door locks: Enabled
- TV: On, HDMI input set
- Surround sound: Activated
- All lights: Off
- Door locks: All locked
- Temperature: 68°F
- Security system: Armed
- Guest notifications: Silenced
- All lights: Off
- All doors: Locked
- Thermostat: Eco mode (68°F)
- Security cameras: Recording
- Door sensors: Armed
Voice Automation Workflows
Combine multiple commands into a single voice automation:
Voice Command: "I'm Going to Bed"
When you say this to OpenClaw:
Actions:
1. Set all lights to 5% brightness (mood lighting)
2. Lock all doors
3. Check all doors/windows are closed (notify if not)
4. Set temperature to 66°F
5. Close all blinds
6. Disable exterior lights
7. Activate "Do Not Disturb" on phone
8. Say: "Goodnight. Doors locked, temperature set, sleep well."
Voice Command: "Movie Time"
Actions:
1. Close all living room blinds
2. Dim lights to 15%
3. Set accent lighting to red
4. Turn on TV
5. Switch to streaming app input
6. Activate surround sound
7. Set temperature to 72°F (for comfort during long movie)
8. Lock doors (for security during movie)
9. Mute doorbell notifications
Voice Command: "I'm Leaving"
Actions:
1. Turn off all lights
2. Lock all doors
3. Close all blinds
4. Set temperature to eco mode (68°F)
5. Arm security system
6. Check that all doors/windows are locked
7. If any door unlocked: Alert user "Garage door is open"
8. Enable security camera recording
9. Send confirmation: "Home secured, cameras armed"
Energy Monitoring & Optimization
Use OpenClaw to understand and optimize your home's energy consumption:
Track Energy Usage
Ask OpenClaw:
"What's our current energy usage?"
"Which device is using the most power?"
"Show energy usage by room"
"What was our power bill last month?"
OpenClaw reads data from Home Assistant sensors and presents it naturally.
Optimization Automations
Create automations that reduce energy waste:
Automation: "Off-Peak Energy Saver"
Trigger: Time = 11pm (off-peak hours start)
Actions:
1. Set water heater to maximum (cheaper power)
2. Schedule charging of EV for overnight (off-peak rates)
3. Pre-cool house to 70°F (use off-peak power for AC)
4. Notify: "Off-peak hours started. Running energy-optimized schedule."
Automation: "Peak Hours Conservation"
Trigger: Time = 2pm (peak hours, expensive power)
Actions:
1. Reduce AC from 72°F to 74°F
2. Disable non-essential devices (pool pump, water heater)
3. Defer dishwasher run to evening
4. Notify: "Peak hours active. Running conservation mode."
Security & Access Control
Controlling Who Can Do What
Set granular permissions:
- OpenClaw Settings > Security > Smart Home Permissions
- Set rules:
- Arm/disarm security: Require authentication
- View camera feeds: Allow
- Control lights: Allow
- Save
Audit Trail
Every action through OpenClaw is logged:
- Settings > Audit Log
- Filter: "Smart Home"
- See every device control with timestamp and who initiated it
This is critical for security—you can detect unauthorized access.
Disable Remote Control During Vacation
For added security while away:
- Create automation: "Vacation Mode"
- Triggers: When all family members marked "Away" for >24 hours
- Actions:
- Restrict light control to security-relevant scenes only
- Enable camera recording with cloud backup
- Alert: "Vacation mode activated"
Troubleshooting Home Assistant Integration
OpenClaw Can't Connect to Home Assistant
- Verify Home Assistant is running: Visit
http://localhost:8123 - Check firewall isn't blocking the port
- Verify API token is still valid (tokens can expire)
- Generate a new token and update OpenClaw settings
- Ensure network connectivity between OpenClaw and Home Assistant
Devices Not Showing in OpenClaw
- Devices must be added to Home Assistant first
- In Home Assistant, verify devices appear in Settings > Devices
- If devices are there but not in OpenClaw:
- Refresh OpenClaw dashboard
Voice Commands Not Working
- Ensure Home Assistant skill is Enabled
- Verify device names match exactly (case-sensitive)
- Try alternative commands:
- Try: "Adjust thermostat to 72 degrees"
- Check skill logs: Settings > Logs > Filter: "home assistant"
Delays in Device Response
- Reduce update interval in Home Assistant config (smaller number = faster updates)
- Check network latency between OpenClaw and Home Assistant
- If OpenClaw is on slow VPS, upgrade or optimize other skills
- Simplify automations (fewer actions per command)
Advanced: Custom Device Integrations
Home Assistant supports 1000+ device types. Some advanced examples:
Pool/Spa Management
"What's the pool temperature?"
"Turn on the pool heater"
"Balance pH and chlorine" (if connected to smart pool system)
Solar & Battery Management
"How much solar power are we generating?"
"Store power in battery until 2pm"
"Switch to battery power during peak hours"
Garden/Outdoor
"Water the lawn at sunset"
"Is the soil moisture OK?"
"Run sprinklers for 20 minutes"
Pet Care
"Did Fluffy's feeder dispense food today?"
"Show pet camera feed"
"Is the pet door open?"
Frequently Asked Questions
Q: Does Home Assistant need a fancy setup?A: No. A Raspberry Pi 4 ($75) runs Home Assistant perfectly. Add a few smart bulbs and you have a complete smart home for <$300.
Q: What if I lose internet connection?A: Local automations still work (lights, thermostats, locks). Remote access via OpenClaw requires internet.
Q: Can I use non-Home Assistant devices?A: If they integrate with Home Assistant, yes. Home Assistant supports 1000+ device types.
Q: Is my home secure with remote access enabled?A: Yes, if you follow security practices: strong tokens, rate limiting, audit logs. More secure than most IoT vendor apps.
Q: What if I want to disable OpenClaw access temporarily?A: Go to Settings > Skills > Home Assistant > Disable. OpenClaw can't control anything until re-enabled.
Next Steps
Your home is getting smart. Next, automate your personal productivity:
- Social Media Automation — Extend automation beyond your home
- Email Automation — Get smarter about communications
- Build Your First Custom Skill — Create home automation tailored to your needs