Open IoT Challenge 2.0 – eHealth Personal Gateway – Summary

During second Eclipse Open IoT Challenge I’ve been working on personal eHealth gateway. It is a system for monitoring human health parameters and allowing medical personnel or fitness instructors to assess current and historical data. It consist of personal gateway device, web client and ancillary sensor devices.

There are a lot of bio-electrical sensors on the market. Many of them provide connectivity options through Bluetooth Low Energy profile. My project utilize small embedded computer that act as local home gateway. During development I was working on Raspberry Pi 2. It acquire data from BLE sensors and send it to the message broker. Backend application with web UI access broker server and present obtained data.

My system consist of four components:

  1. Sensor devices ( Silicon Labs Sensor Puck, Generis Heart Rate BLE Monitor, custom ECG 3 lead monitor with BLE using Cypress PSoC4 BLE 
  2. eHealth Personal Gateway software ( Eclipse Kura 1.4 running on Raspberry Pi )
  3. Eurotech Everyware Cloud ( trial version of commercial IoT device cloud offering )
  4. Web client application ( OSGi EnRoute based AngularJS web application and backend running on Red Hat OpenShift DIY cartridge )

I’m a big fan of OSGi and Eclipse based technologies, so my software stack decisions where rather biased ;). I’ve used Eclipse Kura on gateway and OSGi enRoute (project, framework, and tooling …) as a base for implementing needed functionality.

High level overview is shown on below diagram:

eHealth system overview

During analysis of available sensor devices, Linux Bluetooth stack and abilities of Kura framework I’ve discovered that one of my sensor devices, Silicon Labs Sensor Puck, transmits data in Bluetooth advertising packages. Unfortunately at that time, Kura wasn’t able to get those data. Meanwhile,  Lee Marshall submitted pull request which allows to listen for Bluetooth Beacons. They works similar – transmit data in advertisement packets (Bluetooth specification describes it as EXTENDED INQUIRY RESPONSE DATA FORMAT).

I’ve modified org.eclipse.Kura.Bluetooth.linux bundle in order to listen for advertising packets specific for SensorPuck device. I have a plan to contribute my code to Kura project. I’ve already presented it on mailing list. Hopefully it will be my first contribution.

The second device, generic heart rate monitor belt, caused serious problems. Although it provides appropriate profile (Heart Rate Profile) and it looked pretty simple to integrate, connecting to this device was impossible from Linux. Apparently, my heart rate belt during connecting to it issues connection parameters update request (as in Bluetooth specification). I faced serious problems to answer this request or force change of initial connection parameters. So, currently my system do not support generic HRM devices.

Application on local gateway (based on Kura) collects measured heart rate values and raw data from optical sensor (extracted  from advertisement packets) and if measurement was correct sends it to the Everyware cloud. Raw data are available locally through  Event Admin service for bundles interested in processing such data. Currently, those data are not used.

I use Everyware Cloud as message broker and for remote configuration. It is a commercial solution and helps a lot during development and operation. It provides REST API and java client library that allows to access data available on the broker.

Because I use OSGi for developing application on Kura, I also choose it for creating Web based application. I choose OSGi enRoute project. It allowed me to easily develop AngluarJS frontend application and REST backend system. All of it is deployed as one jar file and can be started as any Java application. I choose Red Hat Openshift cloud offering. You can seen screenshot of the working dashboard.

Using open source technologies like Eclipse Kura, Linux, enRoute and OSGi specs allows to easily create systems and in case something is not working, or there is no particular feature, you can do it yourself and extend.

I had a lot of fun working with bluetooth and Kura, especially parts where I needed to change its implementation.

 

eHealth Personal Gateway – Eclipse Open IoT Challenge 2.0

 

It is almost two months since my start in Eclipse Open IoT Challenge 2.0. It’s a last moment to explain my proposal and start publishing progress of my work.

During last few weeks I’ve been busy with researching in the field of bio-medical signals – heart rate, pulse oximetry, body temperature end ECG.  I was exploring field of measuring and processing signals that are used to assess human health condition.

It is not my first encounter with body health monitoring. During my master thesis (long long time ago in my university days), I’ve designed and implemented software system for doctors that allows to manage ECG tests (store them offline, annotate, describe, visualize and export for consultation). Back then, majority of ecg equipment offered at most serial connectivity with raw acquisition data.

Currently, there are a lot of medical and personal devices that are widely available and allows to connect easily with personal computers or smartphones. Using your smartphone and additional equipment you can monitor you heart rate, weight, body temperature, blood pressure, glucose, electrocardiogram (ECG) end even images from inside your body using ultrasound. Mostly they are used with dedicated application running on smart phone using Bluetooth low energy. I can see huge potential in aggregating those data, analyzing it and exposing to medical professionals in order to improve access to health care, especially for elderly or babies in home environments. Additionally, current progress in signal processing and predictive analytic algorithms allows to detect, predict and alert when three is something wrong with human body condition.

Furthermore, bio-medical signals can assist during body workouts (fitness and wellness).

Instead of mobile phone I’m using IoT gateway running Eclipse Kura with Bluetooth low energy capabilities in order to gather bio-medical data from various sensors. With this competition I’ll use:

  • simple hear rate sensor with BLE connectivity – Biometric Sensor Puck from Silicon Labs
  • Fitness Bluetooth 4.0 Heart Rate Monitoring Belt
  • DIY prototype of 3 lead ECG with Bluetooth 4.0 – AD8232 based module from Sparkfun and PSoC 4 BLE  from Cypress

 

I’m in proves of creating prototype of medical IoT gateway that will:

  • acquire bio signal data using Bluetooth LE
  • analyze it locally
  • communicate to the user outcome of local analysis
  • send data to application in the cloud
  • allow medical professionals/fitness trainer to access those data and have possibility to describe it
  • as an option, I’d like to use predictive analytic techniques in order to analyze and classify gathered data using application in the cloud
  • take security of the solution seriously

 

Stay tuned, I’ll follow with post about Eclipse Kura and BLE.