LilyGO T-Display Meets ASI Biont: Turn Your ESP32 into an AI-Managed Control Panel

LilyGO T-Display Meets ASI Biont: Turn Your ESP32 into an AI-Managed Control Panel

Every IoT maker has faced the same problem: you've built a great sensor node, but to actually use the data you need a dashboard, a backend API, and days of plumbing. The LilyGO T-Display, a GoPro-size ESP32 board with a 240×135 LCD, is a perfect edge device — but without a brain behind the cloud, it's just a screen with a heartbeat.

ASI Biont changes that. It's an AI integration agent that connects to your hardware through a chat interface. No control panels, no 'add device' wizard, no waiting for a developer. You describe the integration in natural language, and the agent writes, executes, and debugs the code for you. In fact, it can connect to anything through a universal execute_python mechanism, where the AI generates a Python script using pyserial, paho-mqtt, pymodbus, aiohttp, or opcua-asyncio, and runs it in a safe sandbox.

In this guide, I'll show you two concrete ways to link a LilyGO T-Display to ASI Biont — wireless MQTT and wired COM port via the Hardware Bridge — and then walk through 12 practical automation scenarios.

Why LilyGO T-Display?

The T-Display is produced by LilyGO (a well-known ESP32 board vendor). The official product page and Espressif's ESP32 datasheet list the specs: dual-core Xtensa LX6, 4 MB flash, 2.4 GHz Wi-Fi, BLE 4.2, a 1.14" ST7789 display, and two user buttons. It's cheap, available from AliExpress or Mouser, and it runs MicroPython or Arduino.

For an AI integration, it's a great edge node because:

  • It's connected – Wi-Fi means MQTT and HTTP.
  • It's visible – the LCD can display AI-generated messages.
  • It's interactive – the buttons can trigger AI workflows.

Connection strategy 1: MQTT over Wi-Fi

MQTT is the de-facto protocol for IoT telemetry. ASI Biont has paho-mqtt built into its Python runtime, so you can subscribe and publish directly from a chat prompt.

On the LilyGO side, use MicroPython with the mqtt library. Here's a minimal firmware that publishes a temperature value and listens for commands:

from mqtt import MQTTClient
import network, machine, time

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('your_ssid', 'your_password')
while not wlan.isconnected():
    time.sleep(0.1)

client = MQTTClient('lilygo_01', '192.168.1.50', 1883)
client.connect()

def on_command(topic, msg):
    if msg == b'REBOOT':
        machine.reset()

client.set_callback(on_command)
client.subscribe('lilygo/command')

while True:
    client.check_msg()
    client.publish('lilygo/temp', str(read_dht22()))  # your sensor function
    time.sleep(10)

Now in the ASI Biont chat, you might type: 'Connect to MQTT broker 192.168.1.50, subscribe to lilygo/temp for 5 seconds, print the average.' The agent will produce and run this code (note: no while True because the sandbox has a 30-second timeout):

import paho.mqtt.client as mqtt
import time

values = []
def on_message(c, u, m):
    values.append(float(m.payload))

client = mqtt.Client()
client.connect('192.168.1.50', 1883, 60)
client.subscribe('lilygo/temp')
client.on_message = on_message
client.loop_start()
time.sleep(5)          # collect data for 5 seconds
client.loop_stop()
print('Average:', sum(values)/len(values))

That's the full integration. No dashboards, no REST API, no custom WebSocket server.

Connection strategy 2: COM port via Hardware Bridge

If your LilyGO is connected over USB, the most direct route is the Hardware Bridge. bridge.py is a small program that you download from your ASI Biont dashboard (never from GitHub). Run it like this:

python bridge.py --token=YOUR_TOKEN --ports=COM3 --baud=115200 --rate=10

It creates a secure tunnel between the COM port and the ASI Biont cloud. Once the bridge is up, the AI agent can use industrial_command() to read and write serial data:

industrial_command(protocol='serial', command='AT', port='COM3')

You can think of industrial_command as a toolbox function that the agent knows how to use; it's not something you call from normal Python. It works the same for RS-232 and RS-485, so if your LilyGO has an external MAX485 transceiver, it can talk Modbus RTU as well.

Connection strategy 3: Universal execute_python

This is the killer feature. ASI Biont doesn't have a pre-built 'LilyGO plugin' — and it doesn't need one. Just describe your exact hardware in the chat.

Example user prompt:
'My LilyGO is connected to COM7 at 115200 baud. It prints TEMP=23.5 once per second. Read the stream for 10 seconds, find the maximum, and send it to me as a Telegram message.'

The AI agent then generates a script using pyserial and requests:

import serial, time, requests

ser = serial.Serial('COM7', 115200, timeout=2)
values = []
end = time.time() + 10
while time.time() < end:
    line = ser.readline().decode().strip()
    if line.startswith('TEMP='):
        values.append(float(line.split('=')[1]))

max_temp = max(values)
requests.post(
    'https://api.telegram.org/bot<YOUR_BOT_TOKEN>/sendMessage',
    data={'chat_id': '<CHAT_ID>', 'text': f'Max temp from LilyGO: {max_temp}°C'}
)
print('Done:', max_temp)

This works in seconds. No need to wait for a device integration library — the AI writes it right there, in the chat.

Case study: homelab server monitor

Problem: I have a LilyGO T-Display on my desk and a Proxmox server in another room. I wanted a live status display with the ability to reboot the server by pressing a button.

Solution: I flashed the MQTT firmware from above. The T-Display subscribes to server/status and displays the message on the LCD. A button press publishes to server/reboot_request. In ASI Biont, I just wrote: 'Listen to server/reboot_request; when you get a message, execute ssh root@192.168.1.10 reboot via paramiko.' The AI used paramiko to run the command and replied with the output.

Result: The screen shows SERVER OK or SERVER DOWN depending on the telemetry, and one button click restarts the server after a 10-second countdown. The whole setup, from flashing to working, took about 25 minutes.

12 practical automation ideas

  1. Temperature alert with LCD panel
    LilyGO publishes lilygo/temp; ASI Biont checks if it exceeds a threshold, publishes an alert to lilygo/alert, and the LCD turns red.
    python # ASI Biont side client.publish('lilygo/alert', 'OVERHEAT')

  2. Serial debug log analysis
    Connect via bridge and ask: 'Read 20 lines from COM3 and find all lines containing ERROR.' The agent uses industrial_command(protocol='serial', command='READ', port='COM3').

  3. Remote reboot command
    Chat: 'Reboot the LilyGO.' Agent publishes 'REBOOT' to lilygo/command; the ESP32's handler resets.

  4. Weather dashboard
    Subscribe to a public HTTP weather API or an MQTT feed and display the current conditions on the ST7789. The agent formats the data in chat.

  5. CI / CD build status
    ASI Biont polls a Jenkins or GitHub Actions API with requests.get(...), extracts the build state, and publishes it to lilygo/ci for display.

  6. Modbus RTU to MQTT bridge
    LilyGO with an RS-485 shield reads a power meter; ASI Biont uses pymodbus to interpret registers and republish the values over MQTT.
    python from pymodbus.client import ModbusTcpClient client = ModbusTcpClient('192.168.1.20') result = client.read_holding_registers(0, 1) print(result.registers)

  7. Button-controlled Telegram alerts
    A button press sends a message to a topic; the AI agent forwards it using a requests.post to api.telegram.org.

  8. Smart fan speed
    If the temperature topic crosses 30°C, the agent publishes lilygo/fan with a PWM duty value. The LilyGO adjusts a MOSFET controlling a 12V fan.

  9. Energy monitoring
    Attach an INA219 current sensor; MicroPython publishes power_w; the agent accumulates readings and generates a daily consumption report.

  10. GPS tracker
    Connect a NEO-6M module; LilyGO publishes lat,lon; the agent plots the route on a Matplotlib map and sends the PNG to chat.

  11. RFID door lock
    An RC522 reader emits tag IDs via MQTT; the agent validates the ID against a list and triggers a relay on GPIO21 to unlock the door.
    python client.subscribe('lilygo/rfid') # AI side: compare against allowed tags

  12. Startup diagnostics
    Use the COM port bridge to read the boot log from the ESP32; the AI looks for panic messages and suggests fixes automatically.

Comparing the connection methods

Method Infrastructure Best for
MQTT Wi-Fi + broker Remote telemetry, command-and-control
COM port (Hardware Bridge) USB / RS-232/485 Serial debug, Modbus RTU, local PC
execute_python Any Universal, legacy or custom devices

Conclusion

The LilyGO T-Display is a small piece of hardware with a big potential when it's plugged into an AI agent. ASI Biont connects through MQTT, COM port, or just execute_python — it all depends on what you describe in the chat. The agent handles the protocol, the error handling, and the final automation. You don't write a single dashboard.

Try it yourself. Open asibiont.com, tell the agent which port or MQTT broker your LilyGO is on, and watch it produce working code in seconds.

← All posts

Comments