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.
Libraries used
- Seeeduino SAMD Core (1.8.3) by Seeed Studio
- Grove Temperature And Humidity Sensor (2.0.1) by Seeed Studio
- Grove Ultrasonic Ranger (1.0.1) by Seeed Studio
- PubSubClient (2.8.0) by Nick O’Leary
- FS (File System) (2.1.1) by Seeed Studio
- rpcUnified (2.1.4) by Seeed Studio
- rpcWiFi (1.0.6) by Seeed Studio
- SFUD (Serial Flash Universal Driver) (2.0.2) by Seeed Studio
- Mbed TLS (3.0.1) by Seeed Studio
-
OS: Windows/Linux
-
Internet Access: Required
Note: We believe that the system should also work on Mac OS, however it has not been tested.
- WIO Terminal
- Wio Terminal Chassis Battery
- Grove Ultrasonic Sensor x 2
- Grove Temperature and Humidity Sensor
- Grove Buzzer
-
Git installed.
-
Java JDK properly installed.
-
Arduino CLI properly installed.
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.
Before starting, ensure you have the following prerequisites.
-
Open your terminal and clone the repository.
git clone https://git.chalmers.se/courses/dit113/2023/group-6/group-6.git
-
Go to the installation repository.
cd group-6
-
Connect the WIO Terminal and your Android Device to your computer with USB or USB Type C.
-
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
-
Follow the steps on the install script.
-
Done!
-
Download Mosquitto and follow the installation.
-
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
-
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
-
Done! The broker is now online on the network your device is connected to!
How to find your IPv4:
-
Open a terminal and run:
In Windows
ipconfig
In Linux
ip addr show
In MacOS:
cat /sbin/ifconfig
-
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
.
Make sure to look into the official WIO Terminal User Manual by Seeed Studio!
- For more information, check out the hardware architecture.
-
Displays all room data in the following order:
- Loudness level
- Number of people
- Temperature level
- Humidity level
-
The "plus" and "minus" buttons will respectively adjust the people counter in accordance with the number of button presses.
- Allows the user to insert an IP address and pressing the "Connect" button to connect to the broker.
- Allows the user to change alert thresholds by inserting values and hitting the “Save” button.
- 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.
- 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
- Mainly worked on the WIO Terminal and the pipeline. Contributed to the readme, the wiki and the android app.
- 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.
- Developed the people movement detection algorithm, loudness measurement, and redesigned the mobile app. Also worked on test coverage reporting and contributed to the documentation.
- 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.