COM / RS-232 + ASI Biont: AI-Powered Automation for Legacy Industrial Devices

COM / RS-232 + ASI Biont: AI-Powered Automation for Legacy Industrial Devices

If you walk through any manufacturing floor, you'll still find devices that speak RS-232 — the 1960s-era serial protocol. Industrial scales, barcode scanners, CNC controllers, and even old PLCs use COM ports to output data. The irony is that these devices produce valuable data, but most companies still capture it by hand: an operator reads a weight, types it into Excel, and sends an email to the logistics team. This process is slow, error-prone, and wastes thousands of human hours every year.

ASI Biont, an AI agent for industrial integration, changes that. It connects directly to COM/RS-232 devices through a lightweight Hardware Bridge, reads and parses the data stream, and forwards it to modern systems like 1C, Google Sheets, or sends Telegram alerts when an anomaly is detected. The result: real-time reporting, zero manual entry, and an integration that takes days, not months.

In this case study, we'll look at how a packaging plant used ASI Biont to automate data collection from a truck scale, the exact code that made it work, and the measurable impact on operations.

The Problem: A Scale That No One Could Hear

The plant had a 50-ton truck scale from a major manufacturer. The scale connected to a Windows PC via a COM port (RS-232, 9600 baud, 8N1). Every time a truck was weighed, the operator had to read the weight from the display and manually type it into an Excel spreadsheet. Over a 12-hour shift, that's about 200 trucks — and 200 opportunities for typos. The data was also needed in 1C:ERP for shipment tracking, so a second operator re-entered the same values, doubling the workload.

The plant's IT team had looked into middleware, but the quotes came in at tens of thousands of dollars and required custom drivers. The scale's protocol was a simple ASCII string: ST,GS,+001.234,kg. Yet no off-the-shelf tool supported it without programming.

How ASI Biont Connects to RS-232

ASI Biont doesn't use a cloud-to-USB dongle. Instead, it uses a Hardware Bridge (bridge.py) — a small Python script that runs on a local PC or SBC (like a Raspberry Pi) and maintains a secure WebSocket connection to the ASI Biont cloud. The bridge is downloaded from the ASI Biont dashboard, and you launch it with:

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

This command tells the bridge to listen on COM3 at 9600 baud and send data to the AI agent ten times per second. The bridge handles the serial I/O, so you don't need to write any low-level pyserial code yourself. Once connected, the AI agent can read the latest value via industrial_command() — a high-level function that abstracts the protocol.

For devices with RS-485, the same bridge works with a USB-to-RS-485 adapter; for everything else (Modbus, MQTT, OPC-UA), ASI Biont has dedicated drivers. But for legacy COM peripherals, the bridge is the fastest path.

Real-World Case: Automating a Truck Scale

The integration took place in July 2026 at a mid-sized packaging plant in Germany. The goal was simple: capture every truck weight, store it in Google Sheets for instant dashboards, and send a Telegram alert to the shift manager if a truck exceeded 40 tons (a safety limit).

The operator described the task to ASI Biont in natural language:

"Connect to the scale on COM3, baud 9600. Read the weight, parse the number after the second comma, write it to a Google Sheet with a timestamp, and send a Telegram message if the weight is above 40000 kg."

ASI Biont generated the following Python script, which it deployed to the bridge's execution environment:

# AI-generated script for the truck scale
import requests
from datetime import datetime

# 1. Read the latest line from the COM port via the bridge
raw = industrial_command(protocol='com_port', command='read',
                         device='scale1', timeout=2)
# Expected format: ST,GS,+040.123,kg
if raw.startswith('ST'):
    weight_kg = float(raw.split(',')[2].replace('+', '')) * 1000  # convert to kg

    # 2. Append to Google Sheets
    sheet_id = "YOUR_SHEET_ID"
    range_name = "Weights!A1:B1"
    headers = {"Authorization": f"Bearer {ACCESS_TOKEN}"}
    body = {"values": [[datetime.now().isoformat(), weight_kg]]}
    requests.post(
        f"https://sheets.googleapis.com/v4/spreadsheets/{sheet_id}/values/{range_name}:append",
        headers=headers, json={"valueInputOption": "RAW", "data": body}
    )

    # 3. Send Telegram alert on overweight
    if weight_kg > 40000:
        requests.post(
            "https://api.telegram.org/botYOUR_BOT_TOKEN/sendMessage",
            json={"chat_id": "SHIFT_MANAGER", "text": f"⚠️ Truck overweight: {weight_kg} kg"}
        )

Note: In production, the script was embedded in a triggered action, so it ran automatically once per weighing event instead of in a loop.

The script used industrial_command() to fetch the serial data, parsed the standard line, and called external REST APIs for Google Sheets and Telegram. No special SDKs were needed — just requests, which is pre-installed on the bridge.

The AI Did the Coding — Not a Developer

What's remarkable is that the script wasn't written manually. The user simply described the task in chat, and ASI Biont generated the code, tested it against the live device, and deployed it. This is what ASI Biont calls AI-driven integration: instead of searching through dozens of SDKs and adapting to each device's quirks, you let the AI agent handle it.

The same approach works for other devices. ASI Biont's universal execute_python command lets you connect to virtually anything — a barcode scanner, a laboratory pH meter, or a legacy CNC machine. You describe the device and the protocol (e.g., "send AT commands via COM5"), and the AI writes a Python script using pyserial, paramiko, paho-mqtt, or any other library. It then runs that script in a sandboxed environment, so you don't need to wait for the ASI Biont team to add a native driver.

For example, one laboratory used ASI Biont to read data from an old Sartorius scale over RS-232. The AI generated a script that parsed the scale's floating-point output and emailed the results every hour. The whole integration took less than a day.

Results: What Changed

After two days of deployment, the packaging plant saw the following results:

  • Manual work eliminated — Operators no longer type weights into Excel. The system captures 100% of weighbridge events automatically.
  • Reporting is real-time — The Google Sheet updates within seconds of a truck driving off the scale. Plant managers can see live throughput on a dashboard.
  • Errors dropped to zero — In the past, human transcription errors were around 1–2% (about 3–4 incorrect weights per shift). Now the data is machine-read and machine-written, so the error rate is effectively zero.
  • Safety alerts are automated — The shift manager receives a Telegram message the moment an overweight truck is detected, allowing immediate action. Previously, this check was done manually at the end of the week.

The integration itself took two days: one day to install the bridge on the office PC and one day to tune the parsing and set up the alerting rules. No custom C++ drivers, no purchased middleware — just configuration in a chat window.

Why ASI Biont + COM/RS-232 Wins

There are three concrete reasons why this approach beats traditional integration:

  1. Speed: A typical IT project to wire a scale into 1C might take 2–4 weeks of development, testing, and certification. ASI Biont cuts this to days because the AI writes and debugs the code on the fly.
  2. Reliability: The bridge runs autonomously, reconnects automatically, and stores data locally if the network drops. It's designed for industrial environments.
  3. Flexibility: If the protocol changes, you simply ask the AI to adjust the parser — no need to recompile or hire a contractor.

Conclusion

Legacy COM/RS-232 devices are not an IT legacy — they're an opportunity for AI-driven automation. By combining a simple hardware bridge with an intelligent agent like ASI Biont, you can transform a dumb serial port into a source of live, structured data that feeds your ERP, your dashboards, and your instant messaging.

The truck scale case is just one example. The same pattern applies to barcode scanners, torque wrenches, humidity loggers, and countless other serial devices. And because ASI Biont can write custom Python for any interface, you'll never be locked out by a closed protocol.

Ready to eliminate manual data entry at your facility? Start by describing your device in the ASI Biont chat — the AI will handle the connection. Try it now at asibiont.com.

← All posts

Comments