- 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.
- Both of these are required and can be downloaded here (if not already installed).
- 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.
- Everything in the Prerequisites section must be completed.
- It is recommended clone to a Windows machine first to generate the
client_tokens.jsonfile.- 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-submodulesto 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 configfolder:- Place
client_secret.json(downloaded earlier) here. - Copy/rename
config_template.jsontoconfig.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.jsonclient_tokens.jsonconfig.json
- Place
- In the
rootdirectory:- Run
npm installto install packages.- Also run
npm rebuildif instructed to do so.
- Also run
- Run
node program.jsto start.
- Run
- Optionally, add the following line to
/etc/rc.localfor auto startup:sudo node "/PATH/TO/REPO/program.js".
- View the submodule and instructions for use here.