This can be placed on any device. This is the deployment for Firebase Functions.
Codelab: Smarthome-Washer for getting started with example + walkthrough.
This is a Firebase Function and device attributes that will upload to a Realtime Database.
Install:
$ npm install -g firebase-tools
Setup and Login:
$ firebase --version
$ firebase login
$ firebase use --add {PROJECT NAME}
$ npm --prefix functions/ install
Credentials: Append the following to your ~/.bashrc
# <<< FIREBASE >>>
export FIREBASE_TOKEN="COPY AND PASTE TOKEN"
# <<< Magic Mirror Pub/Sub <<<
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service/key.json"
Note: Firebase token is used for authentication when using the firebase-tools command line interface
Google App Creds are used for Magic Mirror Pub Sub API, and not required for Firebase.
Initalize Firebase Application
Select: Realtime Datase, Functions, Hosting, and follow prompt. I highly recommend the CodeLabs before attempting to setup this repository.
Result in Realtime Database A successful deployment + setup of a Realtime Database on your Google Project will result in
Result: Successful deployment will create a testing interface at https:<project_id>.web.app/