scorelab / OpenIoE

Open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.
Apache License 2.0
24 stars 42 forks source link

Gitter Build Status GitHub license Codacy Badge

OpenIoE

OpenIoE is an Open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything. It enables you to subscribe to data streams and get data from the sensors and store them. The application was generated using JHipster application generator.

Main features

Docker

Installation

Usage

Publish - subscribe behavior

The sensor data can be published using rest end point and message broker with MQTT support. Both methods accept the payload as JSON. An example for publishing data with rest endpoint using curl command is

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer <access_token>' -d '{
  "data": "24",
  "description": "test",
  "sensorId": 1,
  "timestamp": "2017-03-19T09:47:44.526Z",
  "topic" : "gps"
}' 'http://127.0.0.1:8080/api/sensors/{id}'

The user can also publish data using MQTT protocol with MQTT client applications by sending the data of the following form to the topic 'gps'.

  "data": "24",
  "description": "test",
  "sensorId": 1,
  "timestamp": "2017-03-19T09:47:44.526Z"

The user can subscribe to topics defined for subscription entity using MQTT client applications by providing the topic name as gps. Whenever a new data is published, it will be stored in Cassandra and can be received by the user.

Storing data

Data can be stored via the REST endpoint and the message broker. Both methods accept the payload as JSON. An example is {"sensorId":1,"data":"24","description":"test","timestamp":"2016-07-30T21:29:34+02:00"}

Retreiving data

Using the REST end point data can be retreived. http://127.0.0.1:8080/api/sensors/1/data where 1 is the sensor id http://127.0.0.1:8080/api/sensors/1/data?dates=2016-07-30,2016-07-2 where multiple dates can be specified

Future work