# Low-Cost IoT and LoRaWAN-Based System for Laying Hen Identification in Family Poultry Farms
## 1 Introduction  
The agricultural sector faces numerous challenges in the 21 st century, including increasing food demand, environmental sustainability, resource optimization, and the ongoing decline and depopulation of rural areas [1, 2]. In this context, the integration of advanced technologies such as robotics, the Internet of Things (IoT), artificial intelligence (AI), drones, machine learning, and Extended Reality (XR) and Virtual Reality (VR) has been recognized as a key strategy for enhancing the sector's efficiency and productivity [3, 4, 5]. In contrast with the capacity of large-scale producers to invest in advanced technological infrastructures, small farms face significant constraints in implementing technological solutions due to the high costs associated with such investments. To address this challenge, the development of cost-effective solutions has emerged as a key area of focus. This includes the creation of low-cost Internet of Things (IoT) systems [6], long-range and low-power communication networks (Low-Power Wide-Area Network, LPWAN) [7], and open-source platforms [8]. These initiatives are crucial for democratizing access to these technological advancements [9]. In this regard, IoT with low-cost electronics enables the real-time acquisition of critical variables, supporting data-driven decision-making and automating agricultural processes. This, in turn, enhances efficiency and promotes moresustainable resource management [10]. Additionally, LPWAN networks have emerged as a promising alternative for connectivity in rural environments, allowing efficient long-range data transmission with minimal energy consumption. This technology has been applied in various agricultural applications, ranging from crop monitoring to environmental variable control in livestock farming [11]. The integration of these networks with open-source software and data analysis platforms enables the automation of critical tasks, reducing the need for manual intervention and enhancing the effectiveness of decision-making processes. In the context of the agricultural sector, the present study focuses on poultry farms. In Spain, the regulatory framework for poultry farming is established by national legislation, which is based on various parameters, including the nature of the activity and the rearing system, among others [12]. Regarding farm size, the following classification is generally used:  
* Family or small-scale farms: These farms are run by a family or a small group of people and have a relatively limited production. They may house anywhere from a few dozen to a few hundred birds. They generally focus on production for family or local consumption. In addition, they often use organic or ecological production techniques and follow sustainable and environmentally friendly practices, such as using organic feed, providing outdoor access, and adopting more natural rearing systems. * Commercial or medium-scale farms: These farms are larger than family farms and are intended for commercial production. They may house a few hundred to several thousand birds, depending on the type of production (eggs, meat, or ornamental birds). They typically use more intensive production systems and modern technology to maximize efficiency and productivity. * Industrial or large-scale farms: These are the largest poultry operations and are highly mechanized and technologically advanced. They can house tens of thousands or even hundreds of thousands of birds. Their focus is on large-scale egg or meat production, and they are often vertically integrated with processing and distribution companies. These farms typically employ highly intensive production systems and may be subject to stricter environmental and animal welfare regulations. In medium- and large-scale poultry farms, poultry houses are equipped with modern technology for egg collection and grading, ventilation and climate control, automated feeding systems, and monitoring and alert systems, among others [13; 14; 15; 16].