Soroush Neyestani

Software Engineer

Application Architect

Enterprise Application Developer

Technical Author & Educator

Raspberry Pi IoT Monitoring System for Poultry Farms

Website Portfolio Copy — Real-Time Environmental Monitoring, Web Dashboard & Telegram Alerts

Project positioning

This project was developed in 2019 as a real-world IoT monitoring solution for poultry farms located outside the city, where owners needed continuous visibility into environmental conditions without being physically present.

The system used:

  • a Raspberry Pi as the edge device,
  • a DHT22 sensor for temperature and humidity,
  • Ethernet connectivity,
  • a custom web application for real-time monitoring and alert configuration,
  • and Telegram as the remote notification channel.

The solution provided both live readings and configurable alarm rules so that poultry-farm owners could monitor environmental conditions remotely and receive alerts when temperature or humidity crossed defined thresholds.

The project originated from conversations at the same technology exhibition where I had demonstrated a Raspberry Pi-based retro gaming console. That public prototype unexpectedly led to a practical industrial use case.


Classification

  • Project Type: IoT / Environmental Monitoring / Industrial Remote Monitoring
  • Period: 2019
  • Domain: Poultry Farming / Agriculture / Industrial Monitoring
  • Edge Device: Raspberry Pi
  • Sensor: DHT22
  • Connectivity: Ethernet
  • Remote Channel: Telegram
  • Web Layer: Custom web application
  • Core Capabilities: Real-time monitoring + configurable alarm thresholds + notifications
  • Status: Historical delivered project
  • Portfolio Relevance: Strong
  • Suggested CV Relevance: Tier B — Strong Portfolio Evidence

Website Card

Title:
Raspberry Pi IoT Monitoring System for Poultry Farms

One-line Description:
A 2019 IoT monitoring system using Raspberry Pi, DHT22, Ethernet, a web dashboard, and Telegram alerts to provide poultry-farm owners with live temperature/humidity visibility and configurable alarm thresholds.

Categories:

  • IoT
  • Raspberry Pi
  • Embedded Systems
  • Monitoring
  • Agriculture Technology
  • Remote Operations
  • Web Applications
  • Telegram Integration
  • Edge Computing

Technology Tags:
Raspberry Pi · DHT22 · Ethernet · IoT · Web Application · Telegram Bot · Real-Time Monitoring · Alerts


Overview

Raspberry Pi IoT Monitoring System for Poultry Farms was built to solve a practical remote-monitoring problem.

Poultry farms around Mashhad were commonly located outside dense urban areas, including industrial or remote zones, while owners often needed to remain in the city.

This created a simple but important operational requirement:

How can the farm owner know the current environmental conditions without being physically present?

Temperature and humidity are critical environmental variables in poultry farming.

The system therefore focused on two direct measurements:

  • temperature,
  • humidity.

These values were measured using a DHT22 sensor connected to a Raspberry Pi.

The Raspberry Pi sent the data over Ethernet to the application layer, where the owner could:

  • view live values,
  • monitor the farm remotely,
  • define alert thresholds,
  • and receive Telegram notifications when conditions exceeded acceptable limits.

Origin of the Project

This project emerged unexpectedly from a previous Raspberry Pi exhibition prototype.

At a technology exhibition, I had demonstrated a retro gaming console built with:

  • Raspberry Pi,
  • Recalbox,
  • game controllers.

The exhibition attracted visitors from different industries.

One of the practical requests that came from those conversations was:

“Can you use Raspberry Pi to monitor temperature and humidity in poultry farms and send real-time reports to the owner?”

That question turned a hobby-oriented Raspberry Pi demo into a real industrial monitoring project.

The progression was:

Public Raspberry Pi Demo
        ↓
Industry Conversation
        ↓
Poultry Farm Monitoring Need
        ↓
Sensor Prototype
        ↓
Web Monitoring
        ↓
Telegram Alerts
        ↓
Delivered IoT Solution

This is a useful example of product discovery emerging from direct user interaction.


Business Problem

The operational problem had three parts.

1. Remote Location

Poultry farms were commonly located outside the city because of:

  • odor,
  • land-use constraints,
  • operational requirements,
  • distance from residential areas.

This made frequent physical checking inefficient.


2. Environmental Sensitivity

Temperature and humidity directly affect the environment inside poultry facilities.

Owners needed quick awareness of abnormal conditions.

A delayed response could create operational risk.


3. Limited Need for Complex Infrastructure

The customer did not need a large SCADA platform.

The practical requirement was:

  • affordable,
  • always-on,
  • easy to understand,
  • remotely visible,
  • capable of sending alerts.

That made Raspberry Pi + DHT22 + web app + Telegram a strong fit for the period.


Historical Architecture

The system architecture was approximately:

DHT22 Sensor
     ↓
Raspberry Pi
     ↓
Sensor Reading Service
     ↓
Ethernet / LAN
     ↓
Web Backend
     ↓
Database / State
     ↓
Web Dashboard
     ↓
Alert Engine
     ↓
Telegram Notifications

Edge Layer

Raspberry Pi

The Raspberry Pi acted as the local edge device.

Its responsibilities included:

  • reading the sensor,
  • obtaining temperature and humidity values,
  • preparing measurements,
  • forwarding data through the network,
  • operating continuously at the farm.

The Raspberry Pi was appropriate because it provided:

  • low cost,
  • compact size,
  • Linux environment,
  • GPIO support,
  • Ethernet connectivity,
  • enough processing capacity for sensor acquisition and network communication.

Sensor Layer — DHT22

The environmental sensor was the DHT22.

The DHT22 provided:

  • temperature measurement,
  • relative humidity measurement.

This made it suitable for a compact first-generation monitoring node.

The sensor data flow was conceptually:

Environment
   ↓
DHT22
   ↓
Temperature + Humidity
   ↓
Raspberry Pi

Connectivity

The historical installation used Ethernet.

That was an important practical choice.

Compared with Wi-Fi, wired connectivity can offer:

  • more stable connection,
  • less configuration complexity,
  • better reliability in fixed installations.

The Raspberry Pi therefore operated as a network-connected edge node rather than as a standalone logger.


Web Application

The web application was an essential part of the solution.

The farm owner was not limited to receiving notifications.

The owner could open the web application and view the farm status directly.

Core confirmed functionality included:

  • live temperature,
  • live humidity,
  • remote access,
  • alert threshold configuration.

Real-Time Monitoring

The application presented the current environmental measurements.

A simplified view:

Farm
├── Temperature: current value
├── Humidity: current value
└── Status: normal / alert

The owner could therefore check environmental conditions at any time without traveling to the site.


User-Configurable Alerts

One of the stronger features was that the alert thresholds were not permanently hard-coded.

The owner could configure alarm conditions through the web application.

For example:

Temperature > Defined Maximum
        ↓
Alert Triggered

or:

Humidity < Defined Minimum
        ↓
Alert Triggered

The exact historical threshold model should only be expanded if the original source code or screenshots are recovered.

The confirmed capability is:

The owner could define alarm settings in the web application.


Telegram Integration

Telegram was used as the remote alerting channel.

At the time, Telegram was a practical and inexpensive communication option in Iran.

The application could notify the owner when monitored values reached configured alert conditions.

Conceptually:

Sensor Reading
      ↓
Compare with Threshold
      ↓
Normal?
   ┌───────┴───────┐
   │               │
  Yes              No
   │               │
Store / Show   Send Telegram Alert

This converted passive monitoring into active operational notification.


Alert Workflow

A simplified historical workflow:

DHT22 Measurement
      ↓
Raspberry Pi
      ↓
Backend
      ↓
Threshold Evaluation
      ↓
Condition Exceeded
      ↓
Telegram Message
      ↓
Farm Owner

Why Telegram Was a Good Fit

Telegram offered several advantages for this use case in 2019:

  • widely used,
  • low communication cost,
  • fast delivery,
  • easy bot/API integration,
  • no need to build a separate mobile notification app.

This made it an effective operational channel for small industrial clients.


Monitoring + Notification as Separate Concerns

The system had two separate user experiences.

Pull Model

The owner opened the web application and checked current values.

Push Model

The system sent an alert through Telegram when a configured condition was met.

This is an important architectural distinction.

Web Dashboard
= User asks for status

Telegram Alert
= System pushes important event

Using both models made the system more useful than a simple sensor page.


My Role

My responsibilities included:

  • understanding the poultry-farm monitoring requirement,
  • selecting the Raspberry Pi approach,
  • integrating the DHT22 sensor,
  • sensor reading implementation,
  • Raspberry Pi configuration,
  • Ethernet-based communication,
  • backend/web application development,
  • real-time value presentation,
  • alert configuration,
  • threshold logic,
  • Telegram integration,
  • deployment,
  • testing,
  • and delivering the completed monitoring solution.

What Made the Project Valuable

1. Real Industrial Problem

The project was not created only for experimentation.

It responded to a real operational need in remote poultry farming.


2. End-to-End IoT Delivery

The system crossed several layers:

Physical Environment
        ↓
Sensor
        ↓
Embedded Device
        ↓
Network
        ↓
Backend
        ↓
Web UI
        ↓
Notification Channel
        ↓
Human Decision

This is the core pattern of many modern IoT systems.


3. Remote Operations

The value was created by reducing the need for physical presence.

The owner could make decisions based on remote data.


4. Event-Driven Alerting

The system did not only display measurements.

It evaluated conditions and generated notifications.

This introduces event-driven behavior into the architecture.


Product Engineering Perspective

This project demonstrates a useful principle:

A monitoring system becomes operationally valuable when it does more than collect data.

The complete chain was:

Sense
  ↓
Transmit
  ↓
Display
  ↓
Evaluate
  ↓
Alert
  ↓
Act

Without the final stages, the system would have been only a sensor demo.


Historical Technology Positioning

The original implementation should be described in terms of confirmed components:

  • Raspberry Pi
  • DHT22
  • Ethernet
  • web application
  • Telegram

Any unverified historical details such as:

  • exact Raspberry Pi model,
  • exact backend framework version,
  • exact database engine,
  • sampling interval,

should be added only if source artifacts are recovered.


Evidence Status

Recommended label:

Historically Documented / Partially Verified — The project timeline and Raspberry Pi work are documented in surviving public posts; the exact source code, sensor scripts, and original web dashboard should be attached if recovered.


V2 — Modern Poultry Farm Environmental Monitoring Platform

A modern rebuild can evolve the historical prototype into a robust IoT platform.

Recommended V2 title:

Smart Poultry Farm Environmental Monitoring Platform

The modern system should support multiple farms, multiple sensors, resilient connectivity, historical analysis, and structured alerting.


V2 Architecture

Sensors
   ↓
Edge Node
   ↓
MQTT / HTTPS
   ↓
IoT Gateway / API
   ↓
Message Queue
   ↓
Time-Series Storage
   ↓
Monitoring Dashboard
   ↓
Alert Engine
   ↓
Telegram / SMS / Push

V2 Edge Device

A modern edge node could use:

  • Raspberry Pi,
  • industrial gateway,
  • ESP32-class sensor nodes,
  • or a hybrid topology.

The choice depends on:

  • number of sensors,
  • environmental conditions,
  • network reliability,
  • maintenance requirements.

V2 Sensor Expansion

The original project monitored:

  • temperature,
  • humidity.

A modern poultry-farm platform could also support:

  • CO₂,
  • ammonia (NH₃),
  • ventilation status,
  • water-flow status,
  • power availability,
  • light level,
  • air pressure,
  • fan state.

Why Ammonia Matters

A future version can add ammonia monitoring as a dedicated environmental dimension.

This would provide richer visibility into the poultry-house environment.

The historical project did not include this capability unless later evidence confirms it.


Sensor Topology

For larger farms, one DHT22 may not represent the entire environment.

A modern system should support multiple sensor nodes.

Example:

House 1
├── Sensor A
├── Sensor B
└── Sensor C

House 2
├── Sensor A
└── Sensor B

The dashboard can calculate:

  • current values,
  • minimum,
  • maximum,
  • average,
  • sensor deviation.

MQTT

A modern V2 could use MQTT for lightweight telemetry.

Example topic design:

farms/{farm_id}/houses/{house_id}/sensors/{sensor_id}/temperature
farms/{farm_id}/houses/{house_id}/sensors/{sensor_id}/humidity

Benefits include:

  • low overhead,
  • event-driven telemetry,
  • retained state,
  • quality-of-service levels,
  • scalable multi-device architecture.

Offline Buffering

Remote locations may lose connectivity.

The edge node should therefore not discard readings.

Recommended behavior:

Read Sensor
   ↓
Internet Available?
   ├── Yes → Send
   └── No  → Store Locally
                ↓
             Retry Later

When connectivity returns:

Buffered Data
    ↓
Synchronize
    ↓
Central Platform

Device Heartbeat

The platform should distinguish:

“Temperature is normal”

from:

“The sensor has stopped reporting.”

Each edge device should send a heartbeat.

Example:

Last heartbeat > 5 minutes
        ↓
Device Offline Alert

Time-Series Storage

Environmental data is time-series data.

A modern architecture could use:

  • PostgreSQL + TimescaleDB,
  • or another time-series-capable storage engine.

Data model:

timestamp
farm_id
house_id
sensor_id
temperature
humidity
quality

Historical Charts

A modern dashboard should include:

  • temperature over time,
  • humidity over time,
  • alert periods,
  • daily minimum/maximum,
  • rolling averages.

This allows the owner to identify patterns rather than only see the current value.


Dashboard

A multi-farm dashboard could display:

Farm A       Normal
Farm B       High Temperature
Farm C       Device Offline
Farm D       High Humidity

This is particularly useful if one owner manages multiple farms.


Alert Profiles

Instead of a single global threshold, V2 could support profiles.

Example:

Chick Stage
Grower Stage
Finisher Stage

Each profile could define different acceptable ranges.

This should be validated with domain experts before production use.


Alert Engine

A robust alert engine should avoid notification storms.

Possible rules:

  • threshold must remain exceeded for N minutes,
  • cooldown period,
  • hysteresis,
  • severity levels,
  • escalation.

Example:

Temperature > 32°C
for 5 minutes
        ↓
WARNING

and:

Temperature > 35°C
for 2 minutes
        ↓
CRITICAL

Values are illustrative only and should not be presented as poultry-management recommendations without domain validation.


Alert Escalation

A modern system could support:

Level 1 → Telegram
Level 2 → SMS
Level 3 → Phone / escalation workflow

This improves reliability when immediate response is important.


Telegram V2

Telegram can remain one supported notification adapter.

The application architecture should not make Telegram the business core.

Recommended abstraction:

Alert Event
   ↓
Notification Service
   ├── Telegram
   ├── SMS
   ├── Email
   └── Push

This allows channels to change without rewriting monitoring logic.


Multi-Tenant Architecture

If the system serves multiple poultry-farm owners:

Tenant
  ↓
Farms
  ↓
Houses
  ↓
Devices
  ↓
Sensors

Data isolation should be enforced at the application and database levels.


RBAC

Potential roles:

  • Owner
  • Farm Manager
  • Technician
  • Viewer
  • Administrator

Permissions might include:

  • view telemetry,
  • manage thresholds,
  • acknowledge alerts,
  • manage devices,
  • manage users.

Alert Acknowledgement

A useful modern workflow:

Alert Triggered
      ↓
Notification Sent
      ↓
User Acknowledges
      ↓
Action Logged

This improves operational accountability.


Audit Trail

The system should record:

  • threshold changes,
  • alarm configuration,
  • alert acknowledgements,
  • device assignments,
  • user changes.

Device Registry

Each physical node should have:

  • device ID,
  • farm,
  • house,
  • IP/network information,
  • sensor configuration,
  • firmware/software version,
  • last heartbeat.

Remote Diagnostics

Possible V2 diagnostics:

  • Raspberry Pi CPU temperature,
  • uptime,
  • network status,
  • disk space,
  • sensor-read failures,
  • software version.

Sensor Quality

Sensor readings should include quality validation.

Examples:

  • impossible values,
  • stale values,
  • repeated identical readings,
  • sudden unrealistic jumps,
  • missing data.

A quality flag can prevent bad sensor data from triggering false alerts.


Security

A production IoT system should include:

  • authenticated devices,
  • TLS,
  • per-device credentials,
  • API authorization,
  • RBAC,
  • secure secrets,
  • rate limiting,
  • audit logs,
  • network segmentation.

Edge Security

The Raspberry Pi should avoid:

  • default passwords,
  • open SSH exposure,
  • unnecessary services,
  • hard-coded credentials.

Deployment Strategy

Modern deployment could use:

  • Docker for backend components,
  • automated migrations,
  • CI/CD,
  • monitored services,
  • versioned edge configuration.

Testing Strategy

Sensor Tests

  • valid temperature readings,
  • valid humidity readings,
  • sensor disconnect,
  • invalid sensor values.

Connectivity Tests

  • Ethernet disconnect,
  • server unreachable,
  • reconnect,
  • buffered resend.

Alert Tests

  • threshold exceeded,
  • threshold recovery,
  • cooldown behavior,
  • notification retry.

Security Tests

  • unauthorized device,
  • unauthorized user,
  • invalid API credentials.

Observability

The platform should monitor itself.

Metrics:

  • active devices,
  • offline devices,
  • sensor errors,
  • message latency,
  • alert delivery failures,
  • queue backlog.

Data Retention

Historical environmental data can grow quickly.

A retention policy may include:

  • high-resolution recent data,
  • aggregated older data,
  • long-term daily summaries.

Modern Technology Direction

A possible stack:

Edge

  • Raspberry Pi / ESP32
  • Python or lightweight service
  • MQTT client
  • local SQLite buffer

Backend

  • Laravel
  • REST API
  • MQTT consumer
  • queues
  • alert engine

Data

  • PostgreSQL
  • TimescaleDB
  • Redis

Frontend

  • Laravel + Livewire or SPA dashboard

Notifications

  • Telegram
  • SMS
  • email
  • push

Infrastructure

  • Docker
  • CI/CD
  • HTTPS
  • monitoring
  • backups

Engineering Highlights

  • Built a real IoT monitoring solution for remotely located poultry farms.
  • Integrated a DHT22 sensor with Raspberry Pi.
  • Used Ethernet for fixed network connectivity.
  • Developed a web application for live temperature/humidity monitoring.
  • Implemented user-configurable alert thresholds.
  • Integrated Telegram for remote alarm notifications.
  • Converted a Raspberry Pi exhibition experiment into an industrial monitoring use case.
  • Delivered an end-to-end pipeline from physical sensor to remote owner notification.
  • Defined a clear modernization path toward MQTT, time-series storage, multi-farm monitoring, resilient edge buffering, and multi-channel alerts.

Career Evidence

This project demonstrates:

  • IoT Architecture
  • Raspberry Pi
  • Sensor Integration
  • Embedded Linux
  • Edge Computing
  • Networking
  • Backend Development
  • Real-Time Monitoring
  • Alerting Systems
  • Telegram Integration
  • Remote Operations
  • Agriculture Technology
  • End-to-End Ownership
  • Product Discovery

CV Relevance

Tier B — Strong Portfolio Evidence

This project is strong enough to support CV and interview discussions because it crosses multiple technical layers:

Sensor
→ Edge Device
→ Network
→ Backend
→ Web UI
→ Alert Engine
→ Messaging

It is particularly relevant to:

  • IoT roles,
  • solution architecture,
  • backend engineering,
  • monitoring platforms,
  • industrial software,
  • edge computing.

Interview Story

Situation

Poultry farms around Mashhad were commonly located outside the city, while owners needed continuous visibility into farm environmental conditions without being physically present.

Task

The system needed to provide remote temperature and humidity monitoring and immediately notify the owner when configured limits were exceeded.

Action

I integrated a DHT22 sensor with a Raspberry Pi, connected the edge device through Ethernet, developed a web application for live monitoring and alarm configuration, and used Telegram as the remote notification channel.

Result

The owner could view live environmental conditions remotely and configure alarms that triggered Telegram notifications when temperature or humidity crossed defined limits.


Suggested Website Full Description

Overview

Raspberry Pi IoT Monitoring System for Poultry Farms was developed in 2019 as a remote environmental-monitoring solution for poultry farms located outside Mashhad.

The project used a Raspberry Pi and DHT22 sensor to collect temperature and humidity data.

The data was transmitted through Ethernet to a web application where the farm owner could monitor current conditions and configure alarm thresholds.

Telegram was used to deliver remote alerts.


The Challenge

The farms were physically separated from the owners.

Manual inspection was inefficient, but environmental changes could require quick attention.

The solution therefore needed to be:

  • inexpensive,
  • continuously available,
  • remote,
  • simple to use,
  • and capable of sending proactive alerts.

Original Solution

The edge node measured temperature and humidity through DHT22.

The Raspberry Pi transmitted data through Ethernet.

The web application displayed current readings and allowed the user to define alarm conditions.

When a configured threshold was exceeded, the system sent a Telegram notification.


My Role

I designed and implemented the complete monitoring flow:

  • sensor integration,
  • Raspberry Pi configuration,
  • network communication,
  • backend,
  • web dashboard,
  • alert configuration,
  • threshold logic,
  • Telegram notifications,
  • testing,
  • and deployment.

Version 2

The modern reconstruction evolves the original single-farm monitoring project into a scalable IoT platform with:

  • MQTT,
  • multi-sensor nodes,
  • multi-farm support,
  • time-series storage,
  • offline buffering,
  • device health monitoring,
  • advanced alerting,
  • historical charts,
  • role-based access,
  • Telegram/SMS/push notifications,
  • and support for additional environmental sensors.

Short Website Card Copy

Raspberry Pi IoT Monitoring System for Poultry Farms

A 2019 IoT solution using Raspberry Pi, DHT22, Ethernet, a web dashboard, and Telegram to provide remote temperature/humidity monitoring and configurable farm alerts.


Alternative One-Liners

IoT-oriented

Built an end-to-end Raspberry Pi IoT system for poultry farms, from DHT22 sensor acquisition through web monitoring and Telegram alerting.

Architecture-oriented

Designed a remote environmental-monitoring pipeline spanning edge sensing, Ethernet transport, web application, configurable alarm logic, and Telegram notifications.

Business-oriented

Enabled poultry-farm owners to monitor temperature and humidity remotely and receive immediate alerts without traveling to remote farm locations.

Product-discovery oriented

Converted a Raspberry Pi exhibition demo into a delivered agricultural IoT monitoring solution after identifying a real customer problem.


Suggested Website Slug

/projects/poultry-farm-iot-monitoring

Alternative:

/iot/raspberry-pi-poultry-monitoring

Cover Direction

Title

Poultry Farm IoT Monitoring

Subtitle

Raspberry Pi · DHT22 · Web Dashboard · Telegram Alerts

Supporting Line

Temperature · Humidity · Remote Monitoring · Configurable Alarms

Visual Direction

A premium square technical cover showing:

  • poultry-house environment in the background,
  • Raspberry Pi edge device,
  • DHT22 sensor,
  • Ethernet cable/network connection,
  • live dashboard with temperature and humidity gauges,
  • Telegram-style notification iconography,
  • alert threshold graph,
  • remote owner/mobile view.

The cover should clearly communicate:

Farm
+
Sensor
+
Raspberry Pi
+
Web Monitoring
+
Remote Alerts

Avoid generic smart-home imagery; the agricultural/industrial context should be obvious.


Evidence Gallery Recommendation

Hardware

  • Raspberry Pi
  • DHT22
  • Ethernet setup
  • sensor wiring if available

Software

If recovered:

  • web dashboard screenshot,
  • threshold configuration,
  • Telegram alert screenshot,
  • sensor collection source code,
  • backend source,
  • database schema.

V2

  • MQTT topology diagram,
  • time-series chart,
  • multi-farm dashboard,
  • device health panel,
  • alert history.

Final Portfolio Statement

The strongest aspect of this project is the complete operational chain.

The system did not stop at reading a sensor.

It connected:

Physical Environment
        ↓
DHT22
        ↓
Raspberry Pi
        ↓
Ethernet
        ↓
Web Application
        ↓
Threshold Logic
        ↓
Telegram
        ↓
Farm Owner

That is the essence of an IoT system:

Sense the physical world, move the data, interpret it, and turn it into a useful action.

The original 2019 implementation was intentionally simple and cost-effective.

The modern V2 can preserve that practical philosophy while adding the resilience, observability, security, and scalability expected from a production-grade IoT platform.