## Voice Pipeline (P3) - Replace openWakeWord daemon with Wyoming Satellite approach - Add Wyoming Satellite service on port 10700 for HA voice pipeline - Update setup.sh with cross-platform sed compatibility (macOS/Linux) - Add version field to Kokoro TTS voice info - Update launchd service loader to use Wyoming Satellite ## Home Assistant Integration (P4) - Add custom conversation agent component (openclaw_conversation) - Fix: Use IntentResponse instead of plain strings (HA API requirement) - Support both HTTP API and CLI fallback modes - Config flow for easy HA UI setup - Add OpenClaw bridge scripts (Python + Bash) - Add ha-ctl utility for HA entity control - Fix: Use context manager for token file reading - Add HA configuration examples and documentation ## Infrastructure - Add mem0 backup automation (launchd + script) - Add n8n workflow templates (morning briefing, notification router) - Add VS Code workspace configuration - Reorganize model files into categorized folders: - lmstudio-community/ - mlx-community/ - bartowski/ - mradermacher/ ## Documentation - Update PROJECT_PLAN.md with Wyoming Satellite architecture - Update TODO.md with completed Wyoming integration tasks - Add OPENCLAW_INTEGRATION.md for HA setup guide ## Testing - Verified Wyoming services running (STT:10300, TTS:10301, Satellite:10700) - Verified OpenClaw CLI accessibility - Confirmed cross-platform compatibility fixes
7.0 KiB
7.0 KiB
Home Assistant Voice Pipeline Implementation Plan
Created: 2026-03-07 | Phase: 2.1 - HA Voice Pipeline Setup
Current State Summary
✅ Running Services
| Service | Port | Status | Location |
|---|---|---|---|
| Wyoming STT (Whisper large-v3) | 10300 | ✅ Running | Mac Mini |
| Wyoming TTS (Kokoro ONNX) | 10301 | ✅ Running | Mac Mini |
| Wyoming Satellite | 10700 | ✅ Running | Mac Mini |
| OpenClaw Gateway | 8080 | ✅ Running | Mac Mini |
| Home Assistant | 8123 | ✅ Running | Docker (10.0.0.199) |
| Ollama | 11434 | ✅ Running | Mac Mini |
✅ Completed Capabilities
- OpenClaw tool calling works with
qwen2.5:7b - Home Assistant skill tested: "Turn on the study shelves light" ✓
- Wyoming test pipeline passes (3/3 tests)
Implementation Steps
Phase 1: Home Assistant Wyoming Integration (Manual UI Steps)
Step 1.1: Add Wyoming Protocol Integration
- Open Home Assistant UI → Settings → Devices & Services → Add Integration
- Search for "Wyoming Protocol"
- Add the following three services:
Speech-to-Text (STT):
- Host:
10.0.0.199 - Port:
10300 - Name:
Mac Mini STT
Text-to-Speech (TTS):
- Host:
10.0.0.199 - Port:
10301 - Name:
Mac Mini TTS
Satellite:
- Host:
10.0.0.199 - Port:
10700 - Name:
Mac Mini Living Room
Step 1.2: Create Voice Assistant Pipeline
-
Go to Settings → Voice Assistants
-
Click Add Pipeline
-
Configure:
- Name: "HomeAI with OpenClaw"
- Speech-to-Text: Select "Mac Mini STT" (Wyoming)
- Conversation Agent: Select "Home Assistant" (for initial testing)
- Text-to-Speech: Select "Mac Mini TTS" (Wyoming)
- Language: English
-
Save the pipeline
Step 1.3: Assign Pipeline to Assist
- Go to Settings → Voice Assistants
- Click Assist tab
- Set the default pipeline to "HomeAI with OpenClaw"
Phase 2: Test Basic Voice Pipeline
Step 2.1: Test via Browser (Typed Query)
- Open Home Assistant UI
- Click the Assist icon (microphone) in the top-right corner
- Type: "What time is it?"
- Expected: You should hear a spoken response via Kokoro TTS
Step 2.2: Test via Satellite (Voice)
- Ensure Wyoming Satellite is running:
launchctl list com.homeai.wyoming-satellite - Say the wake word: "Hey Jarvis" (or configured wake word)
- Speak: "What time is it?"
- Expected: You should hear a spoken response
Step 2.3: Verify Pipeline Components
Check logs for each component:
# STT logs
tail -f /tmp/homeai-wyoming-stt.log
# TTS logs
tail -f /tmp/homeai-wyoming-tts.log
# Satellite logs
tail -f /tmp/homeai-wyoming-satellite.log
Phase 3: OpenClaw Integration
Step 3.1: Add Shell Command to HA
Edit Home Assistant configuration.yaml (via File Editor add-on or VS Code Server):
shell_command:
openclaw_chat: 'python3 /Users/aodhan/gitea/homeai/homeai-agent/skills/home-assistant/openclaw_bridge.py "{{ message }}" --raw'
Restart Home Assistant to load the new configuration.
Step 3.2: Create OpenClaw Conversation Automation
Create a new automation in HA UI:
Automation: "Voice Command via OpenClaw"
alias: "Voice Command via OpenClaw"
description: "Routes voice commands to OpenClaw for processing"
trigger:
- platform: conversation
command:
- "ask jarvis *"
- "ask assistant *"
- "hey jarvis *"
condition: []
action:
- service: shell_command.openclaw_chat
data:
message: "{{ trigger.slots.command }}"
response_variable: openclaw_response
- service: tts.speak
data:
media_player_entity_id: media_player.mac_mini_speaker
message: "{{ openclaw_response }}"
tts: wyoming_tts
mode: single
Alternative: Direct Conversation Agent
For tighter integration, create a custom conversation agent that calls OpenClaw directly. This requires a custom component.
Step 3.3: Test OpenClaw Integration
- Open HA Assist
- Type: "ask jarvis turn on the reading lamp"
- Expected:
- Command sent to OpenClaw
- OpenClaw processes via home-assistant skill
- Light turns on
- TTS confirmation spoken
Phase 4: Advanced Configuration
Step 4.1: Create Custom Conversation Agent (Optional)
For full OpenClaw integration as the primary conversation agent:
- Create custom component:
custom_components/openclaw_conversation/ - Implement
async_processmethod that calls OpenClaw - Configure in
configuration.yaml:
conversation:
- name: OpenClaw
agent_id: openclaw_agent
Step 4.2: Add Intent Scripts
For specific intents that bypass OpenClaw:
intent_script:
HassTurnOn:
action:
- service: homeassistant.turn_on
target:
entity_id: "{{ name }}"
speech:
text: "Turned on {{ name }}"
Verification Checklist
Basic Pipeline
- Wyoming STT appears in HA Integrations
- Wyoming TTS appears in HA Integrations
- Wyoming Satellite appears in HA Integrations
- Voice Assistant pipeline created and assigned
- Typed query in Assist returns spoken response
- Voice query via satellite returns spoken response
OpenClaw Integration
- Shell command
openclaw_chatconfigured - Automation triggers on conversation intent
- OpenClaw receives and processes command
- HA action executed (e.g., light turns on)
- TTS confirmation spoken
Performance
- Latency under 5 seconds from wake to response
- STT transcription accurate
- TTS audio clear and natural
- No errors in service logs
Troubleshooting
Issue: Wyoming services not appearing in HA
Solution:
- Verify services are running:
nc -z 10.0.0.199 10300 - Check HA can reach Mac Mini: Test from HA container
- Verify Wyoming protocol version compatibility
Issue: No audio output
Solution:
- Check SoX installation:
which play - Test audio directly:
afplay /System/Library/Sounds/Glass.aiff - Check satellite logs:
tail -f /tmp/homeai-wyoming-satellite-error.log
Issue: OpenClaw not responding
Solution:
- Verify OpenClaw running:
pgrep -f openclaw - Test CLI directly:
openclaw agent --message "Hello" --agent main - Check bridge script permissions:
chmod +x openclaw_bridge.py
Issue: STT not transcribing
Solution:
- Check STT logs:
tail -f /tmp/homeai-wyoming-stt.log - Verify Whisper model loaded
- Test with sample audio file
Next Steps After Completion
- Install Chatterbox TTS for voice cloning
- Set up mem0 for long-term memory
- Configure n8n workflows for automation
- Add Uptime Kuma monitors for all services
- Begin ESP32 satellite setup (Phase 4)
File References
| File | Purpose |
|---|---|
homeai-agent/skills/home-assistant/openclaw_bridge.py |
Bridge script for HA → OpenClaw |
homeai-agent/skills/home-assistant/ha-configuration.yaml |
Example HA configuration |
homeai-voice/wyoming/test-pipeline.sh |
Pipeline smoke test |
homeai-voice/scripts/launchd/com.homeai.wyoming-satellite.plist |
Satellite service config |