Smart Home

Lesson 2 of 5

Connecting Your Smart Hub

Estimated time: 7 minutes

Connecting Your Smart Hub

OpenClaw doesn't talk to your light bulbs directly — it talks to your smart home hub, which handles the device communication. In this lesson, you'll connect OpenClaw to Home Assistant or SmartThings.

Choose your hub integration

Home Assistant is the most popular open-source hub. If you're running it on a Raspberry Pi, NUC, or in Docker, you're ready to go.

First, create a Long-Lived Access Token in Home Assistant:

  1. Go to your HA dashboard
  2. Click your profile (bottom-left)
  3. Scroll to Long-Lived Access Tokens
  4. Click Create Token, name it "OpenClaw"
  5. Copy the token — you won't see it again

Now install the Home Assistant skill:

openclaw skill add home-assistant \
  --url "http://homeassistant.local:8123" \
  --token "YOUR_LONG_LIVED_TOKEN"

Network access

OpenClaw needs to reach your Home Assistant instance. If you're running HA locally, make sure the Gateway is on the same network. For remote access, use your Nabu Casa URL or a reverse proxy with HTTPS.

Verify the connection

Check that OpenClaw can see your devices:

List devices
openclaw chat 'List all my smart home devices'

You should see something like:

🏠 Connected Devices (14 found)

Living Room:
  💡 Living Room Lights — Philips Hue (on, 80%)
  🌡️ Living Room Thermostat — Nest (72°F, cooling)
  📺 Living Room TV — Samsung (off)
  🪟 Living Room Blinds — IKEA (open)

Bedroom:
  💡 Bedroom Lights — Hue (off)
  💡 Bedside Lamp — Hue (off)

Kitchen:
  💡 Kitchen Lights — Hue (on, 100%)
  🔌 Coffee Maker — Smart Plug (off)

Garage:
  🚪 Garage Door — MyQ (closed)

Outdoor:
  💡 Porch Light — Hue (on)
  📷 Front Door Camera — Ring (armed)

Missing devices?

If devices are missing, they may not be exposed to the API. In Home Assistant, check Settings > Devices & Services > your integration > "Expose entities." In SmartThings, ensure devices are assigned to rooms in the app.

Test basic commands

Try controlling individual devices:

Turn off lights
openclaw chat "Turn off the kitchen lights"
✅ Kitchen Lights — turned off
Set thermostat
openclaw chat "Set the thermostat to 70 degrees"
✅ Living Room Thermostat — set to 70°F (was 72°F)
Check status
openclaw chat "Is the garage door open?"
🚪 Garage Door — Closed
  Last changed: 2 hours ago

Name your rooms and devices

OpenClaw uses the room and device names from your hub. If they're confusing (like "Light Strip 3"), rename them in your hub or create aliases:

openclaw chat "Create device aliases:
- 'Light Strip 3' → 'TV backlight'
- 'Smart Plug 2' → 'Coffee maker'
- 'Sensor 1' → 'Front door motion sensor'"
✅ 3 aliases created

Now you can say:
  "Turn on the TV backlight"
  "Turn on the coffee maker"
  "Any motion at the front door?"

Good naming makes natural language commands work much better.

Set up device groups

Group devices that you often control together:

Create group
openclaw chat "Create a group called downstairs-lights that includes the living room lights, kitchen lights, and hallway lights"

Now you can control them all at once:

Group command
openclaw chat "Turn off all downstairs lights"
✅ Downstairs Lights — all off
  • Living Room Lights — off
  • Kitchen Lights — off
  • Hallway Lights — off

If you have devices on both platforms, install both skills:

openclaw skill add home-assistant --url "http://homeassistant.local:8123" --token "HA_TOKEN"
openclaw skill add smartthings --token "ST_TOKEN"

OpenClaw merges the device lists. If there's overlap (same device on both), it prefers Home Assistant for local control speed.

Your smart home token gives OpenClaw full device control. Keep it secure:

  • Never share your OpenClaw config file
  • Use a dedicated token (not your main HA login)
  • In Home Assistant, limit the token's entity access if possible
  • Consider setting OpenClaw to read-only mode for sensitive devices (locks, security)
openclaw config set home-assistant.readonly-devices \
  "front_door_lock,security_system"

What You Have So Far

OpenClaw is now connected to your smart home hub and can:

  • List all your devices and their current status
  • Control individual devices with chat commands
  • Group devices for bulk control

In the next lesson, you'll create scenes — multi-device presets triggered by a single word like "movie night" or "good morning."

Knowledge Check

Why does OpenClaw connect to a smart home hub instead of directly to individual devices?