×

How to Connect Google Home to Home Assistant Without Cloud

Hey there! Want to connect Google Home to Home Assistant but prefer to skip the cloud? You’re in for a treat! Setting up a local connection between Google Home and Home Assistant is a fantastic way to gain more control over your smart home while keeping your data private.

In this guide, we’ll walk you through the steps to integrate these two systems without relying on cloud services. It might take a bit of effort, but the payoff is worth it for privacy-conscious users and DIY enthusiasts. Let’s get started!

Why Go Cloudless?

A cloud-free setup offers several benefits:

  • Privacy: Keep your data within your local network.
  • Reliability: Avoid service outages that could affect cloud-based setups.
  • Customization: Tailor your smart home to your needs without limitations.

By connecting Google Home to Home Assistant locally, you’ll retain the same functionality without sending your data to external servers.

What You’ll Need

Before diving in, make sure you have:

  1. Home Assistant Installed: A working Home Assistant instance running on a Raspberry Pi, server, or other device.
  2. Google Home Device: A Google Home speaker, Nest Hub, or similar device.
  3. Local Network Access: Ensure both Google Home and Home Assistant are on the same Wi-Fi network.
  4. Basic Technical Skills: You’ll need to work with configuration files and APIs.

Step 1: Enable Home Assistant’s Built-In API

To communicate locally, Home Assistant uses a service called the Home Assistant Smart Home API.

Steps to Enable the API:

  1. Access Your Home Assistant Configuration:
    • Open the configuration.yaml file.
  2. Add the Smart Home API:
    • Add the following lines to your configuration file: google_assistant: project_id: YOUR_PROJECT_ID service_account: !include SERVICE_ACCOUNT.JSON expose_by_default: true
    • Replace YOUR_PROJECT_ID with your Google Cloud Project ID (more on this in Step 2).
    • Save the configuration and restart Home Assistant.
  3. Create a Service Account Key:
    • You’ll need a service account JSON file, which we’ll generate in the next step.

Step 2: Set Up a Google Cloud Project

Even though we’re going cloudless, a one-time setup in Google Cloud is necessary to create local API credentials.

Steps to Set Up the Project:

  1. Log in to Google Cloud Console:
  2. Create a New Project:
    • Click “Create Project” and name it (e.g., “Home Assistant Local”).
  3. Enable the API:
    • Search for “HomeGraph API” in the API library and click “Enable”.
  4. Create a Service Account:
    • Go to IAM & Admin > Service Accounts.
    • Click “Create Service Account” and follow the prompts.
  5. Generate a JSON Key:
    • After creating the service account, click “Add Key” > “Create New Key”.
    • Select JSON format and download the file.
  6. Save the Key:
    • Place the JSON file in your Home Assistant configuration directory and reference it in the configuration.yaml file (Step 1).

Step 3: Link Google Home to Home Assistant

With everything set up, it’s time to link your Google Home device to Home Assistant.

Steps to Link:

  1. Set Up Google Home Actions:
  2. Link Your Home Assistant Instance:
    • In the Actions on Google Console, provide the URL of your Home Assistant instance.
    • Example: https://your-home-assistant-url:8123
  3. Enable Local Fulfillment:
    • In the Google Home console, enable Local Fulfillment for your project.
    • This ensures Google Home communicates directly with Home Assistant over your local network.
  4. Sync Devices:
    • Say, “Hey Google, sync my devices.”
    • Your Home Assistant entities should now appear in the Google Home app.

Step 4: Test the Integration

Try controlling your devices to ensure everything works smoothly.

Examples of Commands:

  • “Hey Google, turn on the living room lights.”
  • “Hey Google, set the thermostat to 72 degrees.”

If something doesn’t work as expected, double-check your configuration files and API setup.

Troubleshooting Common Issues

Here are some common hiccups and how to fix them:

1. Google Home Can’t Find Devices

  • Cause: Misconfigured configuration.yaml.
  • Fix:
    • Ensure all entities you want to expose are configured correctly.
    • Restart Home Assistant after making changes.

2. Connection Issues

  • Cause: Local network problems.
  • Fix:
    • Verify that both Google Home and Home Assistant are on the same Wi-Fi network.
    • Restart your router if needed.

3. API Errors

  • Cause: Invalid Google Cloud credentials.
  • Fix:
    • Double-check your service account key and project configuration.

Quick FAQs

1. Can I use this method with multiple Google Home devices?
Yes! Once set up, all Google Home devices on the same network will work seamlessly with Home Assistant.

2. Is this truly cloudless?
Yes, after the initial Google Cloud setup, all interactions happen locally.

3. Can I customize which devices are exposed to Google Home?
Absolutely! Use the expose_by_default option in configuration.yaml to control this.

4. What if my Home Assistant URL changes?
Update the URL in the Actions on Google Console to match the new address.

5. Is this setup secure?
As long as your Home Assistant instance is properly secured with HTTPS and strong passwords, it’s very safe.

Ready to Go Cloud-Free?

Connecting Google Home to Home Assistant without cloud services might take a bit of setup, but the privacy and reliability it offers are unbeatable. With these two systems working together locally, you’ll have a powerful and secure smart home setup tailored just for you.

Take the leap today and enjoy a smarter, more private home!

Johnathan Reed is a seasoned expert in smart home technology and IoT solutions, with over 10 years of experience in creating innovative, connected systems. He specializes in smart automation and energy-efficient solutions, helping users optimize their environments for security, convenience, and efficiency.

Post Comment