Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

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

README.md

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

Releases

No releases published
You can’t perform that action at this time.