Installing Raspberry Pi 3 model B
To start off, we expect you to have Raspbian installed. This can easily be done via NOOBS from https://www.raspberrypi.org/downloads/noobs/. Handy video for that: https://www.raspberrypi.org/help/noobs-setup/
Once you have completed the installation, you can follow the steps below to have a fully working CIMonitor.
Update operating system
As with all newly installed system, you first want to make sure everything is up-to-date:
# apt-get update && apt-get upgrade
passwd and you can configure a new password.
If you want to use nano, feel free, but I like to use vim. If you want to use nano, replace vim in all commands below.
# apt-get install vim
Enable external SSH access (optional)
If you want to access your raspberry remotely, we need to enable external SSH access. Check out the raspberry documentation for this.
Set a static IP in raspbian is a bit different than editing your
/etc/network/interfaces, you need to edit
# vim /etc/dhcpcd.conf: Add to the bottom of the file (replace the addresses with the ones you need):
interface eth0 static ip_address=172.17.0.53 static routers=172.17.0.1 static domain_name_servers=172.17.0.1
# reboot to reboot with your static IP.
# cp /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
If you want to rotate your screen to have more statuses displayed. 1 = 90 degrees, 3 = 270 degrees.
# vim /boot/config.txt
# reboot to test your changes
No screen blanking
Disable the screen from going blank.
# vim /etc/lightdm/lightdm.conf
[SeatDefault] and place under it:
xserver-command=X -s 0 dpms
Install nodejs & npm
- Install nvm: https://github.com/creationix/nvm
nvm install 8(or another node version if you like)
$ cd ~
- Create a new git key and add it to your github account. (or download the zip and unzip)
$ git clone email@example.com:CIMonitor/CIMonitor.git
$ cd CIMonitor/
$ cp app/Config/config.dist.json app/Config/config.json
$ vim app/Config/config.jsonand make the required changes.
$ npm install --production
- You can now test if the app runs with
- Follow the installation instructions on the Github Repo so you end up with
- Make sure you ran
# make installso the systemd service script has been created and is auto started on boot.
# vim /lib/systemd/system/pi-blaster.serviceand change the ExecStart so it reads as follows:
ExecStart=/bin/sh -c "/bin/sleep 20 && /usr/sbin/pi-blaster $DAEMON_ARGS"
- When using the audio plug, you need to use pcm modues on the pi-blaster. Create an environment file
Run node as a service
# npm install pm2 -g- Install the
pm2service manager, that lets you start node applications as a service.
# pm2 startup- Create a systemd service file with
# pm2 startupand run the command that follows.
# systemctl enable pm2-root- Let pm2 start on boot.
# vim /etc/systemd/system/pm2-root.service, add
pi-blaster.service(separated by space) behind the line that reads
# pm2 start /home/pi/CIMonitor/app/server.js --name CIMonitor
# pm2 save
Start CIMonitor dashboard full-screen
Install unclutter so we can hide the mouse:
# apt-get install unclutter
# vim /home/pi/.config/lxsession/LXDE-pi/autostart replace everything:
@xset s off @xset -dpms @xset s noblank @unclutter @chromium-browser --enable-experimental-web-platform-features --kiosk --app=http://localhost:3000/
If you restart your raspberry, it should start the CIMonitor application now and start the browser in full screen mode.