Skip to content

RootAccessHackerspace/GoogleHome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 

Repository files navigation

GoogleHome

Google Home

Username: rootaccess

Password: HACKTHEPLANET

Google Home Documentation: https://home-assistant.io/blog/2017/05/13/home-assistant-on-orange-pi-zero/

Audio Configuration: https://www.cnx-software.com/2017/07/30/how-to-setup-an-orange-pi-zero-diy-smart-speaker-with-google-assistant-sdk/

Steps:

(Steps are briefly taken from the audio configuration above)

  1. Create a project on the Google Cloud Platform
  2. Enable the Assistant API
  3. Create an Oath Client ID
  4. Download the .json file containing the client secrets.
  5. find Orange Pi ip address: http://angryip.org/
  6. Transfer the client secret .json to your Orange Pi.
  7. On your machine: ssh rootaccess@IPAddress

On the Orange Pi

  1. Run the following block of commands:
sudo apt-get update
sudo apt-get install python3-dev python3-venv
python3 -m venv env
env/bin/python -m pip install --upgrade pip setuptools
source env/bin/activate
  1. Make sure that “Web & App Activity” with “Include Chrome browsing history and activity from websites and apps that use Google services” is checked, Device Information and Voice & Audio Activity are enabled in the Activity Control Page. This might already be set, depending on what you've done in the past.
  2. Now run python -m pip install --upgrade google-assistant-library on the Orange Pi to install the Google Assistant SDK, and python -m pip install --upgrade google-auth-oauthlib[tool] to install the authorization tool.
  3. Run the authorization tool: google-oauthlib-tool --client-secrets ~/client_secret_xxxx.apps.googleusercontent.com.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless, where the client_secret*.json file is what you transfered to the Orange Pi.
  4. Now you can run the assistant! google-assistant-demo

Having the assistant run automatically

/etc/systemd/system/google-assistant-demo.service:

[Unit]
Description=google assistant service
After=network.target ntpdate.service
 
[Service]
Type = idle
Environment=VIRTUAL_ENV=/home/pi/env/
Environment=PATH=/home/pi/env/bin:/usr/local/sbin:/usr/local
ExecStart=/home/pi/env/bin/google-assistant-demo
WorkingDirectory=/home/pi
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
 
[Install]
WantedBy=multi-user.target
Alias=google-assistant.service

Enable and start service:

sudo systemctl enable google-assistant-demo.service
sudo systemctl start google-assistant-demo.service

Releases

No releases published

Packages

No packages published