HDMI (Raspberry Pi) Integration with ASI Biont AI Agent: Real-Time Dashboards, Automated Alerts, and No-Code Control

Introduction

HDMI displays connected to a Raspberry Pi are a powerful combination for visualizing real-time data, monitoring dashboards, and creating interactive kiosks. However, managing content updates, triggering alerts, and integrating with external data sources often requires custom scripting and manual polling. The ASI Biont AI agent changes this paradigm by providing a conversational interface to control and automate your HDMI display through the Raspberry Pi. Instead of writing schedules or polling APIs, you simply describe your dashboard requirements in chat, and ASI Biont generates the integration code on the fly. This article is a step-by-step, expert guide to connecting your HDMI (Raspberry Pi) setup to ASI Biont, covering connection methods, code examples, and real-world use cases.

Why Integrate HDMI (Raspberry Pi) with an AI Agent?

Traditional approaches to managing an HDMI display on a Raspberry Pi involve manual SSH sessions, cron jobs, or custom Python scripts that poll data sources (APIs, databases, IoT sensors) and update a dashboard library like pygame, tkinter, or a browser-based kiosk. Each change requires rewriting code, redeploying scripts, and testing. ASI Biont eliminates this friction by acting as an intelligent middleware that:

  • Connects via SSH to the Raspberry Pi – the most direct and secure method for executing commands, running scripts, and controlling GPIO or display services.
  • Generates Python code in seconds – you describe what data you want to show (e.g., server CPU load, weather, IoT metrics), and the AI writes a script that fetches data, updates the display, and sends alerts.
  • Automates decision-making – based on thresholds (e.g., temperature > 40°C), the AI can trigger visual warnings on the HDMI display, send a Telegram message, or execute a shell command.

Connection Method: SSH (via paramiko)

ASI Biont connects to the Raspberry Pi using SSH, which is the recommended method for any Linux-based single-board computer. The AI writes a Python script that runs in the ASI Biont sandbox environment (execute_python) and uses the paramiko library to establish an SSH session. This approach gives full access to the Pi’s file system, shell commands, and any locally installed software (e.g., feh for image display, python3 for GUI scripts).

Why SSH and not other methods?

Method Suitability for HDMI Display
COM port Not applicable – HDMI is a video interface, not a serial port
MQTT Could be used if the Pi runs an MQTT subscriber, but SSH is simpler for direct display control
HTTP API Possible if you run a web server on the Pi, but adds overhead
SSH (paramiko) Best fit – direct, secure, allows running any command or script on the Pi

The AI uses the industrial_command tool with the ssh protocol, but in practice, the code is generated inside execute_python. The user provides the Pi’s IP address, username, password or SSH key, and the AI handles authentication.

Step-by-Step Integration Guide

1. Prepare Your Raspberry Pi

Ensure your Raspberry Pi is connected to the same network as ASI Biont. Enable SSH (raspi-config → Interface Options → SSH → Enable). Install Python3 and any display library you plan to use. For this guide, we will use pygame to render a real-time dashboard on the HDMI screen.

sudo apt update
sudo apt install python3-pygame feh -y

2. Obtain ASI Biont API Credentials

Log in to asibiont.com. Navigate to Devices → Create API Key. Copy the token – you will need it only if you intend to use the Hardware Bridge (not required for SSH; the AI uses execute_python directly). For SSH integration, no bridge is needed – the AI runs the code in its cloud sandbox and connects to your Pi over the network.

3. Describe Your Integration in Chat

Open the ASI Biont chat interface. Describe the task in natural language. For example:

“Connect to my Raspberry Pi at 192.168.1.100 via SSH with username pi and password raspberry. Show a fullscreen dashboard on the HDMI display that updates every 5 seconds. Display CPU usage, memory usage, and disk space. If CPU > 80%, show a red warning text. Also send a Telegram alert to my chat ID @mychat with the message ‘High CPU detected’.”

The AI will generate the Python code and execute it in the sandbox. You don’t need to write a single line of code.

4. Example Generated Code

Below is the Python script that ASI Biont would generate and run. The script uses paramiko to SSH into the Pi, retrieves system metrics, and updates a pygame window on the HDMI display. Note: the actual sandbox script runs on the ASI Biont server; it sends commands to the Pi via SSH, but does not run the GUI locally – instead, it instructs the Pi to run a remote script that renders the dashboard.

import paramiko
import time

# Configuration
PI_IP = "192.168.1.100"
USERNAME = "pi"
PASSWORD = "raspberry"
TELEGRAM_BOT_TOKEN = "YOUR_BOT_TOKEN"
TELEGRAM_CHAT_ID = "@mychat"

def send_telegram_alert(message):
    import requests
    url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage"
    requests.post(url, json={"chat_id": TELEGRAM_CHAT_ID, "text": message})

def execute_ssh_command(command):
    client = paramiko.SSHClient()
    client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    client.connect(PI_IP, username=USERNAME, password=PASSWORD)
    stdin, stdout, stderr = client.exec_command(command)
    output = stdout.read().decode()
    client.close()
    return output

# Generate dashboard Python script to run on Pi
dashboard_script = '''
import pygame
import psutil
import time

pygame.init()
screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
pygame.mouse.set_visible(False)
font = pygame.font.Font(None, 48)
small_font = pygame.font.Font(None, 36)

while True:
    cpu = psutil.cpu_percent()
    mem = psutil.virtual_memory().percent
    disk = psutil.disk_usage('/').percent

    screen.fill((0, 0, 0))
    text_cpu = font.render(f"CPU: {cpu}%", True, (255, 255, 255))
    text_mem = font.render(f"Memory: {mem}%", True, (255, 255, 255))
    text_disk = font.render(f"Disk: {disk}%", True, (255, 255, 255))

    if cpu > 80:
        warning = small_font.render("HIGH CPU", True, (255, 0, 0))
        screen.blit(warning, (100, 200))

    screen.blit(text_cpu, (100, 50))
    screen.blit(text_mem, (100, 110))
    screen.blit(text_disk, (100, 170))
    pygame.display.flip()
    time.sleep(5)
'''

# Write the script to Pi and run it in background
ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_client.connect(PI_IP, username=USERNAME, password=PASSWORD)

# Transfer script via SFTP
transport = ssh_client.get_transport()
sftp = paramiko.SFTPClient.from_transport(transport)
with sftp.open('/home/pi/dashboard.py', 'w') as f:
    f.write(dashboard_script)
sftp.close()

# Run the dashboard in background (nohup)
ssh_client.exec_command("nohup python3 /home/pi/dashboard.py > /dev/null 2>&1 &")
ssh_client.close()

# Monitor CPU and send alert if > 80%
while True:
cpu = float(execute_ssh_command("top -bn1

| grep 'Cpu(s)' | awk '{print $2}' | cut -d'%' -f1"))
    if cpu > 80:
        send_telegram_alert(f"⚠️ High CPU detected on Pi: {cpu}%")
    time.sleep(30)

Note: The while True loop in the sandbox would normally be killed after 30 seconds. In practice, the AI would use execute_ssh_command to start the dashboard script on the Pi (which runs indefinitely on the Pi itself), and then the alert monitoring loop runs in the sandbox with a short timeout, checking multiple times.

5. How It Works (Architecture)

+-------------------+       SSH (paramiko)       +-------------------------+

|  ASI Biont Cloud  |  <----------------------->  |  Raspberry Pi (HDMI)    |
|  (Sandbox Python)  |  commands & script upload  |  - pygame dashboard     |
|  - execute_python  |                            |  - psutil metrics       |
|  - paramiko        |                            |  - Telegram alert       |
+-------------------+                            +-------------------------+

The AI agent writes the integration script, runs it in the sandbox, and the script connects to the Pi over SSH. The Pi runs a persistent dashboard script (rendered via HDMI), while the cloud script periodically checks metrics and sends alerts.

Real-World Use Cases

1. Server Monitoring Dashboard

Display real-time CPU, memory, disk, and network usage from a remote server or multiple servers. ASI Biont can aggregate data from several Pis and show a unified dashboard on one HDMI screen.

2. Weather & IoT Metrics Kiosk

Connect a Raspberry Pi to a DHT22 temperature/humidity sensor (via GPIO) and display readings on HDMI. ASI Biont reads the sensor data via SSH, visualizes it, and sends alerts when thresholds are exceeded (e.g., temperature > 35°C).

3. Smart Factory Floor Display

In an industrial setting, a large HDMI display shows OEE (Overall Equipment Effectiveness), production counts, and machine status. ASI Biont connects to PLCs via Modbus/TCP (using pymodbus in the sandbox) and forwards the data to the Pi for display.

Why ASI Biont Beats Traditional Methods

Aspect Traditional Approach ASI Biont Approach
Development time Hours to code, test, deploy Minutes – describe in chat
Flexibility Hard-coded logic; changes require code rewrite Conversational – just ask the AI
Multi-protocol support Need separate libraries for each protocol Single sandbox with 14+ protocols
Alert integration Manual setup (email, SMS, Telegram) AI automatically includes alerts
Maintenance Scripts break when APIs change AI regenerates on demand

Conclusion

Integrating an HDMI display on a Raspberry Pi with the ASI Biont AI agent transforms a static screen into a dynamic, intelligent visualization hub. Whether you need a server monitoring dashboard, a weather kiosk, or an industrial production display, ASI Biont connects via SSH, generates the Python code, and automates alerts – all through a simple chat conversation. No coding experience required, no waiting for developer support. Your HDMI display becomes a live window into your data, managed by an AI that understands your needs.

Ready to try it? Log in to asibiont.com, open the chat, and describe your Raspberry Pi HDMI dashboard. The AI will connect and build it for you in seconds.

← All posts

Comments