Installation
Node.js Installation
First you need to install node.js that comes with the package manager npm.
You need to install or update to version 4 of Node.js (version 4.6.2 at the time of writing). Earlier versions of Node.js aren't supported.
If you are on the Raspberry Pi and running the standard Raspbian distribution you can use the following installation procedure.
Pi Model A, B, B+ or Zero
wget https://nodejs.org/dist/v4.6.2/node-v4.6.2-linux-armv6l.tar.gz -P /tmp
cd /usr/local
sudo tar xzvf /tmp/node-v4.6.2-linux-armv6l.tar.gz --strip=1
Pi 2 Mode B or Pi 3 Model B
wget https://nodejs.org/dist/v4.6.2/node-v4.6.2-linux-armv7l.tar.gz -P /tmp
cd /usr/local
sudo tar xzvf /tmp/node-v4.6.2-linux-armv7l.tar.gz --strip=1
To install node on another platform than Raspberry Pi have a look at installing Node.js via package manager.
Check you Node.js version with:
/usr/bin/env node --version
pimatic Installation
You must have the gcc
compiler or some other suitable compiler installed. Moreover, you need to have git
installed.
On Debian-based systems run:
sudo apt-get install build-essential git
Once node.js and npm are installed you can run
cd /home/pi
mkdir pimatic-app
npm install pimatic --prefix pimatic-app --production
to install the pimatic framework.
Copy the default config file:
cd pimatic-app
cp ./node_modules/pimatic/config_default.json ./config.json
You should end up with these files in your pimatic-app
directory:
config.json | the config file |
node_modules | directory for the framework and plugins |
node_modules/pimatic | the pimatic framework files |
Now, you need to set the password for the admin user. Open the file config.json
using a text editor (e.g., nano
)
and search for the string "users"
. Then, change the value of the password
property for user "admin" below.