Inspiration

Walking around, wasting time, looking for a study spot during exams season was something that motivated us to create a solution to this problem through this project

What it does

There are three parts to the project - the hardware module at every study room, the Google Assistant application and the vacancy estimator. When you walk into a study space and see an empty room, you can simply walk in and press the reserve option on the hardware module. The module shows that the room is now booked and at what time the reservation ends. The other portion allows students to interact with the Google Assistant to view open rooms and reserve them. Lastly, the study area vacancy estimator uses a raspberry pi to monitor the network it is connected to, analyse the traffic and determine the number of people (Mac Addresses) in that location.

How we built it

For the hardware module we used a Raspberry Pi with a TFT touch screen. We built a NodeJS app to run locally and act as the hardware UI. This web app displays the time left if the room is booked, or allows the person to reserve it if the room is open. The local app interface needed to be able to interact with our MongoDB datastore to sync with the Google Assistant Requests.

For the Google Assistant App, we had to create another NodeJS web service. This service was made so it could process the fulfillment from the Google Assistant user intents and deploy it to Heroku so the Assistant could access it. For example, it would process to save a room to MongoDB when a person says "Save room 201 in McLoud building".

For the study area vacancy estimator, we used a raspberry pi with two wifi dongles, one to send information to a server and the other one to monitor the network connected to; Using a python script we automated the execution of linux shell commands using aircrack in order to monitor the traffic on the network and determine the amount of users per router(BSSID) which allows us to analyse and estimate the vacancy percentage in the study area.

Challenges we ran into

With hardware module we wanted to start off using an Azure SQL server, however we spent a large amount of time figuring out the documentation. Eventually we made the call and switched to a MongoDB solution.

Regarding the Assistant App, the trickiest part was processing the Webhook fulfillment request. For this we ended up just reading the raw JSON request and sending back a formatted JSON response that the Assistant API knew how to interpret.

Due to the nature of the Raspberry Pi, we found that the Pi 2 and above lacked the drivers to set a wifi adapter into monitor mode, thus we had to use a raspberry pi with 2 wifi adapters. Moreover, its small processing power limited our ability to run many sub processes simultaneously.

Accomplishments that we're proud of

I think we are most proud of getting all these sub-systems integrated and working together. Also it was very interesting to work with a voice recognition service like Dialogflow for Google Assistant.

In addition, the ability to get a accurate percentage of the availability of a common study area with an autonomous script connected to a database is something that we believe could be a potential solution for the lack of study spaces issues in UBC.

Built With

Share this project:
×

Updates