Not too long ago I wrote about using Couchbase to synchronize data on an Intel IoT Gateway device.  In this project I was creating a Java application that was installed to an IoT device that had bluetooth and wireless internet available.  This application would scan for iBeacons and sync the data with a remote server and between devices.

Since having designed that prototype, I decided to take it to the next level and create a summer project from it.

Above is the visual end result of the summer project that I’ve been working on.  Let me break down the scope of what this project accomplishes.

While the Intel IoT Gateway is cool, it isn’t as popular as say, the Raspberry Pi.  I went and purchased two Raspberry Pi 3 devices that have embedded wireless and bluetooth.  The goal here was to plant these Raspberry Pi units at various locations around the office.  I also purchased five Gimbal iBeacons to distribute to a few people around the office.  It was my intention to record the movement of these staff members as they navigate the office throughout the day.  This is demonstrated through the dashboard in the above picture.

The Java application that made use of Couchbase was near identical to that which was used in the previous blog post with a few exceptions.  Instead of using a single document to track the activity of every one beacon, a new document was created for every activity.  With this I removed the need to pull data from Couchbase Server, only save and push.  The other difference is that a custom Couchbase Lite SDK had to be used that supported the ARM architecture of a Raspberry Pi.

While the Raspberry Pi was using a Java application to communicate with Couchbase Lite, the dashboard for viewing activity actually used Node.js and AngularJS.  With N1QL queries, the data was aggregated and used in the charting in the UI.

The full source code to this project can be found on GitHub.  It includes the dashboard as well as the code for Raspberry Pi.


Posted by Nic Raboy, Developer Advocate, Couchbase

Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand.

Leave a reply