Multiple sensors collect data regarding the status of soap, trash and toilet paper of every bathroom.
The data collected is processed and compared to threshold values in order to differentiate critical, not-so-fine and fine conditions.
Users are notified whenever the system recognizes a critical condition, only about their favorite bathrooms (if inserted) and only during work/class time (if inserted).
Users can interact with the system by tapping on a bathroom’s icon on the map in order to get the info previously collected.
See sensing section.
The system is able to respond to the cleaning staff needs of hurrying to manage the critical conditions of some specific bathrooms.
The system is able to respond to the students needs of knowing if the bathroom they chose provides what they need.
The system adapts to the different situations: it is able to recognise when to notify users about critical conditions.
All the hardware components are hidden from sight.
Not so much.
The system is able to learn when to increase or decrease the checking frequency, depending on the usage of the bathroom.
W.C. is a system that allows users to check the bathrooms' status, in terms of amount of garbage in trashcans, amount of soap, presence (or lack) of toilet paper.
It consists of a map of the Politecnico, that shows where all the bathrooms are located and indicates, using different colors (red, yellow, green), whether that place is in a critical condition or not.
W.C. provides also a notification system, that can be enabled/disabled:
if enabled, users can decide to add some specific bathrooms to their preferences to be notified about, or they can add their working/class schedule to set when to be notified;
if disabled, they can always check a particular bathroom status by tapping on its icon: this will show, using the same color pattern described before, the status of each one of the three items, and also the time when this data was last collected.
The system is able to learn when to increase/decrease the automatic checking frequency: if the last data collected differs considerably from the current one, the sampling frequency increases, if not, it decreases accordingly.
system = the W.C. mobile application and all the other hardware/software components
map = a Politecnico map provided by the W.C. application
users = either a cleaning staff member or a student in need of a bathroom
preferences = a list of specific-located bathrooms whence the user can receive notifications and check the status
icon = a bathroom identification icon on the map which can assume three different colors depending on the condition (green, yellow, red) and three different pictures for bathroom reserved for men and women or with disability access
items = soap, trash, and toilet paper in each bathroom (see definition)
bathroom = a room equipped with a sink and a toilet that includes at least one of the three items
data = the amount of toilet paper, soap, trash in the bathroom.
upper threshold (item) = threshold above which the item is almost or completely full
lower threshold (item) = threshold below which the item is almost or completely empty
fine condition (item) = the amount of toilet paper is above its upper threshold, the amount of soap is above its upper threshold, the amount of trash is below its lower threshold
not so fine condition (item) = the amount of each item is bewtween its lower and its upper threshold
critical condition (item) = the amount of toilet paper is below its lower threshold, the amount of soap is below its lower threshold, the amount of trash is above its upper threshold
upper threshold (bathroom) = threshold above which the average condition of its items is fine
lower threshold (bathroom) = threshold below which the average condition of its items is critical
fine condition (bathroom) = the average condition of the three items inside that bathroom is above the upper threshold
not so fine condition (bathroom) = the average condition of the three items inside that bathroom is between the lower and the upper threshold
critical condition (bathroom)= the average condition of the three items inside that bathroom is below the lower threshold
working/class schedule = time intervals to choose from, during which users will be notified
Students in need of a bathroom
Bathroom-cleaning staff
The following functional requiments are implemented by the server:
The following functional requiments are implemented by the Local Gateway:
The following functional requiments are implemented by the mobile application:
METHOD: POST
URL: /api/v1.0/bathrooms/bathroom/updateItem
INPUT: JSON Object with one key and an array as value
RETURN: JSON Object with one key and a string as value
Updates the amount of an item in a certain bathroom and establishes how the sampling period should change
Input | Description |
key | status |
value[0] | A string representing the floor where the bathroom containing the specified item is located |
value[1] | A string containing the name of the bathroom in which the item is located |
value[2] | A string containing the name of the item |
value[3] | A float representing the value of the measure taken by the sensor |
value[4] | A string representing the day of the measure (dd/mm/yyyy) |
value[5] | A string representing the time of the measure (hh:mm) |
Return value | Description |
key | action |
value: decrease | The sampling period must be decreased |
value: reset | The sampling period must be restored to the initial value |
value: stay | The sampling period must remain the same |
NOTE: the values described above refer to time, so decreasing the sampling period actually means raising the checking frequency
METHOD: GET
URL: /api/v1.0/bathrooms/bathroomID
INPUT: Bathroom ID
RETURN: JSON Object with the amount of each item in the specified bathroom
Provides the condition of all the items in the selected bathroom
Input | Description |
bathroomID | The name of the bathroom you're interested in |
Return value | Description |
key | Each key corresponds to the name of an item in the specified bathroom (e.g Toilet paper 1,2..., Soap 1,2...) |
value[0] | An integer representing the amount of the item (%) |
value[1] | A string that specifies when the data was collected, using the following format: (dd/mm/yyyy hh:mm) |
METHOD: GET
URL: /api/v1.0/bathrooms/map/floor
INPUT: floor
RETURN: JSON Object with the condition of each bathroom in the selected floor
Provides the situation of each bathroom in the selected floor
Input | Description |
floor | The selected floor (e.g 0, 1) |
Return value | Description |
key | Each key corresponds to the name of a bathroom in the specified foor |
value | An integer between 0 and 2 representing the condition of the bathroom [0 = critical, 1 = not so fine, 2 = fine] |
METHOD: POST
URL: /api/v1.0/device/register
INPUT: JSON Object with the registration ID
RETURN: JSON Object with the device ID
Manages the registration of a device on the server
Input | Description |
key | registrationID |
value | A string containing the registrationID assigned by Google Cloud Messaging service |
Return value | Description |
key | deviceID |
value | An integer corresponding to the deviceID assigned by the server |
METHOD: POST
URL: /api/v1.0/device/setNotification
INPUT: JSON Object with the device ID and an action
RETURN: No value returned
Enables or disables the notification system for a device
Input | Description |
keys | deviceID, value |
value | An integer containing the deviceID obtained during the
registration [ key: deviceID ] A string (yes/no) to enable/disable the notification system [ key: value ] |
METHOD: POST
URL: /api/v1.0/device/setSchedule
INPUT: JSON Object with the deviceID and the selected schedule
RETURN: No value returned
Allows a device to set a specific schedule
Input | Description |
key | deviceID and the name of the days of the selected schedule (Monday,Tuesday...) |
value | An integer containing the deviceID obtained during the
registration [ key: deviceID ] For each day, a value that could be a single string or an array of strings, each one containing a time interval (e.g: 11:00-13:00, 17:30-19:30) [ key: name of the day ] |
METHOD: POST
URL: /api/v1.0/device/favorites
INPUT: JSON Object with the deviceID, the action to be performed and the bathroom
RETURN: No value returned
Inserts or removes a bathroom to/from the list of favorites of a device
Input | Description |
key | deviceID, action, bathroomID |
value | An integer containing the deviceID obtained during the
registration [key: deviceID ] String containing the action to be performed (add/remove) [ key: action ] String containing the name of the bathroom [ key: bathroomID ] |