Back-end server that handles apis for the garage door. Main functions are: It saves the garage door state (opened or closed). It sends commands to the raspberry pi garage door client to open or close the garage door. It notifies the users if the garage door is left open. It will notify the alarm server api when the door is opening or closing if the alarm is armed.
I suggest you first read about the different components of the home automation application.
This will help you understand better the general architecture and different functions of the system.
Click here and follow the installation instructions for the server micro-service, before moving to the next step.
ALARM_URL (optional): url to alarm system server. Default: none
AUTH_PUBLIC_KEY (required): content of auth server's publickey.
CLOUDAMQP_URL (required): url to amqp server. The amqp server is used to track cases where the door is left open.
DATABASE_URL (required): url to postgres database. Default: postgres://postgres:@localhost/home_automation
KEEP_HISTORY_IN_DAYS (required): Number of days to keep history. Default: 30
LOGIN_URL (required): url to authentication server. Default: if NODE_ENV = production
=> none
, otherwise: http://localhost:3001
NODE_ENV (required): set up the running environment. Default: production
. production
will enforce encryption using SSL and other security mechanisms.
NOTIFICATIONS_URL (required): url to notifications server. Default: if NODE_ENV = production
=> none
, otherwise: http://localhost:3004
OPEN_DOOR_ALERTS_INTERVAL_IN_MINUTES (required): Frequency to trigger an alert when garage door is left open. Default: 15
PORT (required): server's port. default: 3003
PRIVATE_KEY (required): Generated private key. Public key should be shared with the authentication server. See here.
POSTGRESPOOLMIN (required): postgres pool minimum size. Default: 2
POSTGRESPOOLMAX (required): postgres pool maximum size. Default: 10
POSTGRESPOOLLOG (required): postgres pool log. Values: true
/false
. Default: true
UI_URL (required): url to the UI server. Default: if NODE_ENV = production
=> none
, otherwise: http://localhost:3000