# New Protocol and Architecture for a Wastewater Treatment System Intended for Irrigation
## 4 Discussion
The sensed parameters, thresholds, time division multiple access (TDMA) schedules, and the count time were broadcast from the cluster head. The messages were forwarded utilizing ZigBee in order to send the data to a database. [PERSON] et al. presented, in [27], partition aware RPL (PA-RPL), a routing protocol for IoT in precision agriculture. It was a version of the routing protocol for LLN (RPL) protocol that considered the partitions in farmlands to perform the routing topology. The protocol only considered one sink node. Simulations were performed employing the Cooja simulator. The results showed that the protocol was able to construct the network covering all the parcels. Lastly, a MAC protocol for precision agriculture based on storage and delivery intended for air-ground collaborative wireless networks (SD-MAC) was introduced by [PERSON] et al. in [28]. In their proposal, an unmanned aerial vehicle (UAV) flew over the sensors in order to collect the gathered data. This way, a reduction in the duplication of data was obtained and the cost was reduced as a single UAV was able to gather the data from a large area. The proposed protocol forwarded the packets only when the UAV was within the range of the sensor. Sensors were deployed outside of the range of other sensors so as to avoid interferences. When the UAV was not close to the sensor, the sensor stored the information until the UAV was within range. Simulations were performed, comparing the proposed protocol to ALOHA. The results showed that the proposed protocol outperformed ALOHA. Regarding sensor networks for water quality monitoring and wastewater treatment, the contamination of the wastewater may not only affect the quality of the water but also the treatment plants or the sewer systems. Therefore, it is important to deploy a monitoring network to detect contamination and contain the affected areas. In their study, [PERSON] et al. [29] compared different sensor positioning techniques intended for nonconservative immanent pollutants. The results showed that the optimal solution could be reached with less computational effort by implementing pre-screening and gray information techniques. [PERSON] et al. utilized an optimization approach by using the NSGA-II algorithm to compare the positioning of the sensor probes to the results obtained from experimental tests [30]. The results showed that the sensors positioned at the center of the network minimize the redundancy and maximize the detection likelihood. Our work has presented a new algorithm and protocol for the detection and treatment of waters that other authors have not previously defined. We have utilized LoRaWAN, a low-power wide area network (LPWAN) protocol that supports low-cost, mobile, and secure bi-directional communication for the Internet of Things (IoT), which allowed a high level of energy saving and transmission over distances of several kilometers. Therefore, the proposed system allows its implementation in areas where it is difficult to get electric power to keep the devices active. Our devices, due to their low consumption, can be powered by batteries that are recharged through solar panels.