## 4 Discussion  
The main aim of this research was to contribute to the Rwanda biogas industry by designing and implementing a testable solution for the biogas community to collect and manage the data and biogas functionality statuses. This research paper implemented an approach for an IoT-based framework to gather multivariate time-series data of biogas digester environmental parameters. The prototyping was conducted in a home environment with a series of activities, such as data acquisitions using one designed sensor node  
Figure 8: Relationship between biogas yield and environmental parameters. (with five mounted sensors to capture environmental parameters). Each sensor node was assigned to a unique identifier and as well as assigning it to a specific biogas owner. This setup helped contribute to mapping Biogas owners in Rwanda and could help the decision makers to know in real-time the status of the biogas setup in general. The backend configuration of the proposed framework was made in such a way that apart from the biogas owner receiving notifications, all data from different deployed sensor nodes owned could be controlled and managed under a secure and authenticated user interface. The developed IoT framework comprised a Raspberry Pi sensor kit and is equipped with several sensors, such as an indoor and outdoor temperature sensor, pH sensor, moisture sensor, and actuators, which are shown in Figure 4 and explained in Tables 2 and 3. These data were then uploaded to a central gateway database using the MQTT protocol, as depicted in Figure 2. The MQTT protocol was configured to allow real-time communication at a low bandwidth. The platform was designed in the publish-subscribe paradigm, and the parameters sent were considered topics, while the time series data sent were messages. As disputed in Figure 5, the edge node was configured as the MQTT-client publisher to the MQTT broker. The edge node published data to the MQTT broker. The Mongo database was configured as an MQTT-client subscriber. The messages captured from the edge node were gathered to the Mongo server database, as presented in Figure 5 and, in this research, an unstructured database management system called MongoDB was adopted. From a web perspective, the Laraval PHP framework was explored to develop the back-end web services which read data from the database to display them to the web interface, as shown in Figure 6. The system setup was placed in the production environment and tested for a period of 30 days. Further, the collected data were subsequently analyzed by a statical and supervised machine learning model to analyze the effect of the environmental parameters, including indoor temperature, outdoor temperature, Ph, and moisture, on biogas production. The data sets acquired from the IoT platform were analyzed using both the Pearson correlation coefficient and the multiple linear regression OSL model with a Python programming environment. Through the multiple linear regression analysis, the performance of the model was evaluated using the R-squared metric. Therefore, the OLS model result presented an R-squared value of 0.734, indicating that approximately 73.4% of the variability in biogas production presented a good fit and could effectively predict the biogas production process, as shown in Table 6. From Pearson's correlation perspective, the variables were correlated in a way that provided insight, while the indoor temperature and pH presented a strong correlation with a correlation coefficient of 0.78 and \(-\)0.6, respectively. The outdoor temperature presented a moderate correlation of 0.46, as shown in Figure 7.  
While implementing the abovementioned architecture, the following were found as limitations: a lack of benchmarks for sensor calibrations, the need for industrial sensors for precise accuracy, and sensor power harvesting during prototype deployment.