Page 43 - ITU Journal Future and evolving technologies Volume 2 (2021), Issue 5 – Internet of Everything
P. 43

ITU Journal on Future and Evolving Technologies, Volume 2 (2021), Issue 5




          3.1  MQTT                                              OpenHAB

               4
          MQTT is  a  publish&subscribe  network  broker‑based     Home  Automation                        open‑
          messaging protocol, which is used to transport messages   sour  pr  home  application  platform  used  t  run
          between  devices  in  IoT  networks  or,  in  general,  in  con‑     homes.  It  naivel    man  devices    al‑
          strained scenarios.  Note that it is largely used in the IoT   low    user  t  further  ext    capabilities  b  in‑
          domain thanks to its robustness and power‑saving com‑   stalling modules and plugins. Moreover, OpenHAB allows
          munication. MQTT is based on two types of entities: mes‑   the writing of custom logical rules, which can be triggered
          sage  broker  and  clients.  In  more  detail,  a  one‑to‑many   using deployed sensors and perform user‑de ined actions
          message distribution is performed as well as another fea‑   (e.g., turn on lights on a given time or when a motion sen‑
          ture  involved  in  the  decoupling  of  information  between   sor is activated).  OpenHAB makes use of various differ‑
          sources  and  consumers.  In  general,  MQTT  is  agnostic   ent concepts to model the smart home environment, two
          about the content of the payload.  The broker can be im‑   of which are relevant for the case study presented in this
                                    5
          plemented by using Mosquitto  , but other solutions are   paper:
                                    6
          also available, such as HiveMQ  .
                                                                  • Things can be seen as entities that can be physically
          The concept of topic is fundamental in MQTT; it consists   added to the system, like a vendor sensor gateway,
          of strings used by the broker to  ilter messages gathered   or virtual, like a web service which can provide in‑
          by the connected client;  a topic has one  or more levels,   formation to the system
          separated  by  a  forward  slash,  so  as  to  obtain  a  logical
                                                                  • Items, instead, represent functionality used by the
          tree structure.  Topics are used by clients for publishing
                                                                   application. For example, the temperature values
          messages and for subscribing to the updates from other
                                                                   read by a sensor, or the current state of a switch,
          clients, thus avoiding a continuous polling among produc‑
                                                                   are considered as items; while the sensor itself is the
          ers and consumers.  There is the possibility to subscribe
                                                                   things which provides such items.
          to an exact topic or to multiple topics at once by using the
          wildcards, represented by the following symbols: (i) + for   For logical operations, OpenHAB uses rules, which are
          a  single‑level  wildcard  (i.e.,  exactly  one  topic  level);  (ii)   composed in the following way:
          # for a multi‑level wildcard (i.e., an arbitrary number of
                                                                 • Rule’s name, which de ines a unique name to refer‑
          topic levels).  When a message is published under a cer‑
          tain  topic,  it  is  delivered  to  each  matching  subscription   ence the rule
          registered at that time.
                                                                 • When statement, which provides the trigger to acti‑
          In the case study presented in Section 4, MQTT protocol   vate the rule
          plays  a  central  role  in  message  passing,  due  to  its  ef i‑
                                                                 • Then statement, which de ines the tasks to be per‑
          ciency for the investigated scenario.
                                                                   formed when the rule is triggered.
          3.2  InluxDBԀ                                        3.4 Ignition

                 7
          InluxDBԀ  is a database belonging to the NoSQL family. It   Ignition  9  is a commercial, server‑based cross‑platform
          has been speci ically designed and developed for manag‑   software, which is managed through web technology.
          ing time‑series data, thus making it an ideal choice for pe‑   Built with customization in mind, it supports a modu‑
          riodically logging sensor information.  Data is stored into   lar structure so that its deployment can be tailored for
          ”measurements”  by  using  timestamps,   ields  and  tags.   every speci ic use case. Ignition includes a Human Ma‑
          Fields are used to store data  information,  which can  be   chine Interface / Supervisory Control And Data Acquisi‑
          strings,  loats, integer or boolean and are always associ‑   tion (HMI/SCADA), which can be built, in a customized
          ated with a timestamp.  Tags are similar to  ields, but are   way, depending on the intended purpose. Ignition makes
          also indexed; this allows the storage of important meta‑   use of tags as points of data; these can be both static or
          data in tags to optimize querying performance.  InluxDBԀ   dynamic on the basis of the  inal scope. While it provides
          is adopted in the case study, presented in Section 4, since   a set of prede ined types, it also allows the user to extend
          its data structure perfectly  its the need of heterogeneity,   them through the use of User Data Types (UDT tags). The
          which is dictated by IoT environments.               basic tags are the following:
                                                                 • OPC Tags are particular kinds of tag, which use the
                                                                   Open Process Connectivity (OPC) standard to com‑
                                                                   municate and read/write values directly to the Pro‑
          4
          MQTT v3.1/v3.1.1, https://mqtt.org/mqtt‑speci ication/   grammable Logic Controller (PLC).
          5
                           source         v3.1/v3.1.1  broker.
          http://mosquitto.org                                  8 Openhab, open source automation software. https://www.openhab.org
          6                                                     9
          HiveMQ MQTT broker. https://www.hivemq.com            Ignition software. https://inductiveautomation.com
          7
          In luxDB, time series platform. https://www.in luxdata.com/

                                             © International Telecommunication Union, 2021                     31
   38   39   40   41   42   43   44   45   46   47   48