All Projects → andrei-tatar → nora-service

andrei-tatar / nora-service

Licence: other
NORA backend service

Programming Languages

typescript
32286 projects
HTML
75241 projects

Projects that are alternatives of or similar to nora-service

Domoticz-Google-Assistant
Google Assistant for Domoticz
Stars: ✭ 81 (+131.43%)
Mutual labels:  smarthome, google-assistant
Assistant Relay
A Node.js server that allows for sending commands to Google Home/Assistant from endpoints
Stars: ✭ 638 (+1722.86%)
Mutual labels:  smarthome, google-assistant
Gbridge
gBridge.io allows you to control (almost) anything with Google Assistant, by translating voice commands to MQTT messages.
Stars: ✭ 152 (+334.29%)
Mutual labels:  smarthome, google-assistant
node-red-contrib-polymer
A Polymer based Dashboard UI for Node-RED
Stars: ✭ 21 (-40%)
Mutual labels:  smarthome, node-red
ioBroker.node-red
Instantiate the server with node-red
Stars: ✭ 50 (+42.86%)
Mutual labels:  smarthome, node-red
node-red-contrib-alexa-home
No description or website provided.
Stars: ✭ 31 (-11.43%)
Mutual labels:  smarthome, node-red
node-red-contrib-loxone
Connect the Loxone Miniserver to node-red via the Websocket API
Stars: ✭ 65 (+85.71%)
Mutual labels:  smarthome, node-red
HomeApp
A little smart home app for Philips Hue and other devices
Stars: ✭ 54 (+54.29%)
Mutual labels:  smarthome, node-red
tinytuya
Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
Stars: ✭ 236 (+574.29%)
Mutual labels:  smarthome
claire
Continuously Learning Artificial Intelligence Rules Engine (Claire) for Smart Homes
Stars: ✭ 18 (-48.57%)
Mutual labels:  smarthome
zigbee
Database of Zigbee devices compatible with third party gateways: ZHA, deCONZ, Zigbee2MQTT, Tasmota, ZiGate, ioBroker,
Stars: ✭ 117 (+234.29%)
Mutual labels:  smarthome
homebridge-freeathome
Platform Plugin to manage free@home accessories via HomeBridge
Stars: ✭ 50 (+42.86%)
Mutual labels:  smarthome
node-red-contrib-tasmota
Tasmota devices for NodeRed
Stars: ✭ 16 (-54.29%)
Mutual labels:  node-red
thermomat
Low cost smart home IOT heating with adapted eq3n and esp8266-07. Server, Webapp and ESP8266 code for autonomous thermostat controling over the internet.
Stars: ✭ 17 (-51.43%)
Mutual labels:  smarthome
ccu-addon-mosquitto
Mosquitto packaged as Addon for the Homematic CCU3 and RaspberryMatic
Stars: ✭ 23 (-34.29%)
Mutual labels:  smarthome
midnight-red
A gorgeous dark theme for Node-RED
Stars: ✭ 110 (+214.29%)
Mutual labels:  node-red
LetsHack
Notes & HowTo's covering the Raspberry Pi, Arduino, ESP8266, ESP32, etc.
Stars: ✭ 37 (+5.71%)
Mutual labels:  node-red
node-red-contrib-homee
access the homee api with node-red
Stars: ✭ 35 (+0%)
Mutual labels:  node-red
homebridge-tion
Homebridge plugin to control Tion breezers
Stars: ✭ 32 (-8.57%)
Mutual labels:  smarthome
openshs
Open Smart Home Simulator
Stars: ✭ 26 (-25.71%)
Mutual labels:  smarthome

nora-service

NORA (https://node-red-google-home.herokuapp.com) backend service deployed in Heroku.

Deployment instructions: (small guide on how to run nora-service on your own Heroku)

Needed:

HEROKU

  • Create a new Account and then a new app. From Overview, add new add-on "Heroku Postgres" To deploy, you can either use the heroku cli or connect your github account. (do not deploy anything yet)
  • Keep this browser tab open

FIREBASE

  • Create a new Firebase Project and name it accordingly.
  • Navigate to Project Overview - Project Settings - General and create a new web app.
  • Navigate to Project Overview - Project Settings - Service Accounts and generate new private key
  • Navigate to Develop - Authentication - Users - Set up sign-in method - Google - enable - check that Web SDK configuration is filled in.
  • Keep this browser tab open

Google Api Console

Google Actions

CONFIG HEROKU ENV VARS

In Heroku go to Settings - Config Vars and add

env vars

JWT_COOKIE = nora:auth
JWT_SECRET = downloaded service account json from firebase - private_key
OAUTH_ID = api console - credentials - oauth 2.0 client ids - web client - Client ID
OAUTH_SECRET = api console - credentials - oauth 2.0 client ids - web client - Client secret
PROJECT_ID = firebase - settings -general - your apps - project id
SERVICE_ACCOUNT_ISSUER =  downloaded service account json from firebase - client_email
SERVICE_ACCOUNT_KEY =  downloaded service account json from firebase - private_key (format it as multiline)
FIREBASE_APIKEY = firebase - settings -general - your apps
FIREBASE_AUTHDOMAIN = firebase - settings -general - your apps

USER.REPOSITORY.TS

Modify src/services/user.repository.ts

To create the Database Tables modify this lines:

(async function () {
    const service = new PostgressService();
    await service.query(`
        CREATE TABLE IF NOT EXISTS appuser (
            uid VARCHAR(30) CONSTRAINT pk PRIMARY KEY,
            linked boolean DEFAULT false
        )`
    );

    await service.query('ALTER TABLE appuser ADD COLUMN IF NOT EXISTS noderedversion integer DEFAULT 1');
	await service.query('ALTER TABLE appuser ADD COLUMN IF NOT EXISTS refreshtoken integer DEFAULT 1');
})().catch(err => {
    console.error(err);
}).then(() => {
    console.log('done');
});

PUSH

THAT'S IT, you are ready to deploy to Heroku! Build the app and the schema with npm run heroku-postbuild before deploying. To deploy follow the instructions from the Heroku website or if you linked your account in Heroku with Github just push to github.

README DISCLAIMER

The instructions might be incomplete. For issues with the instructions please create an issue and we'll take another look,

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].