A
Adam Yahya Creative Developer
Back to projects
Project for RS Pertamina Dumai

AI Agent & Telegram Notification Bot

An automated AI-driven Telegram notification bot integrated with MQTT message brokers and database monitoring to deliver real-time operational alerts at RS Pertamina Dumai.

AI Agent & Telegram Notification Bot

Real-Time Healthcare Notifications & AI Agent Integration

Critical healthcare environments require instant notifications. At RS Pertamina Dumai (RSPD), delays in dispatching task queues or pharmacy notifications directly affect medical services. The goal was to build a robust, zero-latency notification infrastructure.

The Solution

  1. MQTT Telemetry Integration: Configured an MQTT message broker to capture database events and broadcast updates securely.
  2. AI-Driven Telegram Interface: Integrated a custom LLM-powered assistant (Gemini/OpenClaw AI) to let administrators query metrics, patient queues, and service logs in natural language.
  3. Daemon Service Stability: Deployed the solution as a systemd service (gemini-bot) with ALSA driver fault-handling, ensuring 24/7 background persistence and automated recovery.

Technical Architecture

  • Language & Runtime: Python daemon running on Linux.
  • Protocol & Queues: MQTT broker for lightweight, low-overhead messaging.
  • Alert Channels: Telegram Bot API with granular user/role access verification.
  • Database Engine: MySQL/SQLite change tracking scripts (permintaan_semua.py).

Key Outcomes

  • Immediate Response: Reduced notification delay from 15 minutes to under 2 seconds.
  • Enhanced Visibility: Real-time updates delivered instantly to doctor and coordinator group chats.
  • High Availability: Automated service daemon restart hooks, achieving 99.9% uptime.

Project Info

Client RS Pertamina Dumai

Rumah Sakit Pertamina Dumai (RSPD) adalah sebuah rumah sakit umum swasta kelas C yang berlokasi di Jl. Raya Bukit Datuk, Kota Dumai, Riau. Fasilitas kesehatan ini merupakan bagian dari jaringan PT Pertamina Bina Medika IHC (Indonesia Healthcare Corporation), yang merupakan holding rumah sakit BUMN di Indonesia.

Technologies Used
AI Agent Telegram Bot MQTT Python