Livestock monitoring: barn climate, gases, water and the records each rule asks for
Spain has a quarter of the EU's pigs and almost a quarter of its sheep, and the rules on how they are kept have tightened: ammonia and CO2 limits at the animals' height with monthly records, alarms on artificial ventilation, electronic identification for every new calf, and from 2030 industrial emission rules for the largest pig and poultry farms. This guide explains each obligation, which sensor produces the record and what remains the farmer's, the vet's or the official database's.
What the rules require inside the house
Royal Decree 348/2000, which transposes Directive 98/58/EC, requires farms that depend on artificial ventilation to have an emergency system and an alarm that warns of breakdown, checked regularly, and essential equipment inspected every day. For pigs, Royal Decree 1135/2002 sets ammonia below 20 ppm and CO2 below 3,000 ppm at the animals' head height, with monthly control records. For broilers above 33 kg/m², Royal Decree 692/2010 adds that inside temperature may not exceed outside by more than 3 °C when it is above 30 °C in the shade, and that average humidity over 48 hours may not exceed 70% when it is below 10 °C outside.
Breaches of the welfare rules are fined under Law 32/2007 up to 100,000 euros, and identification breaches under the animal health law up to 1.2 million. Agriculture caused about 94% of EU ammonia emissions in 2023 according to the EEA, which is why the Industrial Emissions Directive will bring pig farms from 350 livestock units and poultry farms from 280 under operating rules with ammonia limits and continuous records of their air scrubbers, from around 2030.
| Rule | What it asks | Data that answers it |
|---|---|---|
| RD 348/2000 | Ventilation alarm, daily equipment check | Climate and equipment status with alarms |
| RD 1135/2002 (pigs) | NH3 < 20 ppm, CO2 < 3,000 ppm, monthly records | Gas sensors at animal height |
| RD 692/2010 (broilers) | 3 °C rule, 48 h humidity, gases | Inside and outside temperature and humidity |
| RD 1053/2022 (cattle), RD 306/2020 (pigs) | Water consumption recorded | Water meters on supply and troughs |
What to measure
- House climate: Temperature and humidity inside and outside with sensors such as the Milesight EM300-TH, and the temperature-humidity index as a heat stress indicator. No rule sets a numeric limit for that index.
- Gases: CO2 at the animals' height, and ammonia with electrochemical cells that need periodic calibration; the data backs the monthly record but is not an official measurement.
- Water: Meter pulses with a reader such as the Milesight EM300-DI and trough level with a sensor such as the Milesight EM310-UDL: consumption for the records, and alarms for leaks or empty troughs, often the first sign of a sick animal.
- Extensive herds: GPS collars such as the Digital Matter Oyster for location, geofences and inactivity alerts. They are not official identification, which still needs the approved tag or bolus.
What stays the same: the farm's own ventilation alarm and backup remain mandatory, because a cloud alarm can fail in a power cut. The platform does not file anything with REGA, SITRAN or ECOGAN, and does not replace the vet or the welfare auditor. On remote pastures, LoRaWAN coverage often needs a dedicated solar gateway.
Insurance: proving the cause of a loss
Agroseguro's broiler insurance offers heat stroke as an optional cover but excludes losses caused by equipment not working, unless by fire or a weather cause, and those caused by cold, lack of water or poor water quality. A timestamped history of temperature, humidity, equipment status and water flow is what shows which of those causes it was. The policy does not require sensors and we do not claim any premium discount.
How to plan a pilot
- 1. One house, one season: The house that suffers most in summer, through one full heat season.
- 2. Climate, gases and water together: A drop in water use with rising temperature is the earliest warning.
- 3. Set alarms on the legal limits: 20 ppm ammonia, 3,000 ppm CO2, the 3 °C rule, ventilation stopped.
- 4. Extend to the farm or the integration: Same rules for every house, one view for the integrator.
Cloud Studio IoT runs in AWS (Frankfurt for Europe) or on your own servers, and under your brand if you are an integrator or a cooperative. Tell us about your farm.
Sources
- Royal Decree 348/2000 on farm animal welfare (BOE)
- Royal Decree 1135/2002 on pigs (BOE)
- Royal Decree 692/2010 on broilers (BOE)
- Royal Decree 787/2023 on identification (BOE)
- Implementing Decision (EU) 2026/2260 for pig and poultry farms
- Eurostat, livestock populations
- EEA, Europe's protein supply and ammonia (June 2026)
- Agroseguro, broiler insurance 2026













