Little IoT Agent (liota) is an open source offering for IoT solution developers and resides primarily on IoT gateways. Liota has been generalized to allow, via modules, interaction with any data-center component, over any transport, and for any IoT gateway.

As if we needed yet another IoT SKD - yet they keep coming. 

The Basic Layers of Liota

Board Layer

The board layer is the base layer of liota and provides an abstraction for IoT gateway hardware. Items one might put in here are unique i/o architecture, communication physical interfaces, and any other features particular to the system board.

Gateway Layer

The gateway layer is a sub-module of board and abstracts both the system board and the operating system. The gateway is defined using the following parameters make, model, and the current OS version installed on them. The functions provided by this layer are used to configure i/o endpoints, read data from endpoints connected to sensors, or pass commands to the endpoints of connected actuators as well as any unique OS features.

Things Layer

This layer (after the 'Things' in Internet-of-Things') allows developers to create representative objects in liota for devices that will be connected to the gateway, e.g., as USB temperature sensor connected to the gateway.

Transformer Layer

This layer defines the base structure for creating representations of metrics in liota. A metric is the term for a stream of numeric values. Metric is a class that abstracts and represents this stream of values collected from, typically, attached sensors but can be collected from anywhere. Within the definition of metrics we support SI units are in order to provide units-based typing for values collected from a sensor. This meta-data can be passed to the data-center component in a format defined by that component.

Transport Layer

This layer abstracts the network connectivity between a gateway object and a DCC (Data center component). Currently, liota supports WebSocket and plain old BSD sockets. In near future it will support MQTT and CoAP. Both are ‘Session’ or layer-5 protocols. MQTT is a pub-sub system using TCP and CoAP implements reliable UDP datagrams and a data format specification. These protocols are capable of satisfying most use cases for transferring data from IoT gateways to data-center components. With the current implementation the gateway acts as either a WebSocket client, establishing a connection with the server using the WebSocket protocol. e.g.

wss://host:port/path

or a traditional socket endpoint.

DCC (Data Center Component)

This layer takes care of supporting DCC’s, which can be hosted anywhere; on-prem, public or private cloud. It is potentially the most important and complex layers of liota. It provides flexibility to developers for choosing the data-center components they need and using API’s provided by liota. With help of this layer developers may build custom solutions. The layer implements basic API’s and encapsulates them into unified common API’s required to send data to various DCC’s. Graphite and vROps (vRealize Operations) are currently the data-center components supported by the first version of liota. New DCC’s can easily be integrated in this layer as it follows a plug in-plug out design.

Sample Code Below is a sample code developed using liota for a representative IoT gateway. A temperature metric is defined and its values are collected from a USB-temperature sensor connected to the USB-1 port of the gateway. The metric values are streamed to vROps;

from liota.boards.gateway_de5000 import DellEdge5000
from liota.things.USB-Temp import USB-Temp
from liota.dcc.vrops import Vrops
from liota.transports.web_socket import WebSocket
# DCC Component
vROps vrops = Vrops(vrops_login, vrops_pwd, WebSocket(URL "secure"))
# GW creation
gw = DellEdge5000("Demo Gateway")
# Device definition
temp = USB-Temp(parent=gw, 'Temp', READ, usb-1)
# Register the Gateway and associated device vrops.register(gw)
# Property creation on Gateway gw.set_properties("Location", "Palo Alto Prom:E")
# Creating Metric
temperature = vrops.create_metric(temp,'Room Temperature', SI.Celsius, sampling_interval=10)
# Publishing value to DCC component
temperature.start_collecting()

 

 

More Information:Liota