## 2 Materials and Methods
### WSN Infrastructure  
The experimental plot already provided a basic Wi-Fi installation and data connection network, as it was included in the network infrastructure of the Technical University of Cartagena.  
Figure 1 depicts the general scheme of the devices, networks and services deployed in this work for the collection and monitoring of data, as well as for the remote management of the devices. On the laboratory terrace of the farm building (spot a), a device that integrates a 19 dBi 120-degree sector antenna and router board (mANTBox 19 s, MikroTik, Riga, Latvia) was installed. This router, powered by power over ethernet standard (PoE), was connected to the university network available at the laboratory. A virtual private network (VPN) server was configured in this router to facilitate network maintenance and access to equipment such as the datalogger and the fertigation controller. In addition, the router also implements the connection via 5 GHz Wi-Fi (802.11 ac) with a second router with integrated 16 dBi drum antenna (SXT Lite5 ac, MikroTik, Riga, Latvia), located at spot b. The following devices are located at this spot (b): (i) A large weighing lysimeter (2.5 \(\times\) 2.5 \(\times\) 1.7 m) with forced suction at the bottom, installed in the middle of a 0.4 ha almond orchard with trees spaced at 5 \(\times\) 6 m. The soil tank was laid on a platform equipped with load cells (model FX2, Sensocar, Spain) which supplied the total weight of the lysimeter. A 15-year old almond tree (_P. dulcis_ (Mill) D. [PERSON] cv. [PERSON]) was used as a lysimeter tree for evapotranspiration determination (ETc). The accuracy of the  
whole weighing system was estimated to be \(\pm\)500 g. The tree was drip irrigated by four laterals with six 4 L h\({}^{-1}\) pressure compensating drippers. Irrigation management consisted of restoring water losses due to evapotranspiration and drainage from the previous day; (ii) A data-logger (CR1000, Campbell Scientific, Inc., Logan, UT, USA) used to collect data every 15 min from the sensors installed in the lysimeter: weight and drainage measurement, soil sensors for matric potential (MPS\(-\)6 Decagon Devices) and volumetric water content (VWC) (Enviroscan Settek technologies, Stepney SA 5069 Australia), tree sensors for stress water index determination using dendrometers and thermo-radiometers. A climatic station with ET\({}_{0}\) and vapor pressure deficit (VPD) was also installed; (iii) an Ethernet switch to connect the access points of the wireless links; (iv) a router (BaseBox 2, MikroTik, Riga, Latvia) and a dual polarity, 120\({}^{\circ}\), 2.4 GHz 15 dB, sector antenna (AM2G15-120, Ubiquiti, New York, NY, USA) which provides 2.4 GHz Wi-Fi wireless coverage (802.11n) to the sensor nodes; (v) a 60 degrees 2 \(\times\) 2 MIMO 10 dbi sector antenna with wireless on-board (SXT 2, MikroTik, Riga, Latvia) to establish an 802.11 wireless link to the irrigation controller, located at spot c. The fertigation control device (Agronic 4000) was connected to a serial Wi-Fi converter (USR-WIF1232-610, Jinan USR IOT Technology Limited, Shandong, China) through its RS-232 serial port to enable its wireless connection to the access point of spot b for the remote management of the fertigation programmer from any computer connected to the VPN of our installation.  
Thanks to this infrastructure, the sensor nodes of the almond plot send the data to a server hosted in the cloud, which provides all the necessary services for its visualization from any personal computer or mobile device. This application allows real-time visualization, logging and querying of historical data, and alarm reporting among other features.