Provisioning Your First Device¶
This tutorial walks through the complete lifecycle of a new manufacturing device: from verifying it exists in the PMS, provisioning it, and finally claiming it into the Fleet Manager.
What you will do
- Confirm the device is not yet in the system
- Provision the device to a customer
- Verify the output configuration file
- Claim the device into the Fleet Manager
Prerequisites
tlm-cliinstalled and configured (see Getting Started)- A valid customer code on the instance (use
tlm-cli admin customers listto find one) - A device serial number to provision
Step 1 — Confirm the device does not exist yet¶
Before provisioning, check whether the serial number is already registered:
If the command reports "Device 'SN-001234' not found.", you are ready to provision. If the device detail is displayed instead, it already exists — skip to Step 3 below to retrieve its configuration file, or see Provision a Device for the unprovision workflow.
Step 2 — Preview and provision the device¶
Always run a --dry-run first to check inputs without making any changes:
You will see a table showing: Serial Number, Customer, resolved Tenant ID, planned Config Path, and whether the Device Exists. If everything looks correct, provision for real:
By default the agent configuration file is written to:
Use --output-dir to write it elsewhere:
Step 3 — Verify the configuration file¶
Inspect the generated file:
It contains the connection parameters the on-board device agent needs:
# Configuration file for SN-001234. Place into /opt/connhex/configs/
CONNHEX_AGENT_LICENSE_AGENT_HOST=https://registry.compiuta.com
CONNHEX_AGENT_INIT_HOST=https://apis.your-instance.example.com
CONNHEX_AGENT_INIT_ID=SN-001234
CONNHEX_AGENT_INIT_KEY=<init-key>
Copy this file to the device at /opt/connhex/configs/agent.env.
Step 4 — Verify the device in PMS¶
Confirm the device is now registered:
Press D to toggle the detail view and verify the Provisioned field shows ✓.
Step 5 — Claim the device into the Fleet Manager¶
Once provisioned, the device can be claimed into the Fleet Manager so it appears in the operational fleet:
Verify the claim succeeded:
What you have accomplished¶
- Provisioned a new device and assigned it to a customer tenant
- Written the agent configuration file ready for deployment
- Claimed the device into the Fleet Manager
Next steps¶
- Learn how to bulk-claim many devices at once: Work with Fleet Devices
- Understand what provisioning does internally: Provisioning Workflow
- Explore the full provisioning command options:
tlm-cli pms provisioning