- 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.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
toconfig.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
- Place
- In the
root
directory:- Run
npm install
to install packages.- Also run
npm rebuild
if instructed to do so.
- Also run
- Run
node program.js
to start.
- Run
- Optionally, add the following line to
/etc/rc.local
for auto startup:sudo node "/PATH/TO/REPO/program.js"
.
- View the submodule and instructions for use here.