A complete setup guide for controlling your home automation devices through Claude in mai-tai mode using Home Assistant.
This setup allows you to control your home devices by simply messaging Claude. No manual commands needed - just natural language requests like "turn on the living room lights" and Claude handles the rest.
- Home Assistant: Running in Docker, handles device discovery and control
- WeMo Integration: Auto-discovers WeMo switches on your local network
- Chromecast Integration: Auto-discovers Google Home speakers and Chromecasts
- Python Control Script: API client for programmatic control
- Claude Mai-Tai Mode: Async communication layer for remote control
- โ 9 WeMo Smart Switches
- โ 6 Google Home/Chromecast devices
- โ MyQ Garage Door (via MyQ app - third-party blocked)
- Office Lamp
- Universe lights
- Living Room Light Two
- Pine Tree
- Tall Livingroom Light
- mini light
- Basement Lamp
- Living Room Light
- Front Room Lights
- Basement TV
- Ava speaker
- Living room speaker
- Kitchen speaker
- living room speakers (group)
- Living room TV
- Docker & docker-compose installed
- Python 3 with
requestslibrary - WeMo devices on the same network
- Access to Home Assistant web interface
- Clone or create the project directory:
mkdir ~/home_auto
cd ~/home_auto- Create docker-compose.yml:
version: '3.8'
services:
homeassistant:
container_name: homeassistant
image: homeassistant/home-assistant:latest
restart: unless-stopped
network_mode: host
environment:
- TZ=America/New_York
volumes:
- ./config:/config
privileged: true- Start Home Assistant:
docker-compose up -d- Access Home Assistant:
- Open http://192.168.86.39:8123 (or your server IP)
- Complete the onboarding wizard
- Create an account
- Devices should auto-discover
- Generate API Token:
- Click your profile (bottom left)
- Scroll to "Long-Lived Access Tokens"
- Create token named "Claude Control"
- Save to
.envfile:
echo 'HA_TOKEN=your_token_here' > .env- Install Python dependencies:
pip install requestsYou: start mai-tai mode
Claude: Mai-tai mode activated! What would you like me to work on while you're away?
You: I'd like you to control my home automation
Lights:
- "Turn on the living room lights"
- "Turn off all switches"
- "Turn on the office lamp"
- "Toggle the pine tree"
Information:
- "What devices do I have?"
- "Show me what's currently on"
- "List all my devices"
Media Players (future capabilities):
- "Play music on the kitchen speaker"
- "Pause the living room TV"
- "Set volume to 50% on Ava speaker"
- You send a message to Claude via mai-tai
- Claude interprets your request
- Claude executes the
control.pyscript with the appropriate command - Home Assistant API executes the command
- Your device responds
- Claude confirms the action
home_auto/
โโโ docker-compose.yml # Home Assistant Docker config
โโโ control.py # Python API control script
โโโ requirements.txt # Python dependencies
โโโ .env # API token (gitignored)
โโโ .env.example # Token template
โโโ README.md # Setup documentation
โโโ config/ # Home Assistant data (auto-created)
The control.py script can be used manually or by Claude:
# List all devices
python3 control.py list
# Turn on a device
python3 control.py on "living room"
python3 control.py on switch.office_lamp
# Turn off a device
python3 control.py off "basement lamp"
# Toggle a device
python3 control.py toggle "pine tree"The control script uses Home Assistant's REST API:
- GET
/api/states- List all entities - POST
/api/services/homeassistant/turn_on- Turn on device - POST
/api/services/homeassistant/turn_off- Turn off device - POST
/api/services/homeassistant/toggle- Toggle device
HA_TOKEN=your_long_lived_access_token_here- Ensure devices are on the same network
- Check network connectivity:
ping <device_ip> - Restart Home Assistant:
docker-compose restart - Manually add integration in Settings โ Devices & Services
# Verify token is set
echo $HA_TOKEN
# Check Home Assistant is running
docker-compose ps
# Test API manually
curl -H "Authorization: Bearer $HA_TOKEN" \
http://localhost:8123/api/states# Check logs
docker logs homeassistant --tail=50
# Verify port is listening
netstat -tuln | grep 8123
# Restart container
docker-compose restart- Automation Rules: Time-based or condition-based automations
- Scenes: Pre-configured device states (e.g., "Movie Mode", "Goodnight")
- Zigbee/Z-Wave: Add USB dongle for more device types
- Local Garage Control: ratgdo device for MyQ integration
- Voice Control: Integration with Google Assistant/Alexa
- Mobile Dashboard: Home Assistant mobile app access
- Energy Monitoring: Track power usage of WeMo switches
- Notifications: Push notifications for device state changes
Currently discovered but not yet fully integrated:
- Play/Pause/Stop controls
- Volume control
- Media source selection
- Speaker grouping
- TTS announcements via Google Translate
- Uses
network_mode: hostfor UPnP/SSDP discovery - WeMo devices require same subnet for auto-discovery
- Home Assistant accessible at http://SERVER_IP:8123
- API token is like a password - keep it secret
- Token stored in
.env(add to.gitignore) - Home Assistant runs on local network only
- No cloud connection required
Chamberlain (MyQ owner) blocked third-party integrations in late 2023. Options:
- Continue using MyQ iOS app
- Purchase ratgdo device (~$30) for local control
- Wait for community workarounds
- Home Assistant Documentation
- WeMo Integration
- Chromecast Integration
- Home Assistant API
- Docker Installation
Device Summary:
- WeMo Switches: 9
- Media Players: 6
- Total Controllable Devices: 15
- Platform: Docker on Linux
- Network: 192.168.86.0/24
- Access URL: http://192.168.86.39:8123
Created: January 1, 2026 Author: Claude (Anthropic) via Mai-Tai mode User: jmcdice (Joey) Status: โ Operational