Kura has been considered to implement the concentrator code for OpenTRV as it is billed as a platform for just that sort of situations.
Kura is an “open source framework for IoT” that consists of:
- a lightweight OSGi engine written in Java that is designed to run on low power and embedded computers such as the Raspberry Pi, BeagleBone or Intel Edison platform,
- a series of components that implement communication protocols often found in IoT, such as Modbus,
- a lightweight MQTT server that acts as the core communication mechanism between components.
As Kura is a full framework, it requires a more specific development environment than vanilla Java, in particular it requires:
- a recent version of Eclipse (I used Mars)
- JRE 1.6 or 1.7: I haven’t managed to make it work on 1.8
- MacOS X or Linux to run the emulator, Windows is not supported
Why should we use Kura?
Kura provides a well tested framework that provides some of the fundamental low level features that the OpenTRV concentrator would need to support, in particular:
- As it’s an OSGi framework, plugin management is supported out of the box, including upgrading individual components without impacting the remainder of the system;
- Kura provides the concept of Configurable components in such a way that configuration can be updated on the fly in a consistent manner between all components;
- Kura provides a logging framework out of the box.
In addition, contributing to an existing platform rather than create a new one would enable the project to have a wider reach and be used beyond the core OpenTRV platform.
Why should we NOT use Kura?
Setup and installation of a development environment is non-trivial so this may limit the number of people who can efficiently contribute. This can be mitigated to a point by having OpenTRV specific “getting started” documents.
Deployment on devices hasn’t been tested so far and may show additional complications.
The number of platforms currently supported by Kura is limited. It is possible to add support for a new platform but how complicated that is hasn’t been verified.
- BG to deploy “hello world” example on target device (Raspberry Pi B+)
- BG to port the current code to Kura and estimate differences in complexity between the two approaches, in particular:
- code complexity
- deployment complexity