Our step-by-step guide to create #CAPSpaces with a Pi using open source technologies.
Learn how we at reelyActive create CAPSpaces with the ubiquitous Pi.
The Raspberry Pi will facilitate the free exchange of information about who/what is where/how in the space.
Flash the SD card with Raspberry Pi OS Lite and connect the display.
Do not connect power to the Pi until instructed to do so!
Assuming you have a display available for your context-aware physical space, go ahead and connect that to the Pi, via HDMI cable, as a gratifying first step.
In Part 3 below, you'll be asked to SSH into the Pi to execute commands remotely from your computer. If you're unfamiliar with SSH—don't worry, we have a Super Special Hack for you—simply connect a USB keyboard to the Pi, so that you can execute commands directly via the keyboard & display instead!
Follow our step-by-step tutorial to prepare the SD card for the Pi, including network settings and prerequisite software packages.
If you connected a display & keyboard, you can execute commands directly on the Pi without having to SSH in.
Install Pareto Anywhere and enable kiosk mode to drive the display.
Follow our step-by-step tutorial to install Pareto Anywhere on the Pi, configuring the onboard radio as the source of ambient data as specified in Step 2, Part 2.
Upon completion of this tutorial, anyone using any device on the same local network as the Pi should be able to access the Pareto Anywhere landing page, web apps and APIs at http://pareto.local, or via the Pi's IP address.
Freedom of access ensures that CAPSpaces remain inclusive as per our UNI philosophy.
Follow our step-by-step tutorial to drive the display with a web application from the Pareto Anywhere Apps.
Upon completion of this tutorial, the Pi should, every time it boots, automatically display a web app (we recommend Hyperlocal Context Explorer), for occupants of the space to discover and observe.
Associate metadata with the space and its resident ambient devices, including the Pi itself.
Complete the following four steps to create and associate a digital twin with the Pi.
Browse to the Hyperlocal Context Explorer web app (ex: pareto.local/apps/hlc-explorer/) and observe a graph with a single hub node.
The hub node represents the Pi. The other nodes represent the ambient devices it has discovered.
Click on the hub node which represents the Pi.
An offcanvas window should appear, including a Story tab, in which you can create a digital twin.
In the Story tab, choose whether to represent the Pi as a Product (i.e. itself) or the Place where it is installed.
Enter a short, meaningful Name.
Choose a representative Image.
Click Store & Associate to create and host the digital twin on the Pi itself.
Close the offcanvas and refresh the explorer view.
Observe the Pi again as the hub node, this time with the name and image of the digital twin.
After completing Part 1 above, again click on the Pi's node, and this time select the Associations tab from the offcanvas.
Notice that the url field already points to the digital twin of the Pi, created in Part 1.
Optionally enter a hierarchical (colon-separated) directory and click Save.
Optionally enter a position using (comma-separated) latitude, longitude, [elevation] and click Save.
If appropriate, repeat Part 1 and/or 2 above for the nodes representing ambient devices discovered by the Pi in the context-aware physical space. Resident ambient devices may include:
Connect infrastructure and an analytics suite.
Pareto Anywhere will readily accept data from a variety of sources in addition to the Pi's onboard radio. Consider forwarding data to the Pi should any additional sources be available, as follows:
Repeat Step 3 to configure the space(s) after adding infrastructure.
Pareto Anywhere will automatically forward data to an Elasticsearch instance if/as specified by the ELASTICSEARCH_NODE environment variable. Consider adding a hosted Elasticsearch instance as follows:
Upon completion of the tutorial, set the ELASTICSEARCH_NODE environment variable as outlined in Step 3 of our Run Pareto Anywhere on a Pi tutorial. Data should then become available for analysis and presentation in Kibana as described in the following tutorial.
Our cheatsheet details the raddec and dynamb JSON output from the Pareto Anywhere open source middleware.
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.Continue exploring our open architecture and all its applications.