Skip to content

3. Homard (LwM2M Server)

David edited this page May 7, 2015 · 2 revisions

#Deploy the Internet of Things with Bluetooth Smart-based Applications in Hybrid, Mobile, Personal, Wearable, and Cloud Computing Environments.

Connectivity and reliability is critical requirement for maintaining an adaptable network and accomplishing the scale, consolidation, and business continuity demanded by today’s advanced applications based on the Internet of Things paradigm. HOP Ubiquitous can help you to achieve Internet of Things applications development with an agile, flexible, and efficient way to deploy and optimize application services. In addition, to integrate a wide-range of Smart devices that makes your solutions more personal and ubiquitous.

Using Homard, the HOP-Ubiquitous OMA Resource Dashboard, i.e., our IoT Platform based on OMA LwM2M Server, you can support Bluetooth Smart advanced functionalities through a simple and robust communication stack and APIs. Thereby, deploying software with Bluetooth Smart support in a transparent way, and build up your products and services over the defined application services.

#Components

Bluetooth Low Energy, or Bluetooth Smart, is based on the version 4.0-4.2 of Bluetooth (IEEE 802.15.1). This protocol provides the physical layer for the HOP Ubiquitous solution. The HOP Ubiquitous communication stack and modules are built on top of the chipsets and physical layer libraries from Texas Instrument. Ubibox implements an advanced IPv6 header compression mechanism called GLoWBAL IP (IPv4 and IPv6 support) which brings Bluetooth Low Energy devices the opportunity to participate in more IoT use cases. In this way our devices are enabled with OMA LwM2M, IoT management protocol, to communicate with external platforms in a scalable, secure and interoperable approach.

In order to make feasible the integration with your systems, and make transparent the maintenance and evolution of these protocols. HOP Ubiquitous provides the libraries for integration into platforms/devices, our own Bluetooth Smart enablers to build your own sensor, a collection of OMA LwM2M ready sensors, and finally the Homeard Server.

Homard acts as a rendezvous point to access to all your devices, where you can manage devices using a very easy to use and powerful API (described in Section Annex).

In addition to the API, new features can be append to adapt customer needs, such as the presented below.

#Architecture

The next diagram presents the integration of the different components and interfaces between them. Note API restful will provide a JSON interface, which is supported by the majority of the platforms and languages. Specially ideal to work with Java-based platforms, Android, and JavaScript... technologies.

#A Bluetooth Low Energy architecture ready to be deployed

The common architecture offers a Homard server where devices are connected. The devices will use the Ubibox gateway to obtain access to the network via IPv6 or IPv4. Applications such as Web-based applications, Android applications, etc. can be created with based on the API offered by Homard, or with and end-to-end integration based on CoAP/OMA LwM2M primitives.

#API Restful

Homard offers in top of the OMA LwM2M server a Restful services such as mechanism to communicate with the OMA LwM2M server. This HTTP/HTTPS API Restful allow users to manage devices connected to the server. The API resides on the port 8080, this port can be used also to access and use a simple web page application which also makes use of the API.

Launch the OMA LwM2M server / API services / simple-web-page-application is really easy: java –jar homard.jar

The main API endpoint is the “/api/clients”, which allow show connected devices, and manage each of them. Inherit from OMA, the devices exposes a set of objects, which can contain one or more instances, and each instance, contains the final resources. Some objects allow multiple instances (such as a Digital I/O Object) and others only one (such as Device Object). Numbers are used to identify the tuple (Object ID / Instance ID / Resource ID).

Information returned by the API is encapsulated into a JSON data structure, since is the best way to communicate with high level applications (commonly developed in Java, JavaScript and Android).

The observer allow set a minimum and maximum value and URL where to receive the information returned in observations.

Returned objects are formed in JSON, they are detailed on the “ANNEX: JSON Objects” section.

Next table shows combinations available by the Restful API:

#Simple Web Application

A web interface also in this ports allow manage devices in a visual way, this is a good visual way to understand how the API works, and also a good future way to manage this devices, we still working on enhance and provide new features on Homard. The following pictures present a selection of screenshots from the Homard Web Interface.

Homard is a continuously evolving platform with the inclusion of new semantics, interfaces to other platforms, and OMA Web Objects support. Note that we are active members and collaborators to make Homard aligned with oneM2M, ETSI, IPSO Alliance, OMA, and other bodies such as Industrial Internet Consortium (IIC).AllSeen and OpenInterconnect Consortium (OIC).

The client list shows Bluetooth Low Energy devices connected to the OMA LwM2M server. Click on them to access to the different objects offered by the OMA LwM2M client. Each tab is an object. You will be able to check the powerful API offered by Homard, since all this interface is based on the API, and you will be able to read entire object instances, specific resources, execute resources, enable/disable observers, subscribe for notifications based on defined conditions, ...

#ANNEX: API Restful Examples

This section presents examples for the different resources available in the API Restful in order to give a reference of the JSON responses.

Query Result
GET /api/clients (array of clients) [ { "endpoint": "HOP-Sensor-Debug", "registrationId": "MTKt5ejSeu", "registrationDate": "2015-02-16T01:06:27+01:00", "address": "/127.0.0.1:54604", "lwM2MmVersion": "1.0", "lifetime": 120, "bindingMode": "U", "rootPath": "/", "objectLinks": [ { "url": "/1/0", "attributes": {}, "objectId": 1, "objectInstanceId": 0 }, { "url": "/3", "attributes": {}, "objectId": 3 }, { "url": "/4", "attributes": {}, "objectId": 4 }, { "url": "/5", "attributes": {}, "objectId": 5 }, { "url": "/3201/0", "attributes": {}, "objectId": 3201, "objectInstanceId": 0 }, { "url": "/3201/1", "attributes": {}, "objectId": 3201, "objectInstanceId": 1 }, { "url": "/3303/0", "attributes": {}, "objectId": 3303, "objectInstanceId": 0 }, { "url": "/3304/0", "attributes": {}, "objectId": 3304, "objectInstanceId": 0 }, ...]
GET / api /clients/ HOP-Sensor-Debug (client) { "endpoint": "HOP-Sensor-Debug", "registrationId": "MTKt5ejSeu", "registrationDate": "2015-02-16T01:06:27+01:00", "address": "/127.0.0.1:54604", "lwM2MmVersion": "1.0", "lifetime": 120, "bindingMode": "U", "rootPath": "/", "objectLinks": [ { "url": "/1/0", "attributes": {}, "objectId": 1, "objectInstanceId": 0 }, { "url": "/3", "attributes": {}, "objectId": 3 }, { "url": "/4", "attributes": {}, "objectId": 4 }, { "url": "/5", "attributes": {}, "objectId": 5 }, { "url": "/3201/0", "attributes": {}, "objectId": 3201, "objectInstanceId": 0 }, { "url": "/3201/1", "attributes": {}, "objectId": 3201, "objectInstanceId": 1 }, { "url": "/3303/0", "attributes": {}, "objectId": 3303, "objectInstanceId": 0 }, { "url": "/3304/0", "attributes": {}, "objectId": 3304, "objectInstanceId": 0 }, { "url": "/3399/0", "attributes": {}, "objectId": 3399, "objectInstanceId": 0 } ], "secure": false }
GET /api/clients/CLIENT_ID/3303/0 (Temperature Object) { "status": "CONTENT", "content": { "id": 0, "resources": [ { "id": 5604, "value": 125 }, { "id": 5700, "value": 21.6512 }, { "id": 5601, "value": 21.393799 }, { "id": 5602, "value": 22.337608 }, { "id": 5603, "value": -40 } ] } }
Query Result for POST REQUEST Result in the specified URL is received in text/plain
POST /api/clients/CLIENT_ID/3303/0/5700/observe/- 5/15/http://runmyproces.com/composite/api/3023023232 { "status": "CONTENT", "content": { "id": 5700, "value": 21.9086 } } Example: 21.122313