Requirements
Requirements
1. Functional Requirements:
2. Non-Functional Requirements:
1. Performance:
o The system shall ensure real-time data updates and synchronization to provide
accurate and timely graphs.
o The system shall handle high volumes of data from multiple sensors
efficiently.
2. Reliability:
o The system shall ensure data consistency between the local and cloud
databases through robust synchronization mechanisms.
o The system shall handle network failures gracefully and retry synchronization
when the network is restored.
3. Usability:
o The system shall provide intuitive and user-friendly interfaces for viewing
water usage and quality graphs.
o The system shall allow users to easily switch between different time periods
for data analysis.
4. Scalability:
o The system shall support scaling to multiple buildings and apartments,
handling data from numerous sensors and users.
o The system shall ensure efficient data storage and retrieval mechanisms to
accommodate growing data volumes.
I. Since this is real-time data recording this function loops to continuously record sensor
data.
II. The microcontroller requests and gets readings from Actuators sensors, Inlet/Outlet
Flow Sensors (YF S201), Turbidity Sensor (TSD 10) and PH Sensor (SEN 0161) data
every 5 seconds.
III. The NodeMCU microcontroller processes and calculates water usage based on the
inlet and outlet flow sensor data
IV. The NodeMCU microcontroller processes and calculates water quality based on the
turbidity sensor data
V. The microcontroller sends the sensor data and calculated values to the Database
Controller (Backend Server) via the Network Module.
VI. The Backend Server forwards sensor data to the Health Recorder and then saves all
data in the Local Database and updates logs on successful operation.
VII. Health Recorder evaluates the sensor data to analyse the data for any anomalies. If an
anomaly occurs the alert is sent to the Control System which then handles the
situation given in XYZ diagram.
Data Analytics:
I. The User requests graph view by tapping graph and entering the time period of the
graph in the User Interface (UI) on the user’s device.
II. On the Statistics Controller the GenerateShowStatistics() function is initiated with the
“Time period” parameter. Which can either be “Current” or any month. Blank graphs
are also created for data to be plotted in it.
III. The Database Controller retrieves the current (Real-time) quality and usage data from
the Local Database and historical data from the cloud database.
IV. The Database Controller sends this data back to Statistics Controller which then
updates the graphs with the values plotted on the graph.
V. The Statistics Controller then send this graph to User Interface (UI) for rendering and
displaying it to the User.