OpenRFID ERP Gateway: Open-Source Tally & SAP Connector
Open-source Python and Node.js starter scripts for translating LLRP and handheld RFID tag scan streams into Tally Prime XML, SAP Service Layer JSON, and REST Webhooks.
Project Overview & Architecture
Enterprise-grade open-source integration gateway connecting fixed RFID readers and handheld scanners directly to Tally Prime, SAP Business One, SAP S/4HANA, Zoho Inventory, and custom REST API endpoints. Includes verified Tally TDL XML envelope generators for automated Stock Journal and Physical Stock vouchers over HTTP TCP Port 9000, SAP Service Layer OData v4 clients for Goods Receipt PO (GRPO) creation, in-memory Disruptor ring-buffer debounce filters (3-second sliding window) to eliminate dock-door tag multipath duplicates, and encrypted local SQLite Write-Ahead-Log (WAL) offline queues for zero-data-loss factory operations during network dropouts.
4-Tier Edge Pipeline Architecture
LLRP & Reader Listener
Establishes asynchronous TCP sockets to fixed readers (Impinj, Zebra) or HTTP listeners for Android handheld batch posts.
Ring-Buffer Filtering
Eliminates dock door multipath duplicates using a 3-second sliding window ring buffer to ensure 1 transaction per physical asset.
SQLite WAL Queue
Guarantees zero-data-loss during ERP server maintenance or network drops by writing transactions to local disk.
TDL XML & OData JSON
Generates formatted Tally XML vouchers (Port 9000) or dispatches SAP Service Layer JSON payloads (/b1s/v2/).
Supported Enterprise ERP Connectors
| Target System | Protocol / Transport | Payload Format | Voucher / Transaction Type |
|---|---|---|---|
| Tally Prime / ERP 9 | HTTP POST on TCP 9000 | TDL XML <ENVELOPE> | Stock Journal / Physical Stock |
| SAP Business One | HTTPS OData v4 Service Layer | JSON (/b1s/v2/PurchaseDeliveryNotes) | Goods Receipt PO (GRPO) |
| SAP S/4HANA | RFC BAPI / OData v4 | BAPI_GOODSMVT_CREATE | Goods Movement (101/311) |
| Zoho Inventory | HTTPS OAuth 2.0 REST Webhook | JSON (/api/v1/inventoryadjustments) | Inventory Adjustment |
Feature Benchmark: OpenRFID Solution vs. Proprietary Alternatives
| Feature Capability | OpenRFID Solution (MIT) | Commercial Paid Solutions | Hardware Rig / Manual |
|---|---|---|---|
| Integration Approach | 100% Automated Open-Source Connector Scripts | Custom ERP Consultancy ($5,000 - $15,000) | Manual Excel CSV Export & Import |
| Tally Prime Support | โ Native TDL XML over HTTP TCP 9000 (Real-Time) | Batch ODBC sync only (10-15 min delay) | Manual keyboard barcode typing |
| SAP Service Layer | โ OData v4 JSON GRPO & Serial Number Mapping | Direct database query (violates SAP warranty) | Manual SAP transaction UI typing |
| Multipath Debounce | โ 3-Second In-Memory Ring Buffer Filter | Basic timer debounce | Duplicate scan errors in ERP |
| Edge Hardware Footprint | โ Runs on Raspberry Pi, Mini PC, or Windows (<40MB RAM) | Requires dedicated on-premise Windows VM | Manual workstation terminal |
CLI Arguments & Configuration Reference
| Parameter / Flag | Type | Default | Description & Action |
|---|---|---|---|
| --tally-host <ip> | string | "127.0.0.1" | Target IP address of the Tally Prime machine with HTTP server enabled. |
| --tally-port <port> | integer | 9000 | Tally Prime XML ODBC/HTTP server port (default 9000). |
| --sap-url <url> | url | "https://sap.local:50000/b1s/v2" | SAP Business One Service Layer OData v4 endpoint URL. |
| --debounce-sec <sec> | float | 3.0 | Sliding window dwell-time debounce duration to eliminate multipath duplicate reads. |
| --offline-db <path> | filepath | "./data/erp_queue.db" | SQLite Write-Ahead-Log database path for fail-safe offline buffering. |
Code & Integration Blueprint
Copyable starter templates, CLI flags, and CI/CD pipelines:
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>
</HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDESC>
<REPORTNAME>Vouchers</REPORTNAME>
</REQUESTDESC>
<REQUESTDATA>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<VOUCHER VCHTYPE="Stock Journal" ACTION="Create">
<DATE>20260924</DATE>
<VOUCHERTYPENAME>Stock Journal</VOUCHERTYPENAME>
<VOUCHERNUMBER>RFID-SJ-0042</VOUCHERNUMBER>
<INVENTORYENTRIESIN.LIST>
<STOCKITEMNAME>Cotton Yarn Spool 500m</STOCKITEMNAME>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<RATE>250.00</RATE>
<AMOUNT>25000.00</AMOUNT>
<ACTUALQTY>100 Nos</ACTUALQTY>
<BILLEDQTY>100 Nos</BILLEDQTY>
<GODOWNNAME>Finished Goods Warehouse</GODOWNNAME>
<BATCHALLOCATIONS.LIST>
<GODOWNNAME>Finished Goods Warehouse</GODOWNNAME>
<BATCHNAME>BATCH-2026-09</BATCHNAME>
<AMOUNT>25000.00</AMOUNT>
<ACTUALQTY>100 Nos</ACTUALQTY>
<BILLEDQTY>100 Nos</BILLEDQTY>
</BATCHALLOCATIONS.LIST>
</INVENTORYENTRIESIN.LIST>
</VOUCHER>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE> Technical Specifications & Runtime Environment
| Target Architecture | Python 3 / TypeScript / TDL XML / OData v4 โข MIT Open Source License |
| Supported Protocols | REST API, WebSockets, MQTT, TCP Raw Sockets, Serial RS232 |
| Supported ERP Platforms | Tally Prime / ERP 9, SAP Business One, SAP S/4HANA, Zoho Inventory |
| Tally Transport Protocol | Direct TDL XML <ENVELOPE> HTTP POST on TCP Port 9000 |
| SAP Service Layer | HTTPS OData v4 JSON REST endpoints (/b1s/v2/PurchaseDeliveryNotes) |
| Debounce Filter Window | 3-Second sliding ring-buffer eliminating multipath dock-door duplicates |
Key Features & Capabilities
- โ Tally Prime Automated Stock Journal XML Generator via HTTP TCP Port 9000
- โ SAP Business One Service Layer GRPO Client (OData v4 HTTPS /b1s/v2/)
- โ SAP S/4HANA Goods Movement 101/311 BAPI & OData Connector
- โ In-Memory Disruptor Ring-Buffer with 3-Second Dwell-Time Debounce Filter
- โ Encrypted SQLite Write-Ahead-Log (WAL) Queue for Factory Offline Resilience
- โ Zoho Inventory OAuth 2.0 Webhook Dispatcher with Batch Array Slicing
- โ Configurable GPIO Trigger Controls for Dock Door Red/Green Indicator Lights
Related Hardware & Commercial Solutions
Explore compatible RFID readers, pre-built warehouse inventory software, and asset management systems developed by RFID Softwares:
Frequently Asked Questions
How does OpenRFID ERP Gateway integrate with Tally Prime? โ
It connects directly to Tally Prime's integrated HTTP server on TCP Port 9000 using standard TDL XML <ENVELOPE> payloads. It creates automated Stock Journal and Physical Stock vouchers without manual operator intervention.
Does it support SAP S/4HANA and SAP Business One? โ
Yes. For SAP S/4HANA, it connects via RFC BAPI (BAPI_GOODSMVT_CREATE) or OData v4 for Goods Movement 101/311. For SAP Business One, it dispatches JSON payloads to the Service Layer REST API (POST /b1s/v2/PurchaseDeliveryNotes) mapping serials to EPCs.
How does the gateway handle high-throughput dock door tag bursts? โ
The gateway features an in-memory Disruptor ring-buffer with a 3-second dwell-time debounce filter. It filters multipath duplicates and micro-batches up to 1,000 tags per second into single idempotent ERP vouchers.
What happens if factory Wi-Fi drops during an inventory audit? โ
All scanned tags are stored locally in an encrypted SQLite Write-Ahead-Log (WAL) queue. As soon as connectivity restores, an automated background worker syncs the queue with deterministic SHA-256 deduplication.
Can this connector run on an edge Raspberry Pi or Mini PC? โ
Yes. The lightweight Python / Node.js daemon is cross-platform and runs on any edge device (Raspberry Pi, industrial fanless box, Windows PC) positioned directly beside the physical RFID reader.
Can the gateway dispatch scans to custom REST APIs and Webhooks? โ
Yes. In addition to Tally and SAP, the gateway supports generic HTTPS Webhooks, Zoho Inventory OAuth 2.0 dispatch, and MQTT brokers with configurable JSON payloads.
Application & SDK Preview

Tested Hardware Devices
Paid Customization & Free Help
We offer free community help on GitHub issues and discussions. If you need bespoke features, customized mobile apps, or dedicated on-site deployment, contact us for paid enterprise integration services.