Kscope17 Conference Analytics Part 2: Software
This year, Red Pill Analytics is the Analytics Sponsor at ODTUG Kscope17. Our company motto is #challengeeverything – so we knew we wanted to do something different and unexpected while at the conference.
What we eventually landed on was creating Analytics Stations using IoT technologies to show how an old school object, like a rotary phone, can be repurposed and turned into an interactive device.
Part 1 focuses on hardware.
Part 2 focuses on software.
Kscope17 also used beacon technology to analyze conference attendee activities. Red Pill Analytics pulled that information through a REST API and told the story of Kscope17 using Oracle Data Visualization. This will be explained in Part 3, coming soon!
Because the project uses a Raspberry Pi Model 3B which uses Raspbian (a distribution of linux designed for the Raspberry Pi) all of our software used is run on Linux and on an ARM processor. The project primarily uses a framework called Electron (https://electron.atom.io/) for our logic and display code and our hardware interaction code.
The first step to setting up the Raspberry Pi is to burn Raspbian (found on Raspberry Pi official website, https://www.raspberrypi.org/downloads/) to a micro SD card which will be inserted into the Pi and act as the storage device and operating medium for the embedded device. I chose to burn the latest Raspbian image using a tool called Etcher (https://etcher.io/). The next step was to insert the micro SD card into the Pi, connect a screen via HDMI cable, connect a USB keyboard and mouse for initial setup, and connect a sufficiently specced power source.
The Pi boots up and the first things I did were connect to my local Wi-Fi network, disable underscan so that the monitor output consumed all of the available screen space, enable SSH, set locale information (keyboard/timezone) to United States, and change the system password for security.
Next was to transfer the electron application files from my development machine to the Pi via Filezilla and SFTP (note that in order to do this SSH must first be enabled via raspi-config), install the node/electron dependencies and test the application. I installed node with
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - followed by
sudo apt install nodejs.
After verifying the application worked as expected, I setup the node/electron app to run at Pi startup so it could act appliance like. To do this I add a single line
@sh /home/pi/Desktop/phone.sh to the following file
/home/pi/.config/lxsession/LXDE-pi/autostart and then create the following script file on the desktop on my Pi.
Lastly I needed to disable the cursor and the blank screensaver so the phone could act like a kiosk and stay awake permanently. This consists of insert the following lines to the same file as above
/home/pi/.config/lxsession/LXDE-pi/autostartabove the script execution line.