Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Connect Open Source Voice Assistants to Home Assistant

· 5 min read · Home Automation

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Connecting an open source voice assistant to Home Assistant lets you control your smart home with your voice, without relying on cloud services or proprietary ecosystems. This guide walks you through the setup, whether you're using a dedicated voice satellite like an ESP32-based device or a software assistant like Rhasspy or Willow. You'll need a working Home Assistant instance and a basic understanding of its configuration files.

What You'll Need

  • A running Home Assistant installation (Core, OS, or Supervised) with admin access.
  • An open source voice assistant platform: Rhasspy, Willow, or a custom ESP32-based satellite (e.g., using ESPHome).
  • For Rhasspy: a microphone and speaker (USB or 3.5mm) connected to the device running Rhasspy.
  • For ESP32 satellites: an ESP32 board, a microphone (e.g., INMP441), and a speaker (e.g., MAX98357A).
  • Network access between the voice assistant device and Home Assistant (same LAN recommended).
  • Optional: MQTT broker (Mosquitto) installed in Home Assistant for communication.

Step-by-Step

  1. Install and configure the voice assistant software. For Rhasspy, install it on a Raspberry Pi or a Linux machine using the official installation script. For Willow, install it via the Home Assistant add-on store. For ESP32, flash ESPHome firmware with the voice assistant component.
  2. Connect the voice assistant to your microphone and speaker. Ensure the audio devices are recognized by the system. For Rhasspy, run rhasspy --profile en and use the web interface to test audio input/output.
  3. Set up MQTT (if not already). In Home Assistant, go to Settings → Add-ons → Mosquitto broker and install it. Then configure the MQTT integration with the default credentials.
  4. Configure the voice assistant to use MQTT. In Rhasspy, go to Settings → MQTT and enable it, setting the broker address (e.g., homeassistant.local) and port 1883. For ESPHome, add an mqtt section to your YAML with the broker details.
  5. Connect Home Assistant to the voice assistant via MQTT. In Home Assistant, add the MQTT integration if not already present. Go to Settings → Devices & Services → Add Integration → MQTT, and enter the broker details.
  6. Create intents and sentences. For Rhasspy, define intents in the web interface (e.g., “Turn on the kitchen light”). For Willow, use the built-in sentence editor. For ESPHome, use the voice assistant component to send text to Home Assistant.
  7. Test the connection. Speak a command into the microphone. The voice assistant should process it and publish an MQTT message. In Home Assistant, check the MQTT log (Settings → Devices & Services → MQTT → Listen to topic) to see the payload.
  8. Automate the response. In Home Assistant, create an automation that listens to the MQTT topic (e.g., rhasspy/intent) and triggers actions. For example, if the intent is “Turn on the kitchen light”, the automation turns on the light entity.
  9. Add wake word detection (optional). For hands-free use, configure a wake word like “Hey Rhasspy” or “Okay Willow”. In Rhasspy, go to Settings → Wake Word and select a model. For ESPHome, use the wake_word component.

Common Mistakes

  • Using the wrong MQTT topic or payload format. Always check the documentation of your voice assistant for the exact topic names.
  • Forgetting to enable MQTT in the voice assistant’s configuration. Many assistants have MQTT disabled by default.
  • Audio issues: microphone not picking up sound or speaker not working. Test with a simple audio recorder first.
  • Network firewalls blocking MQTT port 1883. Ensure the voice assistant device can reach Home Assistant on that port.
  • Not restarting the voice assistant after configuration changes. Always restart the service to apply new settings.

Tips

  • Start with a simple command like “turn on a light” to test the pipeline before adding complex intents.
  • Use a dedicated MQTT topic for each intent type to keep automations clean.
  • For Rhasspy, use the built-in “Train” button after adding new sentences to update the speech recognition model.
  • If using an ESP32, ensure the power supply can handle the current draw; use a separate USB power source for the speaker.
  • Consider using Home Assistant’s Assist pipeline as an alternative, which integrates directly with voice assistants via the assist integration.

Troubleshooting

No MQTT messages received. Check the MQTT broker logs in Home Assistant. Verify that the voice assistant’s MQTT settings match the broker’s IP and port. Test with a simple MQTT client like mosquitto_pub to confirm the broker is working.

Voice assistant doesn't hear me. Check microphone permissions and levels. In Rhasspy, use the “Test Audio” button to see if the mic is active. For ESP32, ensure the I2S connections are correct (LRC, BCLK, DIN).

Intents not triggering. Make sure the intent names match exactly between the voice assistant and the Home Assistant automation. Check the MQTT topic case sensitivity. Also, verify that the automation is enabled and has the correct trigger topic.

High latency. If using cloud-based speech recognition (like Google or Amazon), latency will be higher. Switch to offline recognition (e.g., Rhasspy with a local model) for faster response.

ESP32 device not connecting. Check the ESPHome logs for errors. Ensure the MQTT broker IP is correct and that the device is on the same network. Try pinging the device from Home Assistant.

Frequently Asked Questions

Can I use Amazon Alexa or Google Home with this? No, those are proprietary. Open source options include Rhasspy, Willow, and ESPHome-based satellites.

Do I need a separate computer for Rhasspy? Yes, Rhasspy typically runs on a Raspberry Pi or a Linux PC. It can run on the same device as Home Assistant if you have enough resources.

What is the difference between Rhasspy and Willow? Rhasspy focuses on offline, privacy-focused voice processing with many customization options. Willow is a newer, simpler assistant that integrates tightly with Home Assistant and supports multiple languages.

Can I use a USB microphone with an ESP32? No, ESP32 uses I2S microphones. For USB, use a Raspberry Pi or a PC with Rhasspy.

How do I add custom commands? For Rhasspy, edit the sentences in the web interface and retrain. For Willow, use the sentence editor in the add-on. For ESPHome, define custom intents in YAML.

Is it possible to use voice to control devices from other ecosystems? Yes, as long as those devices are integrated into Home Assistant. The voice assistant just sends intents to Home Assistant, which then controls any connected device.