Zwave-JS Server without docker for x86-64 platforms

Tags: #<Tag:0x00007fc42fa3d5e0>

These instructions assume that you know how to install and navigate your OS on your device.

Install Raspberry Raspbian with desktop for desktop PC.

Initial setup of Raspberry Raspbian is easier with monitor keyboard and mouse hooked up local to your device.
Enable SSH in configuration, once you have enabled SSH then remote configuring is preferred for below instructions.
You can copy and paste below commands into the terminal, these instructions assume you have knowledge on the ability to SSH into your device.
Copy and paste is the easiest, and PuTTY allows right click paste.
These steps use the default user of pi, so if using different then what is default make changes as needed.

(Note some stuff will not work fully until all the steps have been done IE shared folders won’t connect until that directory is made.)

This instruction will do the following:

  1. Will allow network shares of certain folders for editing and backing up your configuration of files and access to root directory.
    ((WARNING MESSING AROUND IN ROOT DIR CAN BREAK YOUR INSTALL))

  2. Will install Zwave-JS2MQTT server onto your device.

  3. Will allow Zwave-JS Server to restart after a reboot.

  4. Will allow Access at your machines IP local address “http://xxx.xxx.xxx.xxx:8091/

"DO NOT COPY AND PASTE STUFF IN QUOTES"

“LOG INTO THE TERMINAL.”

sudo apt update

sudo apt upgrade -y

sudo apt autoremove -y

“STEPS BELOW ALLOWS SHARING OF FOLDERS OVER YOUR LOCAL NETWORK.”


sudo apt install samba -y


sudo nano /etc/samba/smb.conf

“CLEAR SCREEN BY HOLDING DOWN THE CTRL AND K KEYS.”

“COPY ALL BELOW THIS LINE DOWN TO NOT INCLUDING END.”


[global]
netbios name = Zwave Server
server string = The HA File Center
workgroup = WORKGROUP
hosts allow =
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
remote announce =
remote browse sync =

[HOME PI]
path = /home/pi
comment = No comment
browsable = yes
read only = no
valid users =
writable = yes
guest ok = yes
public = yes
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =

[ROOT]
path = /
comment = No comment
browsable = yes
read only = no
valid users =
writable = yes
guest ok = yes
public = yes
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =

[ZWAVE SERVER]
path = /home/pi/zwavejs2mqtt
comment = No comment
browsable = yes
read only = no
valid users =
writable = yes
guest ok = yes
public = yes
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =

“END”

“PRESS CRTL+O (write out), ENTER, CTRL+X (exit).”

sudo smbpasswd -a pi

“ENTER THE PASSWORD IT WILL ASK TWICE.”

sudo service smbd restart

“STEPS BELOW MAKES Zwave-JS Server START ON REBOOT.”

sudo nano -w /etc/systemd/system/zwavejs.service

“COPY ALL BELOW THIS LINE DOWN TO NOT INCLUDING END.”

[Unit]
Description=ZWave-JS
Wants=network-online.target
After=network-online.target

[Service]
User=pi
Group=pi
WorkingDirectory=/home/pi/zwavejs2mqtt
ExecStart=/home/pi/zwavejs2mqtt/zwavejs2mqtt

[Install]
WantedBy=multi-user.target

“END”

“PRESS CRTL+O (write out), ENTER, CTRL+X (exit).”

sudo systemctl --system daemon-reload

sudo systemctl enable zwavejs.service

“BELOW INSTALLS AND UPGRADES THE ZWAVE JS SERVER.”


sudo apt update

sudo apt upgrade -y

sudo apt autoremove -y


cd ~
sudo systemctl stop zwavejs.service

mkdir zwavejs2mqtt
cd zwavejs2mqtt
# download latest version
curl -s https://api.github.com/repos/zwave-js/zwavejs2mqtt/releases/latest  \
| grep "browser_download_url.*zip" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -i -
unzip -o zwavejs2mqtt-v*.zip

rm zwavejs2mqtt-v*.zip

sudo apt-get install g++-multilib -y

sudo systemctl start zwavejs.service

“BELOW MANUALLY STARTS THE SERVER IN YOUR TERMINAL”

cd
cd zwavejs2mqtt

sudo systemctl stop zwavejs.service

./zwavejs2mqtt