The agri-food sector is in constantly renewing, continuously demanding new systems that facilitate farmers´ work. Efficient agricultural practices are essential to increasing farm profitability, and reducing water consumption can be achieved by real-time monitoring of water needs. However, the prices of automatic systems for collecting data from several sources (soil and climate) are expensive and their autonomy is very low. This paper presents a low-consumption solution using the Internet of Things (IoT) based on wireless sensor networks (WSNs) and long-range wide-area network (LoRaWAN) technologies. By means of low-power wide-area network (LPWAN) communication, a farmer can monitor the state of crops in real time thanks to a large number of sensors connected wirelessly and distributed across the farm. The wireless sensor node developed, called BoXmote, exhibits very low power, since it has been optimized both in terms of hardware and software. The result is a higher degree of autonomy than commercial motes. This will allow the farmer to have access to all of the information necessary to achieve an efficient irrigation management of his crops with full autonomy.