How to Integrate HDMI (Raspberry Pi) with ASI Biont AI Agent: A Step-by-Step Guide for Display Automation

Introduction

Raspberry Pi is one of the most versatile single-board computers on the market, widely used for digital signage, kiosk displays, dashboards, and information screens. However, managing what appears on an HDMI-connected display often requires manual scripting, cron jobs, or complex middleware. ASI Biont changes that by letting you connect your Raspberry Pi (via HDMI output) to an AI agent that can dynamically control what is shown on the screen—using voice commands, sensor triggers, or data from external sources—without writing a single line of code yourself.

This article is an integration guide, not a device review. We’ll walk through how ASI Biont connects to a Raspberry Pi over SSH (using the paramiko library), runs Python scripts that update the HDMI display content, and automates tasks like showing real-time weather, stock prices, or production dashboards. You’ll see concrete code examples, understand the architecture, and learn how to set up your own AI-controlled display in minutes.

Why Connect HDMI (Raspberry Pi) to an AI Agent?

A typical Raspberry Pi display setup runs a static webpage or a Python script that loops through images. To change content, you manually edit files, update a URL, or write new code. With ASI Biont, the AI agent acts as a smart controller:

  • It can update the display content based on real-time data (e.g., from sensors, APIs, or databases).
  • It can respond to voice commands (via ASI Biont’s chat interface) to switch between different dashboards.
  • It can schedule automatic refreshes—for example, show a morning summary, then switch to a live monitoring dashboard.
  • It can integrate with other devices (ESP32 sensors, PLCs) and display their readings on the HDMI screen.

The result: a fully autonomous display that adapts without human intervention.

Connection Method: SSH (via paramiko)

ASI Biont supports multiple connection methods, but for a Raspberry Pi running a full Linux operating system, SSH is the most practical and powerful approach. The AI agent writes a Python script that uses the paramiko library (available in the ASI Biont sandbox) to connect to your Raspberry Pi over the network. Once connected, the AI can:

  • Execute shell commands (python3, echo, kill).
  • Run existing Python scripts that control the HDMI output (e.g., using pygame or tkinter fullscreen windows).
  • Transfer files (e.g., update a JSON configuration file for a dashboard).
  • Monitor processes and restart them if they crash.

Why SSH and not COM port or MQTT? The Raspberry Pi’s HDMI output is not a serial device—it’s a video interface. To control what’s displayed, you need to run software on the Pi itself (like a web browser in kiosk mode or a Python GUI). SSH is the standard way to remotely execute such software.

Real-World Use Case: AI-Controlled Digital Signage Dashboard

Let’s consider a concrete scenario:

A small factory wants to display real-time temperature and humidity readings from an ESP32 sensor on a large HDMI monitor connected to a Raspberry Pi. The display should update every 30 seconds. If the temperature exceeds 30°C, the AI should automatically switch the screen to show a red alert page.

Step 1: Set up the Raspberry Pi

  • Install Raspberry Pi OS (Lite or Desktop) on the Pi.
  • Enable SSH: sudo systemctl enable ssh && sudo systemctl start ssh.
  • Install a lightweight web browser (e.g., Chromium) for kiosk mode.
  • Create a simple HTML dashboard that displays sensor data (we’ll update it via a local file).

Step 2: Connect ASI Biont to the Pi via SSH

In the ASI Biont chat, you simply describe your setup:

“Connect to my Raspberry Pi at 192.168.1.100 with username ‘pi’ and password ‘raspberry’. Then run a Python script that reads temperature from an MQTT broker (broker.hivemq.com, topic ‘factory/temperature’) and updates an HTML file displayed in Chromium kiosk mode.”

The AI agent will generate and execute the following integration script (inside execute_python):

import paramiko
import json

# SSH connection details
host = "192.168.1.100"
port = 22
username = "pi"
password = "raspberry"

# Command to update the HTML file and reload Chromium
command = """
#!/bin/bash
# Fetch latest data from MQTT (using mosquitto_sub)
TEMP=$(mosquitto_sub -h broker.hivemq.com -t "factory/temperature" -C 1 2>/dev/null)
HUM=$(mosquitto_sub -h broker.hivemq.com -t "factory/humidity" -C 1 2>/dev/null)

# Update HTML file
cat <<EOF > /home/pi/dashboard/index.html
<html><body>
<h1>Factory Dashboard</h1>
<p>Temperature: $TEMP °C</p>
<p>Humidity: $HUM %</p>
</body></html>
EOF

# Reload Chromium (if running)
displays=$(xdotool search --class chromium 2>/dev/null)
if [ -n "$displays" ]; then
    xdotool key --window $displays F5
fi
"""

# Execute via SSH
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(host, port, username, password)
stdin, stdout, stderr = client.exec_command(command)
print(stdout.read().decode())
client.close()

Note: The script uses mosquitto_sub (a command-line MQTT client) to fetch the latest sensor value. If mosquitto is not installed on the Pi, the AI can first install it via sudo apt install mosquitto-clients -y.

Step 3: Add Alert Logic

In the same chat, you can ask:

“If the temperature exceeds 30°C, change the background of the HTML to red and display a warning.”

The AI will modify the script to include conditional logic:

# Inside the bash script, after fetching TEMP:
if [ $(echo "$TEMP > 30" | bc) -eq 1 ]; then
    BG_COLOR="red"
    WARNING="⚠️ HIGH TEMPERATURE"
else
    BG_COLOR="white"
    WARNING=""
fi

cat <<EOF > /home/pi/dashboard/index.html
<html><body style="background-color: $BG_COLOR;">
<h1>Factory Dashboard</h1>
<p>Temperature: $TEMP °C $WARNING</p>
<p>Humidity: $HUM %</p>
</body></html>
EOF

Step 4: Automate the Refresh Loop

Rather than manually triggering the update each time, you can ask the AI to schedule a cron job on the Pi:

“Create a cron job that runs this script every 30 seconds.”

The AI will execute:

(crontab -l 2>/dev/null; echo "*/30 * * * * /home/pi/update_dashboard.sh") | crontab -

Now the display updates automatically, and the AI can also override the content on demand via chat.

Alternative: Running a Full-Screen Python GUI

If you prefer a Python-based display (e.g., using tkinter or pygame), the AI can write and upload a script that runs in fullscreen:

# /home/pi/display.py (created by AI via SSH)
import tkinter as tk
import subprocess
import json

def update_data():
    # Fetch temperature from MQTT via mosquitto_sub
    temp = subprocess.check_output(["mosquitto_sub", "-h", "broker.hivemq.com", "-t", "factory/temperature", "-C", "1"]).decode().strip()
    label_temp.config(text=f"Temperature: {temp} °C")
    root.after(30000, update_data)  # update every 30 seconds

root = tk.Tk()
root.attributes("-fullscreen", True)
label_temp = tk.Label(root, text="Loading...", font=("Arial", 48))
label_temp.pack(expand=True)
update_data()
root.mainloop()

The AI can start this script via SSH and keep it running in the background.

How the User Interacts with ASI Biont

The entire integration happens through natural language in the chat. No dashboard panels or “add device” buttons. You simply describe:

  • What device (Raspberry Pi at IP 192.168.1.100)
  • How to connect (SSH with username/password or SSH key)
  • What to do (update an HTML dashboard with MQTT data, switch to alert mode if temperature is high)

The AI writes the Python code using paramiko, executes it in the sandbox, and the result appears on your HDMI display within seconds.

Why This Approach Is Powerful

Feature Traditional Method With ASI Biont AI Agent
Setup time 2–3 hours (manual coding, debugging) 5–10 minutes (describe in chat)
Adaptability Requires code changes for new data sources AI rewrites script on the fly
Maintenance You fix bugs, update libraries AI handles errors, suggests improvements
Remote control Requires VPN or additional tools AI agent works from anywhere via web

Technical Architecture

ASI Biont does not run code directly on your local network. Here’s how it works:

  1. You (the user) chat with the AI agent on asibiont.com.
  2. The AI writes a Python script that uses paramiko to SSH into your Raspberry Pi.
  3. The script runs inside ASI Biont’s sandbox (execute_python), which has outbound internet access but no direct access to your local devices.
  4. The script connects to your Pi’s public IP (or a local IP if you use a VPN or port forwarding) and executes commands.
  5. The Pi updates its HDMI display accordingly.

Security note: For production use, consider setting up SSH key authentication instead of passwords, and restrict the Pi’s firewall to only allow SSH from known IPs (e.g., ASI Biont’s server IP range).

Conclusion

Integrating an HDMI display (via Raspberry Pi) with ASI Biont’s AI agent transforms a static screen into a dynamic, responsive information hub. Whether you need a factory dashboard, a weather display, or a digital signage system, the AI agent handles the entire setup—writing SSH scripts, managing MQTT subscriptions, and updating content—without you writing a single line of code.

Ready to try it yourself? Head over to asibiont.com, create an account, and start chatting with the AI. Tell it: “Connect to my Raspberry Pi at 192.168.1.100 via SSH, then show the current temperature from an MQTT sensor on the HDMI display.” Watch your screen come alive in seconds.

← All posts

Comments