The implementation of the location-aware IoT system

Latifa Abdullayeva
3 min readMar 19, 2021

Motivation

This is a centralized system that maintains the interaction between Smartphones (aka Mascots), Lamps, Tablets, and Speakers. Here, users’ smartphones become their personal Mascots being able to autonomously connect to four other devices, i.e., other Mascots, lamps, tablets, and speakers. The proximity is used to initiate communication between these devices. However, while the device interaction enhances network navigability, the decisions made by smart devices are not always in line with a user’s expectation. The goal of a user study was to find an approach that will take the user’s context into account.

The types of interactions between IoT devices

In this project, I implemented a prototype of the IoT system which includes two Android apps and a REST API implemented in Java and the Spring framework:

  • The client-side uses Android with the AltBeacon library.
  • The server-side uses Java, Spring Framework, Retrofit, and Philips Hue API.

The android clients can autonomously discover the service on the local network and communicate with it. The service discovery is implemented using mDNS, while proximity measurements are taken using Bluetooth and AltBeacon library on Android.

Here is the repository of the project: GitHub Autonomous System App

Goal of Study

Considering the role of the human in the IoT environment, in this system, the personality with preset actions serves as an interface for the interaction between a user and devices.

Therefore, as an input, we use:

  • the configuration of the mascot’s personality
  • proximity information of the user’s movements.

As an output, we use actions that all devices display based on the personality information that the user configured:

  • change of light
  • vibration
  • music play

The resulting behavior of devices is influenced by the predefined “personality” of the user’s Mascot.

User Documentation

When a user runs the android application for the first time, it displays the form that a user has to fill in order to configure his smartphone. For that, the user needs to follow the steps:

  • Choose the beacon ID that will help this application to measure the distance between devices.
  • Give his mascot a custom name.
  • Choose one out of five personalities displayed on the screen.

The screenshot shows the user interface of the mascot application during the device registration.

After pressing the next button, such information as beacon ID, the type, name, and the personality of the device are sent to the server and saved in the database. Starting from here, no further user interaction with the mobile phone is needed, the user can walk around and approach other devices such as other smartphones, lamps, speakers, and tablets. The application starts to measure the distance to all other beacons according to the users’ movements and sends this information to a server.

The screen capture of the user interface of the device registration page in the mascot application.

Project Presentation

The project consists of the client-side with two Android applications for mascot i.e. smartphone and tablet. The server is responsible for coordinating client applications.

  • The AutonomousSystemThesis consists of three directories:
  • MyMascotApp: The android application registers the phone in the system and measures the distance from the phone and to all beacon tags located in the room.
  • MyTabletApp: The android application that is registering the tablet in the system and displaying colors according to the personality of the approaching mascot
  • server: allows the management of all devices and beacons, and the coordination of all client applications.

The project structure is demonstrated below:

The folder structure of the whole project

The next article will cover the system architecture, technical requirements, and hardware used in the system. For more information follow the link:

--

--

Latifa Abdullayeva

Software Developer. This platform features my articles on Artificial Intelligence, Internet of Things, Development, and more.