Temperature and Humidity Monitoring Using DHT22 Sensor and Cayenne API

Internet of Thing is a new technology which enables small processing-capable devices to capture or retrieve information from a sensor and send the data to the central computer. This technology is useful for any sector especially agriculture, IoT can be used as monitoring or/and controlling the condition inside the cultivation. There are many kinds of agriculture cultivations, some of them have strict conditions due to the growth requirements. Oyster mushroom cultivation is one of many cultivations which requires strict temperature and humidity needed by oyster mushroom to growth optimal. The temperature inside the cultivation must be within 25°C until 30°C and humidity within 70% RH until 90% RH. Due to these strict requirements, the farmers required to check their cultivations every day and manually maintain the temperature and humidity, and this situation becomes a problem when the farmers own many cultivations. Hence, this research has a purpose to design an automatic monitoring system based on Internet of Things technology which utilizing the DHT22 sensor and Cayenne API as information retrieval medium to the computer. When using this device, the farmers can check their cultivation in the meantime without going inside the cultivation.


Introduction
Implementation of communication technology such as Internet of Things technology in agriculture can help the farmers monitor the cultivation directly without being inside the cultivation. Internet of Technology enables the communication between processing-capable devices to be used as information exchange over a distance (1). With this technology, the farmers can retrieve the cultivation information with either a smartphone or a computer. Some cultivations should implement Internet of Things technology to help the farmers to monitor the condition inside the cultivation especially oyster mushrooms. Oyster mushroom cultivation is cultivation that needs strict temperature and humidity conditions to make oyster mushroom develop optimally.
Oyster mushroom cultivation requires a temperature between 25°C until 30°C and air humidity between 70% -90% RH (relative humidity)(2)(3)(4). When not fulfilled, the oyster mushroom will not grow optimally until harvest season (5). Hence, these requirements posed a problem for farmers. The farmers are required to check the cultivation every day and control the temperature and humidity inside the cultivation. This becomes a problem when the farmers must take care of many cultivations at once. Controlling one of the cultivations might take a long time if the cultivation area is wide. When taking too long, the temperature and humidity conditions changed, and treatment becomes inefficient. Hence, this research has a purpose to design an automatic temperature and humidity monitoring system which utilize Internet of Things technology as communication media between nodes inside cultivation and the farmers.
This monitoring system utilizes a processing-capable device such as Raspberry Pi to retrieve information from a DHT22 sensor and send them to the farmers. Unlike the DHT11 sensor, the DHT22 sensor provides better accuracy for temperature and humidity. DHT22 relatively measures 4% more accurate for the temperature and 18% for the humidity(6,7)(8). This system implements Cayenne API to provide temperature and humidity information transmission from the cultivation area. The farmers can check this information directly via an LCD attached to the device or via smartphone with the Cayenne app installed and connected to the internet. However, the system must be connected to the internet when accessing through a smartphone app.

2.
Research Method Some researchers have been working with a monitoring system which monitors the temperature and humidity. However, most of the researches on temperature and humidity control were not based on Internet of Things technology and equipped only with DHT11 sensors(9). The system made by the previous researches utilized Atmega as the microcontroller, instead of using a processing-capable device such as Raspberry Pi. Hence, information retrieval between a distance is almost impossible to do (10).
Besides that, another research utilized Arduino Mega as an information retrieving node which uses the SHT75 sensor. However, the information retrieved by this research system only limited to Windows-based phones (11). There is also humidity and temperature monitoring in the mushroom cultivation system which utilized Arduino UNO, and DHT11(12). There is a research for monitoring and controlling system which based on the web, this system utilized wireless sensor network such as Arduino Mega, and Raspberry Pi(13).
Many kinds of research have been improved on how the monitor system should be. There is a system that utilized the SHT11 sensor relay, and fuzzy logic to control the actuator inside the device. However, this system is not based on Internet of Things technology. Hence the communication between farmers and nodes is limited (14). Additional research of monitoring using PLC as control system resulting a controlled environment for mushroom to grow (15).
The automatic temperature and humidity monitoring system is designed according to the observation data from oyster cultivation. The gathered data from observation such as temperature and humidity are recorded as the base of development. This IoT design methodology is a specialized method to develop IoT device which meets users' criteria. Each phase in this design methodology describes the specification of IoT devices such as requirements, IoT process, data model, and even the application used for IoT.

Results and Analysis
According to the IoT design method, the result of an automatic monitoring system design is explained below:

Purpose and Requirements Specification
This IoT model has a purpose to monitor the temperature and humidity inside oyster mushroom cultivation in real-time. Hence, temperature and humidity data from the cultivation is required to model the automatic system.

Process Specification
This section explains how an automatic monitoring system does temperature and humidity monitoring in the cultivation. This automatic monitoring model is working by reading temperature and humidity from a DHT22 sensor. The data obtained by the sensor is displayed to and LCD and to the server through the Cayenne API. This process repeats endlessly until the power interruption happened.

Information Model Specification
This section explains what kind of data model exists inside the cultivation and attributes owned by each of the components. See figure below: The specifications for the information model used in the automatic monitoring system consist of Oyster Mushroom Cultivation as Virtual Entity, Temperature and Humidity as Attributes and each of them have two levels.

Operational View Specification
This section explains how an The automatic monitoring system works by using DHT22 as an input sensor for cultivation, the information continues to Raspberry Pi for data processing. If the internet is connected, then nodes will send the information to the Cayenne server as well as LCD Display.

Retrieved Data Result
All retrieved data are exported CSV and used as data analysis for sensor validation and forecasting. Hence, the histogram of sample data is shown below:  According to the figures above, the sensor is successfully capturing the condition inside the cultivation within a certain time and the received data to the server through Cayenne. Based on the figures above, the automatic monitoring system captures the condition inside the cultivation every 3 minutes without fail.