# Energy-Efficient IoT-Based Light Control System in Smart Indoor Agriculture
## 5 Results and Discussion
### Distributed Remote Control Results  
The proposed method for the remote distributed control of grow lights was programmed in C language and implemented in the root node. Three different types of LED lights were considered in each growth chamber: PAR lights with intensity ranging from 100 to 900 \(\upmu\mathrm{mol}\cdot\mathrm{m}^{-2}\cdot\mathrm{s}^{-1}\), far-red lights with intensity ranging from 5 to 20 \(\upmu\mathrm{mol}\cdot\mathrm{m}^{-2}\cdot\mathrm{s}^{-1}\), and UV lights with intensity ranging from 1 to 9 \(\upmu\mathrm{mol}\cdot\mathrm{m}^{-2}\cdot\mathrm{s}^{-1}\). This range of different values was used to test the control method; they are not exact values, but they are within the range of values needed by some plants grown in indoor environments. The maximum illuminance produced by these LED lights is supposed to be equal to 1000 \(\upmu\mathrm{mol}\cdot\mathrm{m}^{-2}\cdot\mathrm{s}^{-1}\). The network was then simulated under the previously mentioned conditions, and the obtained results in the case of 10 nodes are given in Figures 5-11. Figure 5 is produced by the server, and it shows the PAR light intensities measured by the sensors connected to the clients in the 9 growth chambers of the indoor farming facility. The measurements are noisy, and it can be noticed that they rapidly converge to the desired values. The control values sent from the server to the clients to obtain the previous measurements are given by Figure 6; notice that these values are not affected by sensor noises. Similarly, Figures 7 and 9 are produced by the server, and they show the far-red and UV light intensities measured by the clients in the 9 growth chambers, respectively. It can be noticed that the control method also works for these types of temporary and low intensity light treatments. The light intensities converge to the desired values, and despite the fact that the treatments do not start at the same time in all the growth chambers, they all have the same duration as fixed from the server, which is the most important for plants. These different starting times of the light treatments are negligible (in milliseconds) and depend on the routes chosen by the routing protocol based on the selected OF, the topology of the nodes, data scheduling, and the performance of the network. The control values of far-red and UV lights sent from the server to the clients that led to one obtaining these measurements are given in Figures 8 and 10, respectively. It is worth mentioning that, due to data loss that can occur during communication, some values are missing and are replaced by interpolation so that the previous figures can be obtained from the recipient side. Figure 11 shows the communication sequence between the clients and the server  
Figure 4: The network simulation in the 60 nodes case; the first node is the server, and the other nodes are clients.  
during this light control process; this can change depending on the topology of the nodes, the scheduling algorithm, and the route chosen by the routing protocol depending on the used OF. This figure can give us an intuition about why the far-red and UV light treatments do not start at the same time in all the growth chambers.  
Figure 5: PAR light measurements sent from the clients to the server.  
Figure 6: PAR light control values sent from the server to the clients.  
Figure 7: Far-red light measurements sent from the clients to the server.  
Figure 8: Far-red light control values sent from the server to the clients.  
Figure 10: Ultraviolet light control values sent from the server to the clients.  
Figure 9: Ultraviolet light measurements sent from the clients to the server.