Run Pareto Anywhere on a PC

Our step-by-step guide to install and run on a Windows/Mac/Linux PC (or server).

Run Pareto Anywhere on a personal computer

The TL;DR (Too Long; Didn't Read)

Learn how we at reelyActive run our open source IoT middleware on a PC.


What will this accomplish?
The PC will serve contextual APIs and web apps and can forward data to a local (or remote) open source stack enabling IoT applications.
Why use a PC?
For most users, a PC is the most readily available tool with which to begin exploring the open source IoT stack anchored by Pareto Anywhere.
Can I use this in production?
Yes! In many cases, a laptop is ideally suited for a PoC or offline data capture, while a server is better suited for long-term production deployments.

Prerequisites

A recent version of Node.js installed.

From a terminal run node --version to check if Node.js is already installed.

  • Download Node.js
    Download and install the latest LTS version of Node.js for Windows/Mac/Linux.

Installing Pareto Anywhere   Step 1 of 3

Get it from GitHub with or without git.


Why from GitHub?
The open source code is hosted and maintained on GitHub. Cloning the repository ensures you have the latest code, and makes it easy to keep up to date.
Is there a container option?
Yes, the details for a Docker implementation are instead documented in the /pareto-anywhere repository.
Clone the pareto-anywhere repository from GitHub

Choose the installation process that best suits your situation (Got git?) from the two options below:

Open a terminal and then:

  1. Change to the folder in which you wish to download the pareto-anywhere source code (ex: ~/reelyActive).
  2. Clone the pareto-anywhere repository with the command git clone --recurse-submodules https://github.com/reelyactive/pareto-anywhere.git
  3. Change to the pareto-anywhere folder with the command cd pareto-anywhere
  4. Install all dependencies with the command npm install     1 min

Pareto Anywhere can be run from this folder with the command npm start as presented in the next step.

Browse to the /pareto-anywhere repository, then:

  1. Click on the Code button and select Download as ZIP.
  2. Save the pareto-anywhere-master.zip file to a temporary download folder on your PC.
  3. Extract to a pareto-anywhere folder (ex: ~/reelyActive/pareto-anywhere)
  4. Delete the pareto-anywhere-master.zip file to free up space.

Browse to the /pareto-anywhere-apps repository, then:

  1. Click on the Code button and select Download as ZIP.
  2. Save the pareto-anywhere-apps-master.zip file to a temporary download folder on your PC.
  3. Extract to the pareto-anywhere/web/apps folder (ex: ~/reelyActive/pareto-anywhere/web/apps)
  4. Delete the pareto-anywhere-apps-master.zip file to free up space.

Open a terminal and then:

  1. Change to the pareto-anywhere folder (ex: cd ~/reelyActive/pareto-anywhere).
  2. Install all dependencies with the command npm install     1 min

Pareto Anywhere can be run from this folder with the command npm start as presented in the next step.

Run Pareto Anywhere   Step 2 of 3

Confirm that everything works!


Do I need IoT data?
No. Pareto Anywhere runs even in the absence of IoT source data.
Can I test my IoT data source?
Yes. In the second part of this step you'll find how to quickly validate the integration with common hardware/modules.
Pareto Anywhere on PC

Run Pareto Anywhere Part 1

Open a terminal and then:

  1. Change to the pareto-anywhere folder (ex: cd ~/reelyActive/pareto-anywhere).
  2. Run with the command npm start

Browse to localhost:3001 to observe Pareto Anywhere running on the PC.

Enter Ctrl+C from the terminal to stop the program at any time.

Run and validate a specific configuration (OPTIONAL) Part 2

Should a source of ambient IoT data be available (see the tabs below), it is possible to validate its integration with Pareto Anywhere, replacing xxx.xxx.xxx.xxx with the PC's IP address, where required.

Pareto Anywhere will automatically listen for ambient Bluetooth Low Energy data forwarded from reelyActive Owl-in-Ones and Minew G1 gateways. Follow the step-by-step tutorials below to forward data from these gateways.

Pareto Anywhere will automatically listen for ambient Bluetooth Low Energy data forwarded from compatible HPE Aruba Networking and Huawei APs. Follow the step-by-step tutorials below to forward data from these access points.

Forward UDP packets from the Huawei AP to the PC on port 50010

Pareto Anywhere will automatically listen for ambient Bluetooth Low Energy data from the PC's onboard radio—if compatible—provided an instance of barnowl-hci is running and forwarding the data. Follow the instructions below to install and run this option.

Install barnowl-hci

Open a terminal and complete the following:

  1. Browse once again to the folder in which you wish to download the source code.
  2. Clone the barnowl-hci repository with the command git clone https://github.com/reelyactive/barnowl-hci.git
  3. Change to the barnowl-hci folder with the command cd barnowl-hci
  4. Install all package dependencies from npm with the command npm install     1 min

Assign radio privileges (Linux only)

Allow Node.js programs the privilege to initiate scans with the command sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)

Run barnowl-hci once to confirm that it can listen for ambient data:

  • npm start will output radio decodings (raddecs) to the console for quick-and-dirty testing
  • npm run forwarder will forward raddecs to a local Pareto Anywhere instance

Enter Ctrl+C to stop either program.

Pareto Anywhere will automatically listen for ambient Bluetooth Low Energy data forwarded from reelyActive reelceivers on UDP port 50000.

Pareto Anywhere will automatically listen for ambient RAIN RFID data forwarded from compatible Impinj and RF Controls readers.

Data from RFC OS will automatically be ingested if running on the same machine (see barnowl-rfcontrols).

Pareto Anywhere will automatically listen for ambient EnOcean Wireless Standard data from a USB dongle connected to the PC provided an instance of barnowl-enocean is running and forwarding the data. Follow the instructions below to install and run automatically each time the Pi boots.

Install barnowl-enocean

Open a terminal and complete the following:

  1. Browse once again to the folder in which you wish to download the source code.
  2. Clone the barnowl-enocean repository with the command git clone https://github.com/reelyactive/barnowl-enocean.git
  3. Change to the barnowl-enocean folder with the command cd barnowl-enocean
  4. Install all package dependencies from npm with the command npm install     1 min

Assign serial privileges (Linux only)

Include the user in the dialout group to facilitate serial access to the USB dongle with the command sudo usermod -a -G dialout $USER

Run barnowl-enocean once to confirm that it can listen for ambient data:

  • npm start will output radio decodings (raddecs) to the console for quick-and-dirty testing
  • npm run forwarder will forward raddecs to a local Pareto Anywhere instance

Enter Ctrl+C to stop either program.

👌 Celebrate Part 3

Pareto Anywhere Runs at the Edge

Pareto Anywhere now #RunsAtTheEdge on your machine!

Feedback from our user community guides & motivates the continuous evolution of our open source technologies—and our obscure memes—so don't by shy to reach out moving forward!

Enjoy the data Part 4

Our cheatsheet details the raddec, dynamb and spatem JSON output from the Pareto Anywhere open source IoT middleware.

Run custom as a service   Step 3 of 3

Optionally customise Pareto Anywhere and run automatically on boot.


Why custom?
Pareto Anywhere uses a highly modular architecture which can easily be adapted to any given deployment.
Why run as a service?
To maximise uptime in a production deployment.
Pareto Anywhere in production

Run using a startup script (OPTIONAL) Part 1

Add or remove modules from the default Pareto Anywhere configuration, if required, to better accommodate your specific IoT deployment.

Run as a service (OPTIONAL) Part 2

Run Pareto Anywhere automatically on boot, and restart on failure, by following the instructions specific to your architecture.

These instructions apply only to Linux distributions that have adopted systemd.

Configure systemd to run the pareto-anywhere service by completing the following:

  1. Open a terminal and change to the pareto-anywhere folder.
  2. Copy the unit file to the systemd system folder with the command sudo cp units/pareto-anywhere.service /lib/systemd/system
  3. If necessary, edit the /lib/systemd/system/pareto-anywhere.service file you copied so that the WorkingDirectory, ExecStart and User lines match your configuration.
  4. If using the (default) User=reelyactive:
    • Create the user with the command sudo useradd reelyactive
    • Assign the reelyactive user rwx permissions recursively to the /data subfolder for local storage (ex: setfacl -R -m u:reelyactive:rwx data)
  5. Enable the pareto-anywhere service with the command sudo systemctl enable pareto-anywhere.service
  6. Start the pareto-anywhere service with the command sudo systemctl start pareto-anywhere.service
  7. Browse again to localhost:3001 and observe the Pareto Anywhere landing page.

Check the status and output of the service at any time with sudo systemctl status pareto-anywhere.service

Tutorial prepared with by jeffyactive.

You can reelyActive's open source efforts directly by contributing code & docs, collectively by sharing across your network, and commercially through our packages.

Where to next?

Continue exploring our open architecture and all its applications.