Run Pareto Anywhere on a PC

Our step-by-step guide to install and run Pareto Anywhere on a personal computer to make any physical space context-aware.

Run Pareto Anywhere on a personal computer

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

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

The computer will transform ambient wireless data into real-time context: who/what is where/how.


What will this accomplish?
The PC will serve contextual APIs and web apps and can forward data to a local/remote Elasticsearch instance for analysis.
Why use a PC?
For most users, a PC is the most readily available tool with which to begin exploring Pareto Anywhere and context-aware physical spaces.
Can I use this in production?
Yes! In many cases, a laptop running Pareto Anywhere is ideally suited for short-term deployments and/or offline data captures.

Prerequisites

A recent version of Node.js installed.

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

Installing Pareto Anywhere   Step 1 of 3

Install in a minute in either of two ways.


Why two different ways?
We recommend the local installation, but recognise that some users will prefer the convenience of a single-step installation. Your choice!
Is there a container option?
Yes, the details for a Docker implementation are instead documented in the pareto-anywhere repo.
Clone the pareto-anywhere repository from GitHub

Choose the installation option that best suits your situation from the two options below:

Choose this option for the ease of a single-step installation.

Open a terminal and enter the command npm install -g pareto-anywhere     1 min

Pareto Anywhere can be run with the command pareto-anywhere as presented in the next step.

Choose this option for development and production deployments.

Open a terminal and complete the following steps:

  1. Browse to the folder in which you wish to download the pareto-anywhere source code.
  2. Clone the pareto-anywhere repository with the command git clone --recurse-submodules https://github.com/reelyactive/pareto-anywhere.git (or download as ZIP and extract as pareto-anywhere).
  3. Browse 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 its 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 an ambient data source?
No. Pareto Anywhere runs even in the absence of source data.
Can I test my ambient 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

Run Pareto Anywhere from the command line based on the installation option you selected in Step 1:

Open a terminal and enter the command pareto-anywhere

Open a terminal and from the pareto-anywhere folder, enter the command npm start

Browse to localhost:3001 to observe Pareto Anywhere running on the PC. It is normal not to observe any data yet: connecting an ambient data source is covered next.

Enter Ctrl+C to stop either program.

Run and validate a specific configuration (OPTIONAL) Part 2

Should a source of ambient 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 Aruba 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. See the barnowl-impinj and barnowl-rfcontrols modules, respectively, for additional details.

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 and dynamb JSON output from the Pareto Anywhere open source middleware.

Automatically run on boot (OPTIONAL) Part 5

This optional step applies only to Linux distributions that have adopted systemd.

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

  1. Copy the unit file to the systemd system folder with the command sudo cp units/pareto-anywhere.service /lib/systemd/system
  2. If necessary, edit the /lib/systemd/system/pareto-anywhere.service file you copied so that the WorkingDirectory, ExecStart and User lines match your configuration
  3. Enable the pareto-anywhere service with the command sudo systemctl enable pareto-anywhere.service
  4. Start the pareto-anywhere service with the command sudo systemctl start pareto-anywhere.service
  5. Browse again to localhost:3001 and observe the Pareto Anywhere landing page

Installing Elasticsearch & Kibana   Step 3 of 3

Optionally install this duo to explore and analyse contextual data over time.


Why a local database?
A local Elasticsearch instance stores the real-time data stream from Pareto Anywhere, facilitating standalone/offline data capture and analysis.
Is there a hosted option?
Yes. The hosted Elasticsearch Service is recommended whenever Internet-connectivity is available, as it includes additional features such as machine learning.
Pareto Anywhere with Elastic

Install Elasticsearch (OPTIONAL) Part 1

Elasticsearch can be installed locally on the PC, free of cost, under the Elastic License. Follow the Elasticsearch installation instructions for your platform/OS.

Elasticsearch can also run as a hosted service, bundled with Kibana, and starting with a free trial. Learn how in this tutorial:

Install Kibana (OPTIONAL) Part 2

Kibana can be installed locally on the PC, free of cost, under the Elastic License. Follow the Kibana installation instructions for your platform/OS.

Kibana can also run as a hosted service, bundled with Elasticsearch, and starting with a free trial. Learn how in this tutorial:

Point Pareto Anywhere to Elasticsearch Part 3

Pareto Anywhere will automatically connect to a local Elasticsearch instance.

If Elasticsearch is installed and running locally on the PC, no further action is required. Pareto Anywhere will automatically connect to and write to a local Elasticsearch instance (running at localhost:9200).

If Elasticsearch is running as a hosted service, update the ELASTICSEARCH_NODE environment variable as in the table below, specifying the user, pass and server, so that Pareto Anywhere can connect to and write data to the remote instance.

Environment Variable Default Value Updated Value
ELASTICSEARCH_NODE http://localhost:9200 https://user:pass@server.com

Explore the data in Kibana Part 4

Browse to the local (localhost:5601) or hosted Kibana instance and begin analysing context-aware physical spaces over time starting with the following tutorial:

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.