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.



Outline of my proposal for Eclipse Open IoT Challenge – monitoring MODBUS

Logging and monitoring industrial automation equipment with remote management capabilities.

It’s a time to write quick overview about my application for Eclipse Open IoT Challenge.

As I’m working with industrial automation equipment recently I started to dig into it a bit more.

Industrial automation devices like PLCs, Inverters, Power meters, Flow meters, etc used as a field devices operate as a standalone equipment with ability to interchange information between each other on demand or on a periodic basis. Field devices need to be monitored and maintained, which is usually handled manually by technician. Existing installations with legacy protocols (e.g. DeviceNet, ControlNet) usually are hard or expensive to integrate with other systems. IoT technologies currently available may constitute a significant solution when facing such problems.
Use cases like monitoring process value, operation of equipment or even power consumption in summer house can be realized with open source IoT software accompanied with hardware on common HW platform like Raspberry Pi or Beaglebone.

Wide range of field devices support MODBUS communication interface that allows to configure or access log data stored in the device.

The purpose of my project is to design an universal network integration module which would allow to utilize IoT protocols to interface with MODBUS compatible devices.

Main goals to be achieved are:

  • monitor MODBUS registers or discrete inputs – defined by address
  • send updates to remote server – MQTT
  • be remotely managed – OMA LightweightM2M

Additionally, ability to present monitored values and alarms on local display (HMI) will broaden possible applications.

The plan is to realize application based on Eclipse Kura framework that will pool defined MODBUS registers/discrete inputs and based on defined rules take actions (store in internal memory, show as value/graph on local LCD or send using MQTT protocol). Thanks to OSGi, it will be easier to achieve modularity and extensibility of the application yet at the design stage.

User will be able to freely define MODBUS registers, poling interval, monitoring rules and actions remotely over OMA Lightweight M2M. Additionally, it will be possible to control local display remotely.

Logging and monitoring industrial automation equipment - overview diagram

Logging and monitoring industrial automation equipment – overview diagram

My project will be realized using Raspberry Pi connected with monitored device using UART port with RS-485 converter. Connection to the remote server will be realized using Ethernet port or through USB WiFi. Using of mobile modem is not planned right now.

I’d like to use Leshan project as device management server and it’s client libraries inside my allocation running on Kura.

For testing my application I’m going to create simple device that will act as MODBUS slave. I was going to use 4DIAC project for this. Unfortunately, there is no MODBUS slave in 4DIAC right now. That’s why for the beginning, I’m going to implement one using libmodbus library. Additionally, I’m going to test my solution with real industrial automation device.

In the next post I will describe detailed HW setup.

Stay tuned for further info….