Skip to content

thomasnorris/REST-GoogleAssistant-Server

Repository files navigation

Notice

  • As of 11/19/2019, this will not work on an ARMv6 device (such as a RPi Zero W). This will work on an ARMv7 device such as the Raspberry Pi 3B.

Prerequisites

NPM and Node.js

  • Both of these are required and can be downloaded here (if not already installed).

Google Assistant Developer Project

  • Follow these instructions to configure a Google Developer Project.
    • Do not download credentials from the OAuth2 Consen screen.
  • Follow these instructions to register the device model:
    • Anything can be used for the model settings.
    • Select required traits.
    • Download OAuth 2.0 credentials when prompted and rename to client_secret.json. This will be needed later.

Installation

  • Everything in the Prerequisites section must be completed.
  • It is recommended clone to a Windows machine first to generate the client_tokens.json file.
    • This will be generated upon first run of the program.
    • Once it is generated, copy it into the config folder.
  • Clone the repository with git clone --recurse-submodules to update submodules.
  • After cloning to the target device (Windows or otherwise):
    • Follow the Node-Logger readme for instructions on setting up the logger.
    • In the root config folder:
      • Place client_secret.json (downloaded earlier) here.
      • Copy/rename config_template.json to config.json
        • Enter a desired auth key/value pair. Requests must use this key/value pair as a header to send requests.
        • Enter the matching device model parameters.
      • This folder should now contain:
        • client_secret.json
        • client_tokens.json
        • config.json
    • In the root directory:
      • Run npm install to install packages.
        • Also run npm rebuild if instructed to do so.
      • Run node program.js to start.
  • Optionally, add the following line to /etc/rc.local for auto startup:
    • sudo node "/PATH/TO/REPO/program.js".

Client Submodule

  • View the submodule and instructions for use here.

About

REST server for sending Google Assistant commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •