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.21node -v
v0.10.29To 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 nodejsThe new versions should became: (or higher)
node -v
v9.4.0npm -v
5.0.3source: http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/
git clone https://github.com/basvdijk/domusto-server.gitDOMUSTO server has some dependencies which needs to be installed.
npm installCopy the config file template in the src folder to your own:
cp src/config.example.ts src/config.tsEdit this config file according your needs.
In order to use the DOMUSTO client ./domusto.js you need to have Git installed
sudo apt-get install gitIf 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:
- https://www.domoticz.com/wiki/Assign_fixed_device_name_to_USB_port
- https://www.domoticz.com/wiki/PersistentUSBDevices
npm run startnpm run devnpm test