Best coops in laying hens farm affects health of chickens based on conditions of temperature, humidity and ammonia levels in specific standard. Temperatures and humidity that are low or high causes chickens stressed like biological and hormonal changes that affect chicken behavior, disruption function of the respiratory and cardiac organs due to high ammonia, so egg productivity decreases and detrimental to farmers. The purpose research developed system for controlling temperature, humidity, and ammonia levels by real time to reduce the risk of decreasing chicken health. Internet of things-based control system was developed using a Raspberry Pi 4, DHT22 sensor to get temperature and humidity and MQ137 sensor to get ammonia gas levels. This sensor measurement data is real time which provides outputs form of heating, cooling, and spraying probiotics that reduce ammonia levels automatically so make farmers easy to handling of coops conditions. The test results for 16 days showed that temperature sensor was able to measure in the range of 26,9–38,7°C, humidity sensor was able to measure in the range of 32,7–72,5% and ammonia sensor was able to measure in the range of 0,08-3,82 ppm consistently every hour without any drastic changes in measurement results and suddenly.