Skip to content

bschwind/automation-server

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
sql
 
 
web
 
 
 
 
 
 
 
 
 
 
 
 

Automation Server

An HTTP API server for controlling my air conditioner and ceiling light.

Dependencies

$ sudo apt-get install nodejs
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
  • npm
$ sudo apt-get install npm
$ sudo npm install -g npm

Build

$ npm install

Run

$ node app.js

PM2 Startup

$ sudo npm install -g pm2
$ sudo env PATH=$PATH:/usr/local/bin pm2 startup systemd -u pi --hp /home/pi
$ pm2 start automationServer.json
$ pm2 save
$ cat /home/pi/automationServer.json
{
  "apps" : [{
    "name"        : "automation-server",
    "script"      : "server.js",
    "cwd"         : "/home/pi/projects/automation-server/"
  }]
}

About

An HTTP API server for controlling my air conditioner and ceiling light.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published