Terrabit Connect - Base
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.ro| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 466 |
| Technical Name |
deltatech_tc |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
Terrabit Connect - Base

Base module for Terrabit Connect — the lightweight native agent that runs on a workstation and bridges Odoo with local hardware and services it cannot reach directly from the cloud: the ANAF token (PKCS#11 / mTLS to SPV), fiscal printers (Datecs), label printers (Zebra ZPL) and declaration validation (DUKIntegrator).
This module is the generic foundation every Terrabit Connect feature builds on. It does not, by itself, talk to any device — it provides the connection layer and the job protocol.
What it gives you
- Station registry (deltatech.tc.station) — one record per workstation running Terrabit Connect, each with a unique API key, a last-seen timestamp and reported metadata (TC version, operating system, enabled features).
- Outbound job queue (deltatech.tc.job) — Odoo enqueues pending jobs; the station claims them, executes them locally, and reports back the result (done / error).
- REST endpoints authenticated with the X-Station-Key header: /tc/heartbeat, /tc/poll, /tc/result, /tc/config/<id>.
Cloud model — no inbound ports. The station always initiates the connection to Odoo; Odoo never connects back to the workstation. The same agent works with on-premise and cloud deployments without opening any port on the client side.
Extensible. Feature modules add their own job types (selection_add on job_type) and turn the station's result into business records by overriding the _process_result hook — keeping the registry, queue and transport in one place.
Table of contents
Configuration
Security groups
Assign users to the appropriate group under Settings → Users & Companies → Users (field Terrabit Connect):
| Group | Access |
|---|---|
| User | Can view stations and jobs (read-only) |
| Manager | Full access: create/edit stations, download config, regenerate keys, view job details |
The administrator (base.user_admin) is a Manager by default.
Only Managers can access the Settings → Terrabit Connect menus and download station.conf files (the endpoint /tc/config/<id> checks the Manager group).
Station registration
Each physical workstation that runs Terrabit Connect needs one station record in Odoo:
- Go to Settings → Terrabit Connect → Stations → New.
- Set Name (identifies the workstation in job logs and notifications).
- Set Company (defaults to the user's company; used for multi-company job routing).
- Save to generate the API Key automatically.
The API key is the credential the agent uses in the X-Station-Key HTTP header. It is displayed masked in the form and visible only to system administrators.
Station configuration file (station.conf)
After registering a station, click Download config on the station form. The downloaded file contains two environment variables consumed by Terrabit Connect:
| Variable | Description |
|---|---|
| TERRABIT_ODOO_BASE | Base URL of the Odoo instance (e.g. https://yourcompany.odoo.com) |
| TERRABIT_STATION_KEY | The station's API key — treat it as a secret |
Place station.conf on the workstation and restart Terrabit Connect. No other network configuration is required: the agent initiates all connections outbound to Odoo (no inbound port needs to be opened on the client side).
Tuning poll and heartbeat cadence
The following environment variables can be set on the workstation side to tune timing (Terrabit Connect reads them at startup):
| Variable | Default | Effect |
|---|---|---|
| TERRABIT_POLL_SEC | 30 | Seconds between /tc/poll calls |
| TERRABIT_HEARTBEAT_SEC | 300 | Seconds between automatic heartbeats |
The server applies a 60-second throttle on last_seen writes to reduce database load when many stations are polling frequently; online detection remains accurate within the throttle window.
Usage
Registering a station
Go to Settings → Terrabit Connect → Stations.
Click New and give the station a descriptive name (e.g. Accounting PC).
Select the company the station belongs to (multi-company installations).
Save. An API Key is generated automatically and is visible to administrators only (shown masked in the form).
Click Download config (download icon in the header) — Odoo serves a pre-filled station.conf file containing:
TERRABIT_ODOO_BASE=<your Odoo URL> TERRABIT_STATION_KEY=<the generated key>
Copy station.conf to the workstation running Terrabit Connect and (re)start the agent. It will authenticate with the X-Station-Key header on every call.
Verifying connectivity
Once Terrabit Connect is running with the downloaded config:
- Open the station form (Settings → Terrabit Connect → Stations, click the station).
- The Last seen field updates within the next poll cycle (≤ 30 s by default).
- Click Ping in the header to enqueue a round-trip test job. The job appears in the Jobs smart button and should reach state Done within seconds.
- Terrabit Connect managers also receive a browser notification when the agent sends a manual heartbeat.
Monitoring jobs
Navigate to Settings → Terrabit Connect → Jobs to see all jobs across all stations. You can filter by state (Pending, Done, Error) or group by station or job type.
The job list uses colour coding:
- Green row — Done
- Red row — Error (open the form to read the error detail)
- Muted row — Claimed (the station picked it up; result not yet reported)
Rotating the API key
If a station key is compromised:
- Open the station form.
- Click Regenerate key and confirm the prompt.
- Download the updated station.conf and deploy it to the workstation. Terrabit Connect will fail to authenticate until it is reconfigured with the new key.
Adding feature modules
This base module does not talk to any device by itself. Install the relevant Terrabit Connect feature module (e.g. ANAF messages, fiscal printer, Zebra labels, DUKIntegrator) to activate additional job types. They appear automatically in the Type column of the job list once the feature module is installed.
Bug Tracker
Bugs are tracked on Terrabit Issues. In case of trouble, please check there if your issue has already been reported.
Do not contact contributors directly about support or help with technical issues.
Credits
Authors
- Terrabit
- Dorin Hongu
Maintainers
Current maintainer:

This module is part of the dhongu/deltatech project on GitHub.
You are welcome to contribute.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 466 |
| Technical Name |
deltatech_tc |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module