Skip to content

05) MVP

jules185 edited this page Jun 27, 2017 · 4 revisions

The minimum viable product designed during the course of the two day hackathon consists of a student webpage, a Telegram bot, a lecturer dashboard and an output in the fashion of a traffic light signaling the current status of the break score.

Overview StayFocussed

Webpage

The webpage is hosted on the Raspberry Pi and is reachable via the URL of the Raspberry. Here the students have the possibility to click the “Request Break” button every 90 minutes.

Webpage Button Webpage Button Pressed

The page is accessible via every device running a browser.

Webpage Button Mobile Webpage Button Pressed Mobile

Telegram StayFocussed Bot

The StayFocussed bot (https://telegram.me/stayfocussed_bot) can be used from the Telegram Messenger, which is available for mobile and PC. When the bot is accessed for the first time, the students or lecturers have to click /start in order to activate the bot such that it is allowed to send messages to the user. A welcome message explains the available bot commands which are for students:

/register - Sign up for recent lecture
/break - Request a break (is allowed every 90 minutes)
/unregister - Unregister from recent lecture and messages

When students are registered they receive messages when the lecture starts and stops as well as when scoring thresholds are crossed.

The lecturer can use two additional functions:

/start_lecture - Starts a new lecture interval
/stop_lecture - Stops the lecture interval

This is what the commands look like in the Telegram app:

Telegram Bot Start Bot Commands Bot Conversation

The bot is responsive, every time it receives a command it sends a response to the requester:

Bot Conversation Bot Conversation Bot Conversation Bot Conversation

The bot can also respond to prohibited or unknown messages:

Bot Conversation Bot Conversation Bot Conversation

This is what a typical student interaction with the bot could look like:

Bot Conversation

Lecturer Dashboard

The lecturer dashboard was created in Home Assistant using available components, the configuration file and the python script for coordinating the interaction between the bot and the dashboard.

Lecturer Dashboard StayFocussed Inactive Lecturer Dashboard Active

The dashboard consists of the following items:

  • Brightness sensor in lux
  • CO2 ratio in parts per million
  • Break switch: activate and deactivate Hue light and see its color status (red, yellow, green)
  • Lecture switch: start and stop the lecture
  • Timer: shows the time since the lecture started
  • Break score in points (for calculation see Nassi-Shneiderman Diagram)
  • Break Request Count: Number of breaks requested via bot or web page since the lecture started

If the break score gets too high a notification is shown on the dashboard:

Notification

These notifications are also available for too high CO2 levels and when it is too dark in the room.

Philips Hue

The Philips Hue acts as a status light for the overall break score. The light is green when the score is below 50, yellow as long as the score is between 50 and 100 and red when the score is above 100.

Clone this wiki locally