Journal of Artificial Intelligence and Digital Business
Vol. 5 No. 2 (2026): Mei-Juli

Implementation of MQTT Broker and Gemini API in an Internet of Things Based Indoor Air Pollution Monitoring System

I Putu Tude Rama Prasatya (Universitas Pendidikan Ganesha)
Ketut Agus Seputra (Universitas Pendidikan Ganesha)
Kadek Yota Ernanda Aryanto (Universitas Pendidikan Ganesha)



Article Info

Publish Date
14 Jul 2026

Abstract

Indoor air pollution from pollutants such as Carbon Monoxide (CO) and Particulate Matter (PM2.5) poses significant health risks to room occupants, particularly in enclosed spaces with poor ventilation where pollutants can accumulate to hazardous concentrations. To address this challenge, this study designed and implemented an IoT-based indoor air quality monitoring system integrating an MQTT broker for real-time data transmission and the Gemini API for intelligent data interpretation. The system adopts a three-layer architecture spanning hardware, backend, and application layers. The hardware layer utilizes an ESP32 as a wireless gateway and an Arduino Nano for sensor acquisition, employing the Sharp GP2Y1010AU0F sensor for particulate matter and the MQ-7 sensor for carbon monoxide. The backend, built with Laravel, manages data through a dual-database approach, where MySQL handles structured user data and InfluxDB stores continuous sensor readings. A Flutter mobile application, built with the MVVM pattern, serves as the user interface, delivering real-time air quality information. The Gemini API further enhances the system by automatically generating air quality classifications and actionable health recommendations. Calibration testing demonstrated an average error of 6.45% for the MQ-7 sensor and a notably low 0.44% error for the Sharp GP2Y1010AU0F sensor, indicating high measurement accuracy. A 24-hour continuous stress test revealed a system uptime of 83.3%, confirming reasonable operational reliability. Finally, a usability evaluation using the SUS method involving 30 respondents yielded an average score of 70.67, placing the system in Grade B with a "Good" interpretation, confirming the system is functional and easy to use.

Copyrights © 2026






Journal Info

Abbrev

RIGGS

Publisher

Subject

Computer Science & IT Economics, Econometrics & Finance Electrical & Electronics Engineering Engineering

Description

Journal of Artificial Intelligence and Digital Business (RIGGS) is published by the Department of Digital Business, Universitas Pahlawan Tuanku Tambusai in helping academics, researchers, and practitioners to disseminate their research results. RIGGS is a blind peer-reviewed journal dedicated to ...