Internet of things-based smart control and comfort classification system for broiler chicken coops using k-nearest neighbor algorithm
Abstract
The poultry industry increasingly relies on environmental automation to improve broiler chicken welfare and productivity. Prior studies have implemented threshold-based systems to control coop conditions, typically activating actuators based on fixed values of temperature or humidity. However, such systems lack adaptability to dynamic environmental interactions and often result in inefficient energy use and overactivation. This study proposes a novel low-cost internet of things (IoT)-based smart poultry coop system that combines real-time environmental sensing with comfort classification using the k-nearest neighbor (KNN) algorithm. The system monitors temperature, humidity, and ammonia levels through affordable sensors integrated with an ESP32 microcontroller, then transmits data via message queuing telemetry transport (MQTT) to a remote server for classification and control decision-making. Control logic is applied to activate fans, heating lamps, or humidifiers accordingly. Evaluation on a mini coop prototype demonstrated a classification accuracy of 92.2% and a 34% reduction in actuator overactivation compared to threshold-based systems. Environmental stability improved by 23%, and energy usage decreased by 12.6%. The system also features user interfaces via Telegram and Blynk, proven intuitive through informal testing. These results validate the feasibility of integrating machine learning into small-scale poultry environments, offering an intelligent, scalable, and user-friendly solution that outperforms traditional methods.
Keywords
Internet of things-based monitoring; K-nearest neighbor; Message queuing telemetry transport-based control system; Smart poultry coop; User interaction
Full Text:
PDFDOI: http://doi.org/10.11591/ijece.v16i2.pp1039-1050
Copyright (c) 2026 Khodijah Amiroh, Helmy Widyantara, Muhammad Dwi Hariyanto

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
International Journal of Electrical and Computer Engineering (IJECE)
p-ISSN 2088-8708, e-ISSN 2722-2578
This journal is published by theĀ Institute of Advanced Engineering and Science (IAES).