Skip to main content

Create Device

Now that the blueprint is complete, we can create the device programmatically using the Enapter CLI or HTTP API. This is useful for automating deployments or managing devices without a graphical interface.

For graphical approaches, see Level 1.

Prerequisites

Get Enapter API Token for both approaches.

0. Configure connection

Follow the guide to set enapter-cli connection up.

1. Get UCM Device ID

List all devices to find the UCM that will serve as a runtime:

$ enapter3 device list

Response:

{
"devices": [
{
"authorized_role": "INSTALLER",
"blueprint_id": "e44a7c47-b19c-5a21-83f4-9e2ec56ad54a",
"id": "e73b2e42-28fb-4ad3-8b4a-463dbd31ebe8",
"implemented_profiles": [],
"name": "UCM 98E7D5",
"site_id": "72a0ea68-9430-457a-a30a-946cacc74295",
"slug": "ucm-98e7d5",
"type": "HARDWARE_UCM",
"updated_at": "2026-02-05T14:45:40.698147Z"
},
{
"authorized_role": "INSTALLER",
"blueprint_id": "0731254e-bfaa-5f90-8223-a53125b005ec",
"id": "f646aecf-96b7-4c95-85e4-af6d0932579b",
"implemented_profiles": [],
"name": "Virtual UCM",
"site_id": "72a0ea68-9430-457a-a30a-946cacc74295",
"slug": "virtual-ucm",
"type": "VIRTUAL_UCM",
"updated_at": "2026-02-05T14:43:11.24156Z"
}
],
"total_count": 2
}

We need the id value of the UCM we want to use as a runtime, e.g. e73b2e42-28fb-4ad3-8b4a-463dbd31ebe8 for UCM 98E7D5.

2. Create Lua Device

$ enapter3 device create lua-device \
--blueprint-path="<path/to/blueprint/folder>" \
--runtime-id="e73b2e42-28fb-4ad3-8b4a-463dbd31ebe8" \
--device-name="H2 Sensor"

Response:

{
"device_id":"dfbf9503-ce26-476d-878a-01f9d46fed32",
"slug":"h2-sensor"
}

The CLI automatically packages and uploads the blueprint. The device is now created and running.

Next Steps

After creating the device, configure it using the Enapter CLI or HTTP API.

All Rights Reserved © 2026 Enapter AG.