Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

3. Setup Actions on Google

DewGew edited this page Oct 22, 2020 · 22 revisions
  • Use the Actions on Google Console to add a new project with a name of your choosing and click
    • Create Project.
    • Click Home Control, then click Smart Home.
    • On the top menu click Develop, then on the left navigation menu click on Invocation.
    • Add your App's name. Click Save.
    • Click 'Save'.

Note: Ensure that you are using the correct GCP project when performing these steps. This is the project that matches your smart home project ID. At Google Cloud Platform Console at the top left corner in the blue bar next to Google Cloud Platform. There is a drop down menu where you can choose your projects.

  • Add Request Sync and Report State with Service Account (optional but recomended)

    The Request Sync feature allows a cloud integration to send a request to the Home Graph to send a new SYNC request. The Report State feature allows a cloud integration to proactively provide the current state of devices to the Home Graph without a QUERY request. These are done securely through JWT (JSON web tokens).

    • Navigate to the Google Cloud Console API Manager for your project id.
    • Enable the HomeGraph API.
    • Navigate to the Google Cloud Console API & Services page
    • Select Create Credentials and create a Service account key
      • Create a new Service account
      • Use the role Service Account > Service Account Token Creator
      • Click Done
    • Click on the newly created Email Account under Service Accounts
    • Add key > create new key
    • Choose JSON
    • Click create and download the JSON file.
    • Upload and Save this in ../Domoticz-Google-Assistant/config folder as smart-home-key.json.
  • Navigate back to the Actions on Google Console.

    • On the top menu click Develop, then on the left navigation menu click on Actions. Enter the URL for fulfillment, e.g. https://[your public url]/smarthome, click Done.
    • On the left navigation menu under Account Linking.
    • Under Client Information,
      • Client ID: some ID, just remember it and add it in config.yaml
      • Client secret: some password, just remember it and add it in config.yaml
    • Change Authorization URL to https://[your public url]/oauth (replace with your actual URL).
    • Change Token URL to https://[your public url]/token (replace with your actual URL).
    • Do NOT check 'Google to transmit clientID and secret via HTTP basic auth header'.
    • Click 'Save' at the top right corner, then click 'Test' to generate a new draft version of the Test App.

Next Connect to your Google Home device