Skip to content

ssheloors/Locus-Imperium

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Locus Imperium

A room controlling device that reads room data attributes such as temperature, humidity, loudness, and estimates how many people are in the room at any given moment.

Table of Contents

Links

Introduction

Purpose and Benefits

The purpose of this project is to create a device that reads room data attributes such as temperature, humidity, loudness, and the amount of people in a room.

This information allows the user to study the air quality and ensure that they and their peers are in a healthy environment. For example:

  • Keeping track of the room temperature and being able to regulate it whenever it exceeds the set limit guarantees everybody's comfort.
  • Monitoring the level of humidity in the room and making sure it does not surpass the recommended relative humidity indoors could prevent undesirable conditions such as dry skin, dampness, mold formation, etc.
  • The user can further prevent everyone around them from being in an unpleasant environment by keeping an eye on the loudness level. Any loud noise over a prolonged period of time may damage one's hearing.

All this information could be useful to determine a relation between the amount of people in the room and the air quality.

How the system works

Hardware Architecture

Hardware Architecture

Software Architecture

MQTT Architecture

Locus Imperium

Sequence Diagram

Locus Imperium

Tools used

Libraries used

Installation

Prerequisites

System Requirements

  • OS: Windows/Linux

  • Internet Access: Required

Note: We believe that the system should also work on Mac OS, however it has not been tested.

Hardware

Software

Note: 'properly installed' means that it is in System Environment Variables: Path for Windows or $PATH for Linux.

If you desire to host your own broker, a WiFi connection that supports MQTT is required. Make sure to connect the WIO, app and broker device to the same network.

Installation steps

Before starting, ensure you have the following prerequisites.

Installing Locus Imperium on the WIO Terminal and your Android Device

  1. Open your terminal and clone the repository.

    git clone https://git.chalmers.se/courses/dit113/2023/group-6/group-6.git
    
  2. Go to the installation repository.

    cd group-6
    
  3. Connect the WIO Terminal and your Android Device to your computer with USB or USB Type C.

  4. Run the install script adequate for your operating system and follow the instructions. Note: the linux script should also work on Mac OS.

    In Linux:

    ./linux_install.sh
    

    In Windows:

    .\windows_install.bat
    
  5. Follow the steps on the install script.

  6. Done!

(Optional) Installing Mosquitto on your dedicated broker machine

  1. Download Mosquitto and follow the installation.

  2. Go to the mosquitto folder and open mosquitto.config file in your computer, below "General configuration" add:

    listener 1883 0.0.0.0
    allow_anonymous true
    
  3. Open a terminal in the folder and enter the following script:

    In Windows and Linux:

    mosquitto -c mosquitto.conf -v
    

    In MacOS:

    brew services start mosquitto
    
  4. Done! The broker is now online on the network your device is connected to!

How to find your IPv4:
  1. Open a terminal and run:

    In Windows

    ipconfig
    

    In Linux

    ip addr show
    

    In MacOS:

    cat /sbin/ifconfig
    
  2. Find and select:
    Wireless LAN adapter Wi-Fi: IPv4 Address

Note: On Windows, if you receive "Error: Only one usage of each socket address", terminate the already running mosquitto process:

  • Open Task Manager (ctrl+shift+esc) and under processes kill mosquitto.exe.

User Manual

WIO Terminal

Make sure to look into the official WIO Terminal User Manual by Seeed Studio!

1. Connecting all the sensors

2. Button functionality (click the menu below)

Click to expand
  • A - Decrease the number of people by 1.

  • B - Increase the number of people by 1.

Buttons

Android Application

1. Home Tab

  • Displays all room data in the following order:

    1. Loudness level
    2. Number of people
    3. Temperature level
    4. Humidity level
  • The "plus" and "minus" buttons will respectively adjust the people counter in accordance with the number of button presses.

2. Connect Tab

  • Allows the user to insert an IP address and pressing the "Connect" button to connect to the broker.

3. Settings Tab

  • Allows the user to change alert thresholds by inserting values and hitting the “Save” button.

Developed by

William Andersson

  • Implemented the mqtt connection and how each part of the different systems should communicate with each other. Also was a part of developing the GUI for the WIO and the automated build script. Furthermore, worked on alerts, bugfixes, and general things.

Joshua Chiu Falck

  • Created the the android application functionality with the initial design. Functionality such as save & load settings, alerts, connecting with a different IP, displaying data from the broker as well as manually updating the people counter. Also assisted in the mqtt connection through the two systems and contributed to the wiki

Carlos Campos Herrera

  • Mainly worked on the WIO Terminal and the pipeline. Contributed to the readme, the wiki and the android app.

Marcelo Santibáñez

  • Firstly worked on MQTT connection. Implemented functionalities on the WIO terminal, screens on the Android app and also GUI and unit tests for the Java code of the app. Edited all the videos of the project.

Andrii Demchenko

  • Developed the people movement detection algorithm, loudness measurement, and redesigned the mobile app. Also worked on test coverage reporting and contributed to the documentation.

Vasilena Karaivanova

  • Contributed to the functionality of some sensors. Worked on the WIO Terminal for the most part, in terms of GUI and alerts. Additionally, worked on documentation, readme & wiki-page.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 56.7%
  • C++ 38.8%
  • Shell 2.4%
  • Batchfile 2.1%