<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrea Mattioli</string-name>
          <email>andrea.mattioli@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabio Paternò</string-name>
          <email>fabio.paterno@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Smart Home, Augmented Reality, Internet of Things, End-User Development</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CNR-ISTI, HIIS Laboratory</institution>
          ,
          <addr-line>Via G. Moruzzi 1, 56124 Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Smart home installations, in which connected devices exchange data with each other, are becoming a widespread reality. These environments are based on automation rules, which may be specified even by end users. To make the process of automations creation and management easier, less prone to errors, and more engaging, we propose an approach based on mobile Augmented Reality (AR). In this paper, we describe how AR can be used to interact with the objects in the environment, and allow for the definition of coordinated behaviours between them. Starting with analysis of relevant literature and our previous experiences, we introduce four main aspects to consider when designing the user-application interaction, and how we are implementing them in a prototype AR automation management application. Further possibilities that AR can ofer in this context will be discussed as well.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Connected devices and services are always more present in our lives. We are often in
environments characterized by the presence of various types of devices, smart appliances, objects that
can exchange data between them, actualizing the Internet of Things (IoT) concept. One way to
exploit the new possibilities that the IoT ofers is using automations to make a dwelling more
personalized around its inhabitants’ needs. Generally speaking, an automation in the IoT context
can be defined in the form of a trigger-action rule, which activates a device’s functionality
or a service when a specific situation is detected, e.g., in the environment or another service.
Nowadays the most widespread application to define such rules is IFTTT 1. Automation rules
can use diferent formats that ofer diferent levels of expressivity. For example, IFTTT allowed
for rules comprised of a single trigger and a single action, and recently a commercial version
with more possibilities has been made available. Other approaches (e.g., [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]) have adapted the
Event-Condition-Action (ECA) syntax from Active Databases. It is also possible to use less
limiting languages such as [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], where more rule structures are possible, allowing for example
to specify that an event has not happened in a time interval, or [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], where the ECA rules are
obtained through questions concerning temporal or spatial aspects.
LGOBE https://github.com/andrematt/ (A.
      </p>
      <p>Mattioli); https://giove.isti.cnr.it/Users/Fabio/index.html (F. Paternò)
© 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
CEUR
Workshop
Proceedings</p>
      <p>
        Regardless of the adopted rule structure, automation rules are typically defined using visual
editors, but often such tools are not found to be immediate to understand and engaging, thus
their use is somewhat limited [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. To make the specification of automations easier, less prone to
errors, and more engaging, we propose the use of AR to interact with the user’s surrounding
environment and allow for the definition of coordinated behaviours between objects. AR
involves the superimposition of virtual content over a view of the real world, which can be
acquired using the smartphone camera. The virtual content provides additional information not
“naturally” present in the environment. In this paper, we introduce an AR-based automation
management app for smart home that relies on the concept of perceivable rules to render
automations explicitly visible in the environment, together with their configuration, activation
and explanation. To ensure that users do not need an additional device for this purpose, we
focus on an approach that uses a standard smartphone instead of a dedicated, and possibly
expensive, one (e.g., a head-mounted display).
      </p>
      <p>In the next section, we will define the background and introduce some related previous work.
Then, the design of the proposed solution will be discussed with respect to the literature and to
the challenges we faced so far. Next, further possibilities that can be explored will be introduced.
Finally, we draw some conclusions and provide indications for future work.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>
        The creation of an automation rule usually consists of selecting the desired functionality,
defining its parameters, and repeating this process for the various rule elements that comprise
the automation. As reported in the literature [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], this apparently simple task presents some
subtle obstacles that can lead to the specification of an automation that does not correspond to
the user’s intent. These dificulties are often related to timing aspects of triggers and actions.
Even the selection of a rule element is not as straightforward as it may seem, because some
knowledge of the connected objects and their functionalities is required. This operation can be
time-consuming and may lead to errors [
        <xref ref-type="bibr" rid="ref2 ref6">6, 2</xref>
        ], especially when there are many devices that may
be duplicated in diferent environments (e.g., a Philips HUE light in each room).
      </p>
      <p>
        Previous research on augmented reality in smart homes focuses mostly on visualizing
information over a target object, controlling single devices, or creating simple rules [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. An
approach that allows for creation of automations that connect multiple devices is HoloFlows
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], where mixed reality is used as an interface to a BPMN application, which is used to model
smart home automations as processes. Another conceptually related approach, but applied in
another domain, is COLLECE-2.0 [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], in which AR is used to visualize the flow of information
in a computer program, using the metaphor of road trafic. The goal is to provide novice
programmers with an easy to understand graphic notation of programs and algorithms.
      </p>
      <p>
        We also based this investigation on our previous experience in mobile AR for smart homes
[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], where we put forward a first proposal to creating automations using a natural, spontaneous
approach (Spontaneous Automation Creation, SAC). Relying on the Vuforia2 object detection,
the SAC app can identify objects present in the environment, and use them as an “activation
point” for a panel that allows for the configuration of the rule. The approach received overall
positive feedback during a first user test carried out in a student home equipped with various
connected objects. However, some participants found the process of object recognition to be
rather long at times, others expressed the desire to generate more expressive rules, and found
that the distinction between events and conditions was not emphasised enough.
3. Designing the perceivable automations approach
Based on our previous experience and the literature, we have defined the following list of main
requirements for a novel solution: remove the need for a detection phase before interacting
with an object, allow for more expressive rules, provide efective AR visualizations to facilitate
the automations creation, and support the management of multiple rules active in the same
context.
      </p>
      <sec id="sec-2-1">
        <title>3.1. Detection phase</title>
        <p>To ensure a seamless and pleasant experience, the representations of automations have to blend
in a meaningful way with the real world, e.g., placing them over the objects they refer to. Objects
can be identified using diferent techniques. The standard AR approach relies on the distinctive
feature points of the object or uses specifically made images (markers). Another possibility
is using machine learning, where object detection models such as YOLO3 or EficientDet [ 9]
are used to detect the position of the object on the screen. The third approach is combining
machine learning object detection with the AR frameworks capability of capturing the position
of feature points and planes in the real world. Another solution is to not identify the objects
during the use, but rather retrieve their positions as previously detected with another approach.</p>
        <p>At the moment, the prototype is divided into two separated phases, “get object position”
and “rule editor” (see Figure 1). In the “get object position” phase, the third (combined)
approach is used to save the locations of objects that can be interacted with. In the “rule editor”,
the positions of the objects are retrieved and used to generate a placeholder visualization (a
lfoating exclamation mark) that indicates that they are ready for use. This allows for a more
immediate interaction: when the application starts, the placeholder visualizations are already
in the environment, not requiring a first identification stage or going near them to initiate the
interaction.</p>
      </sec>
      <sec id="sec-2-2">
        <title>3.2. Rules expressivity</title>
        <p>Regarding rules expressivity, the goal is to allow for diferent automation structures to match
the diferent possible user intents. Structures can be simple, comprised of one element in the
trigger and one in the action part, or compound, with more elements in one part and/or in the
other. Simple rule structures are the “event – action”, the “condition – action” and “not event –
action” (when the check is whether an event has not been verified in a time interval). Compound
rule structures regard multiple events (linked by the or operator), multiple conditions (using
the and/or operators) and actions (using the sequential/parallel operators), possibly combined.</p>
        <p>3https://pjreddie.com/darknet/yolo/</p>
      </sec>
      <sec id="sec-2-3">
        <title>3.3. AR automation visualizations efectiveness</title>
        <p>Regarding the AR visualizations of automations, the main concept is the definition of each part
of the automation directly on the visualization related to that object or service. After a first
definition of an automation part (e.g., “when the living room door is opened”), the user can
continue to add more parts (e.g., the condition “and the living door window is open”, or the
action “turn of the kitchen light”). Each selected rule element has its related representation, for
example, a 3D activable switch is used with objects that can be turned on and of, while a slider
for the selection of an integer value is displayed (see Figure 2). The connection between rule
elements (Boolean operators, sequential or parallel operators for actions, and the link between
the trigger and the action part of the rule) is also depicted. Connections can be rendered using
wires or dynamic direction arrows between objects. Considering the size of a mobile device
screen, this information must be presented in a balanced manner to not clutter the scene.</p>
      </sec>
      <sec id="sec-2-4">
        <title>3.4. Reasoning about multiple rules</title>
        <p>Describing automations in isolation, although useful, may not be enough. To be useful in a real
situation where multiple automations can be active at the same time, a way to analyse them
and to ensure that their efects are not in conflict should be introduced. For this reason, we are
implementing a way to select and show multiple rules in the environment at the same time. If a
conflict is detected (e.g., two contrasting actions triggered by diferent events) the user will be
notified. A debugger, that allows simulating changes in the values of the objects to check for
conflicts is also in development. The activation signal (originated from a simulated event) can
visually show its efects on the other objects through the “wires” that connect the various rule
elements.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4. Extending the editor capabilities</title>
      <p>Another research direction is how to integrate a recommendation system in the editor.
Recommendations can suggest automations related to the current context: for example, about
the selected rule element (as in [10]) or the detected activity. AR can be used to visualize the
recommendations and their relations with already existing automations. Another possibility
is to visualize the explanation of why a suggestion has been generated. However, specific
inquiries about recommendations for AR are still in an initial phase (for example, [11]), and
further research is required for investigating how to exploit them in order to support automation
management.</p>
    </sec>
    <sec id="sec-4">
      <title>5. Conclusions</title>
      <p>In this position paper, we introduce a novel approach to automation rules that capitalizes on
the relation between the objects and the environment, and make the automations perceivable
through AR in order to improve their transparency and facilitate their management by end users.
Our ultimate goal is not only to support end-user monitoring and creation of automations in
isolation, but also to find an appropriate representation to define and make explicit the relations
between objects. In future work, we will focus on the evaluation of this approach. A user test
will be carried out to measure the usability of the prototype, the users’ willingness to adopt it,
and the number and type of errors in the creation of automations. In addition, we will extend
the application, integrating a debugger and a recommendation system specifically for its use.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work has been supported by the PRIN 2017 “EMPATHY: Empowering People in Dealing
with Internet of Things Ecosystems”, https://www.empathy-project.eu/.</p>
      <p>Redondo, A modern approach to supporting program visualization: from a 2D notation
to 3D representations using augmented reality, Multimed Tools Appl 80 (2021) 543–574.
doi:1 0 . 1 0 0 7 / s 1 1 0 4 2 - 0 2 0 - 0 9 6 1 1 - 0 .
[9] M. Tan, R. Pang, Q. V. Le, EficientDet: Scalable and Eficient Object Detection, in: 2020
IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), IEEE, Seattle,
WA, USA, 2020, pp. 10778–10787. doi:1 0 . 1 1 0 9 / C V P R 4 2 6 0 0 . 2 0 2 0 . 0 1 0 7 9 .
[10] A. Mattioli, F. Paternò, Recommendations for creating trigger-action rules in a block-based
environment, Behaviour &amp; Information Technology 40 (2021) 1024–1034. doi:1 0 . 1 0 8 0 /
0 1 4 4 9 2 9 X . 2 0 2 1 . 1 9 0 0 3 9 6 .
[11] W. Büschel, A. Mitschick, R. Dachselt, Here and Now: Reality-Based Information Retrieval:
Perspective Paper, in: Proceedings of the 2018 Conference on Human Information
Interaction&amp;Retrieval - CHIIR ’18, ACM Press, New Brunswick, NJ, USA, 2018, pp. 171–180.
doi:1 0 . 1 1 4 5 / 3 1 7 6 3 4 9 . 3 1 7 6 3 8 4 .</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>N.</given-names>
            <surname>Bak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.-M.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Choi</surname>
          </string-name>
          , Smart Block:
          <article-title>A Visual Programming Environment for SmartThings</article-title>
          ,
          <source>in: 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC)</source>
          , IEEE, Tokyo, Japan,
          <year>2018</year>
          , pp.
          <fpage>32</fpage>
          -
          <lpage>37</lpage>
          .
          <source>doi:1 0 . 1 1</source>
          0 9 /
          <string-name>
            <surname>C O M P S A C .</surname>
          </string-name>
          <article-title>2 0 1 8 . 1 0 1 9 9</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>G.</given-names>
            <surname>Ghiani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Manca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Paternò</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Santoro</surname>
          </string-name>
          , Personalization of Context-Dependent
          <string-name>
            <surname>Applications Through Trigger-Action</surname>
            <given-names>Rules</given-names>
          </string-name>
          ,
          <source>ACM Trans. Comput.-Hum. Interact</source>
          .
          <volume>24</volume>
          (
          <year>2017</year>
          )
          <fpage>1</fpage>
          -
          <lpage>33</lpage>
          .
          <source>doi:1 0 . 1 1</source>
          <volume>4 5 / 3 0 5 7 8 6 1 .</volume>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Desolda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Ardito</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Matera</surname>
          </string-name>
          , Empowering End Users to Customize their Smart Environments: Model,
          <string-name>
            <given-names>Composition</given-names>
            <surname>Paradigms</surname>
          </string-name>
          , and
          <string-name>
            <surname>Domain-Specific</surname>
            <given-names>Tools</given-names>
          </string-name>
          ,
          <source>ACM Trans. Comput.-Hum. Interact</source>
          .
          <volume>24</volume>
          (
          <year>2017</year>
          )
          <fpage>1</fpage>
          -
          <lpage>52</lpage>
          .
          <source>doi:1 0 . 1 1</source>
          <volume>4 5 / 3 0 5 7 8 5 9 .</volume>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Ariano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Manca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Paternò</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Santoro</surname>
          </string-name>
          ,
          <article-title>Smartphone-based augmented reality for end-user creation of home automations</article-title>
          , Behaviour &amp; Information
          <string-name>
            <surname>Technology</surname>
          </string-name>
          (
          <year>2022</year>
          )
          <fpage>1</fpage>
          -
          <lpage>17</lpage>
          .
          <source>doi:1 0 . 1 0</source>
          <volume>8 0 / 0 1 4 4 9 2 9 X . 2 0 2 1 . 2 0 1 7 4 8 2 .</volume>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>W.</given-names>
            <surname>Brackenbury</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Deora</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Ritchey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Vallee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. L.</given-names>
            <surname>Littman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Ur</surname>
          </string-name>
          ,
          <article-title>How Users Interpret Bugs in Trigger-Action Programming</article-title>
          ,
          <source>in: Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems</source>
          , ACM, Glasgow Scotland Uk,
          <year>2019</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          .
          <source>doi:1 0 . 1 1</source>
          <volume>4 5 / 3 2 9 0 6 0 5 . 3 3 0 0 7 8 2 .</volume>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Gallo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Manca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mattioli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Paternò</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Santoro</surname>
          </string-name>
          ,
          <article-title>Comparative Analysis of Composition Paradigms for Personalization Rules in IoT Settings, in: End-User Development</article-title>
          , volume
          <volume>12724</volume>
          , Springer International Publishing, Cham,
          <year>2021</year>
          , pp.
          <fpage>53</fpage>
          -
          <lpage>70</lpage>
          .
          <source>doi:1 0 . 1 0</source>
          <volume>0 7 / 9 7 8 - 3 - 0 3 0 - 7 9 8 4 0 - 6</volume>
          _
          <fpage>4</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>R.</given-names>
            <surname>Seiger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kühn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Korzetz</surname>
          </string-name>
          , U. Aßmann,
          <article-title>HoloFlows: modelling of processes for the Internet of Things in mixed reality</article-title>
          ,
          <source>Softw Syst Model</source>
          <volume>20</volume>
          (
          <year>2021</year>
          )
          <fpage>1465</fpage>
          -
          <lpage>1489</lpage>
          .
          <source>doi: 1 0 . 1 0 0 7 / s 1 0</source>
          <volume>2 7 0 - 0 2 0 - 0 0 8 5 9 - 6</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S.</given-names>
            <surname>Schez-Sobrino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Á. García</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lacave</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. I.</given-names>
            <surname>Molina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Glez-Morcillo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Vallejo</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          Á.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>