# New Protocol and Architecture for a Wastewater Treatment System Intended for Irrigation
## 4 Discussion  
In this section, a discussion is given on the previous related works on protocols designed to be applied to WSNs that are employed in agricultural monitoring systems or to reduce the consumed energy for their functioning. Furthermore, the positioning of the water quality sensors and previous works on this topic are discussed as well. WSNs have specific requirements and several protocols were developed specifically for these types of networks. Many systems for agricultural monitoring employ these protocols to forward the data obtained from the sensors. [PERSON] et al. presented in [19] the usage of a message queuing telemetry transport (MQTT) protocol applied to precision farming and weather monitoring. The proposed system monitored humidity, temperature, and power and utilized a Raspberry Pi as the controller. The Eclipse Paho MQTT client was utilized to implement the subscriber and an open-source MQTT broker was utilized to access the data. A system for controlling and monitoring a smart greenhouse employing IoT and the MQTT protocol was presented by [PERSON] et al. in [20]. The system comprised an ESP8266 Wi-Fi module and an Atmega328 board with temperature, humidity, and soil moisture sensors. For the MQTT broker, the authors utilized Mosquitto. [PERSON] et al. introduced in [21] a low-cost smart irrigation system that employed MQTT as the communication protocol. The system comprised the ESP8266 NodeMCU-12E, a soil moisture sensor, a temperature and humidity sensor, and a relay. [PERSON] et al. presented in [22] a greenhouse monitoring and control system. Communication among the nodes was performed over ZigBee employing the UDP-based CoAP communication protocol. Nodes sent the gathered information from the sensors to the gateway which converted the CoAP message into an HTTP one so as to forward the data to the server. Finally, [PERSON] et al. performed in [23] a comparison of two different protocols for WSNs in agricultural environments. The authors compared a simple network management protocol (SNMP) and a constrained application protocol (CoAP) in its message format, security, and resource management, and the user interface. They concluded that the CoAP presented better integration with the web and was expected to grow in usage for WSN applications. Other protocols were created so as to address specific requirements of precision agriculture. [PERSON] et al. presented in [24] a routing protocol for WSNs to improve energy efficiency in environmental monitoring deployments. The energy-efficient sensor network routing (EESNR) protocol reduced the overhead of control messages. All the nodes were able to become the cluster head as long as the constraint on energy life and the established criteria was met. The authors performed simulations in NS3, comparing the proposed protocol to other existing protocols for WSNs like LEACH and its variations. The results showed an improvement of 27.8% of the lifespan of the sensors compared to the other protocols. A routing protocol for sensor networks intended for agriculture monitoring based on the efficient zone was developed by [PERSON] et al. in [25]. An energy-efficient zone-based routing protocol (EEZRP) assigned different zones to the nodes depending on their distance to the base station and considering that nodes closest to the base station consume more energy. The proposed protocol considered the sensing range. The number of active nodes was fewer than in other protocols, but it might perform more processing and control operations. Simulations were performed to compare the energy consumption of the nodes to other protocols intended for WSNs like LEACH and DSC. The results showed a significant reduction of the consumed energy compared to other protocols. [PERSON] et al. proposed, in [26], Apteen, a protocol intended for expanding the lifetime of the nodes in WSNs for precision agriculture. It is a cluster-based hierarchical routing protocol that groups the nodes into clusters comprising a cluster head and member nodes.