Skip to content
Ian G edited this page Apr 13, 2020 · 21 revisions
  1. Install latest version of Raspbian. You may like to consider a light weight variant like Raspbian Lite (https://www.raspberrypi.org/downloads/raspbian/)

  2. Change locale, timezone etc:

sudo raspi-config

  1. Undertake some mandatory configuration changes including password resets: Change root PW

passwd root

Add new user account (not root). Nb. Minibian does not have 'pi' user by default. This is not necessary for Raspbian distro's.

adduser pi

Add user to sudoers file:

adduser pi sudo

Change hostname:

nano /etc/hostname

  1. Reset passwords for pi and root:
passwd pi
passwd root
  1. Install pynx584 for interfacing with alarm:

sudo pip3 install pynx584

Nb. You can upgrade pynx584 by running: sudo pip3 install pynx584 --upgrade

  1. Insert your USB to serial device and give permission to the USB device for the pi user account:

sudo usermod -a -G dialout pi

Nb. If the usb-to-serial device is not detected, you may need to run:

apt-get install firmware-linux-free

  1. Run server at startup, add systemd service

sudo nano /etc/systemd/system/nx584.service

Add the following (or similar):

[Unit] Description=NX584 daemon After=network.target

[Service] Type=simple User=pi WorkingDirectory=/usr/local/bin/ ExecStart=/usr/local/bin/nx584_server --config /home/pi/config.ini --serial /dev/ttyUSB0 --baudrate 9600 --listen localhost --port 5007 --log /home/pi/nx585.log Restart=on-failure

[Install] WantedBy=multi-user.target

Nb. This will log output to /home/pi/nx584.log. Make sure log file exists, and that pi user has access to it:

sudo chown pi /home/pi/nx584.log

Reload the systemd files sudo su systemctl daemon-reload

Enable the new servce you created.

systemctl enable nx584.service

. Alternative method "This does not function on newer rpi versions, use 7. systemd service instead."

Run pynx584_server at startup by modifying /etc/rc.local

sudo nano /etc/rc.local

Add the following line (or similar):

sudo su - pi -c '/usr/local/bin/nx584_server --config /home/pi/config.ini --serial /dev/ttyUSB0 --baudrate 9600 --listen 192.168.1.100 --port 5007 --log /home/pi/nx584.log'

Nb. This will log output to /home/pi/nx584.log. Make sure log file exists, and that pi user has access to it:

sudo chown pi /home/pi/nx584.log

Clone this wiki locally