Skip to content

Latest commit

 

History

History
95 lines (67 loc) · 1.91 KB

installation.md

File metadata and controls

95 lines (67 loc) · 1.91 KB

DOMUSTO server installation guide

Installing and upgrading NPM / Nodejs on RPI

When installing on a Raspberry Pi you first need to ugprade node.js. By default the node package in Raspian is very old:

npm -v
1.4.21
node -v
v0.10.29

To upgrade the RPI to the latest node / npm.

Do not use Node 10 yes! It gives problems with compiling of socket and serial port libraries.

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt install nodejs

The new versions should became: (or higher)

node -v
v9.4.0
npm -v
5.0.3

source: http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/

Checkout DOMUSTO server from Github

git clone https://github.com/basvdijk/domusto-server.git

Install npm packages

DOMUSTO server has some dependencies which needs to be installed.

npm install

Setup configuration

Copy the config file template in the src folder to your own:

cp src/config.example.ts src/config.ts

Edit this config file according your needs.

Install Git

In order to use the DOMUSTO client ./domusto.js you need to have Git installed

sudo apt-get install git

Install DOMUSTO server plugins

See the DOMUSTO plugin guide

Fixed names for USB port devices

If you have multiple USB devices connected, sometimes the order of the USB assignmets change after a reboot e.g. ttyUSB0 is suddenly ttyUSB1 and vice versa.

These pages on the Domoticz wiki show how to solve this issue by assigning fixed ports:

Running the DOMUSTO server

Running DOMUSTO server

npm run start

Running DOMUSTO server with auto reload on changes

npm run dev

Running DOMUSTO tests

npm test