# Leveraging LoRaWAN Technology for Precision Agriculture in Greenhouses
## 4 Customized Dashboard and Data Analysis  
For the data analysis and visualization, we have used the ThingsBoard customized dashboard as shown in Figures 9 and 10. It allows the stakeholders like people from botany, data researchers and analysts, also growers to perform data mining for their respective use cases. It gives the real-time data for crop health and disease prediction. Also, there is a provision to fetch the box specific historical data over a time period. From security perspective, dashboard allows the admin to define the role of different users. There are two levels of security, the first level is through credential-based authentication and the next level is access-based, i.e., each user can read and write specific sources of data depending on the assigned rights. Post login, a user can select the sensor from the available list of deployed sensors and the option of real-time data or historical data. Also, it provides the provision for visualizing the data for a particular time interval as the mean value. Post selection of the sensor box, the dashboard exhibits the data of all the sensors attached to the respective sensor box. Each sensor box deployed in the greenhouse has numbering which is mapped with its data representation on the dashboard. In the Figure 9, we have selected the Grow box number 3 (airflow box number) with the time interval for full month of August. Therefore, it shows the result as, all the sensor values of the attached sensors with the airflow box number 3 for the given period. For the precision agriculture in the greenhouse, we provide the data seekers with two possibilities to fetch the data. The best case by pulling the data from the dashboard and worst case (scenario where dashboard stops working), we provide a python script to export the sensor data directly from our MongoDB database in a required format.  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Sensor** & **Type** & **Parameters** \\ \hline SHT31 & Embedded on OCTA-Connect & Temperature (\({}^{\circ}\)C), Relative Humidity (\%) \\ TCS34725 & Embedded on OCTA-Connect & Illuminance (lux) \\ Cozir & Sensor shield & CO\({}_{2}\) (ppm) \\ Water & Sensor shield with probe & Temperature (\({}^{\circ}\)C), Conductivity (\(\upmu\)S cm\({}^{-1}\)), Impedance (\(\Omega\)) \\ Strip (SHT \& TCS) & Shield with expandable strip & Temperature (\({}^{\circ}\)C), Relative Humidity (\%), Illuminance (lux) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Available sensors overview.  
Figure 8: End-to-end data flow from sensors to the dashboard.  
Figure 11, is another perspective of the dashboard to visualize the location for the deployed sensor boxes. This helps to see the list of available sensors boxes in the greenhouse along with their link budget, average temperature, humidity and other sensor readings for a given sensor box. The real-time data for one or more sensor boxes can also be demonstrated through the dashboard, it will show the sensor readings for those attached to the respective sensor box. In greenhouses, light plays an important role in plant growth. Therefore, for this scenario, the sensor box reports the data for RGB value, light intensity, temperature and humidity and other readings important for the plant growth.  
Figure 10, shows the reading of a water sensor attached to one of the sensor boxes in the greenhouse. Also, the variation of the microclimate readings over a period of one month. This shows the sensor value gradient over the greenhouse. The peak values are mostly observed when the windows of the greenhouse are opened which effects the overall environmental conditions in the greenhouse. For instance, the CO\({}_{2}\) levels are increased by pumping CO\({}_{2}\) into the greenhouse and regulate these CO\({}_{2}\) levels back to normal by opening the windows, and letting cleaner air in from the outside.  
Figure 10: EC reading values.  
Figure 9: Dashboard showing sensor values for tomato crop (one-month data with message interval of 5 min).