Overview
Heat and humidity are the best friends of cockroaches. With the arrival of summer, the increase in temperatures and high humidity in the city’s sewer pipes, the main inhabitants of the complex tunnels, the American cockroach (Periplaneta Americana), look for a way to escape the vast sewer system. Today, in the world‑famous heritage city of Cordoba in Spain, a coordinated action led by biology researchers from the University of Cordoba, the city council and the public sewer company of Cordoba (Spain) gather to implement an integrated pest control method to predict cockroach infestation, eradicating the problem at its source, with Milesight’s intelligent environmental monitoring system, which ensures that the authority can be notified in time and also displays live data; the system can help city residents live healthier.

Project
In these circumstances, a pilot project is underway in the ecological and digital transition, as it effectively reduces and optimises pesticide use thanks to real‑time data collected by Milesight IoT sensors, locating and reacting early to changes in pest populations. This experiment launched in the 'Paraíso Arenal' neighbourhood in Cordoba should be applied to the whole city in the coming years. Other cities, such as Barcelona, have already taken an interest in discovering the research of the University of Cordoba in this work for the municipal sanitation company, which is also committed to a continuous effort to prevent cockroaches in its sewer manhole network.

Challenges and requirements
In June 2022, as part of the Green Deal, the European Commission adopted a proposal to restore damaged ecosystems and restore European nature, striving to be the first carbon-neutral continent. In this context, the Commission proposes to reduce the use and risk of chemical pesticides, as well as to completely phase out the use of the most dangerous pesticides by 2030. Consequently, the new solution must be able to cover the city's sewer network while adapting to new regulations.
- Network Deployment
Setting up data collection infrastructure over a large area is the main challenge, as devices must be buried in sewers and cover vast service zones.
- Water leak detection
Difficult conditions require a different product design class. Devices must be able to handle extremes of temperature, humidity, dust and water, as well as exposure to rodents and other types of unexpected events.
- Detection of varied data
The appropriate conditions of the sewer network such as humidity, temperature, carbon dioxide, environmental darkness, and the presence of a large amount of water have made sewers an environment suitable for the growth and reproduction of American cockroaches.
Considering deployment efficiency and climate change mitigation, the LoRaWAN®-based wireless communication solution including IP65-certified Milesight sensors was chosen, meeting all the above needs and more, such as stable long-distance data transmission.
Associated products
The following Milesight IoT devices were deployed in the condominium:
- LoRaWAN® UG65 Gateways
- temperature and humidity sensor EM300-TH
- EM500-CO2 CO₂ sensor (4 in 1: CO₂, barometric pressure, temperature, humidity)
Solution
The project includes 3 phases: data collection, mathematical modeling and data visualization.
During the first phase, the Milesight EM300-TH and EM500-CO2 sensors were deployed in various zones to collect diverse data over 4 months (data collection). With the rich data from the second phase, specialists created a mathematical model based on the process to manage the mutual correlations between environmental variables and cockroach presence (mathematical modeling). Finally, because the data have spatial and temporal context, heat maps are generated for real‑time analysis of conditions under the sewers (data visualization). Advanced methodologies help the sewer company intervene at the right time without causing any inconvenience in the treated areas.

Four fundamental parameters are measured:
- Humidity and temperature. The cockroach prefers a temperature ranging from 25 to 30 degrees Celsius with humidity of 90 to 95 %.
- Barometric pressure. American cockroaches may stop flying or move within buildings if they sense approaching storms.
- CO2. The respiration rate of the cockroach, like most insects, is controlled by the accumulation of carbon dioxide, which is a good indicator of the presence of populations.
The project started in March 2022, and over the next three months, Milesight temperature and humidity sensors, CO₂ and barometric pressure sensors were installed in maintenance holes under the sewers, without the need for a power source, giving the device a battery life of up to 10 years with readings every ten minutes (reading intervals can be changed remotely). These sensors operate with lithium batteries, an essential feature for any equipment installed in remote underground locations without electricity. They also have an IP65 (EM500) or IP67 (EM300) enclosure to protect them in harsh environments and make them water‑resistant.

Sensors take measurements and transmit them wirelessly to gateways, after which LoRaWAN® gateways store the data or send it via Wi‑Fi to the FIWARE cloud-hosted database, where researchers can access it remotely and work with the data. The gateway provides Wi‑Fi, 4G/3G, and Ethernet connectivity and can send data via MQTT/s or HTTP/s.
Thanks to LoRa technology, this monitoring platform easily covers a closed area of 148,000 square meters in the city of Cordoba.
Data Management
The collected data is stored and processed in the FIWARE cloud to create heat maps for classifying the risk of pests in each zone. Predictive models are used to analyze infestations and allow authorities to take preventive measures when cockroach populations rise, while the study can also be adopted to identify other types of pests. Furthermore, with a better understanding of underground conditions, researchers and local communities will be more involved in conservation and the development of sanitary networks.

Advantages
- Emergency notifications
The sensor is configured to send data every ten minutes, except when it detects an unusual change in temperature, humidity or other environmental factors. If this occurs, the device sends an alarm with the collected data.
- Cost reduction
Thanks to the ultra‑low power consumption of LoRa technology, batteries do not need to be replaced for ten years, resulting in a significant reduction in maintenance costs, travel time, and human resources that would be required if they had to be changed more frequently.
- Wide range of applications
In addition to the sewer network, LoRaWAN sensors are the ideal solution for monitoring refrigerators, forest fire risk, weather monitoring (CO2, barometric pressure) for crops, etc.
Partner
GrayHats construire des plateformes IoT personnalisées et sécurisées pour améliorer la productivité d’entreprise, la sécurité des personnes et la santé de la planète sur la base de FIWARE et AWS. Vous pouvez surveiller, agir, analyser les informations ou modéliser des jumeaux numériques pour vous aider à prendre de meilleures décisions ou à prédire ce qui se passera à l’avenir.
