Skip to main content

Creating Standalone Device

ENAPTER3_API_TOKEN="<your API token>" \
enapter3 device create standalone \
--device-name "My Standalone Device" \
--site-id <site_id>
On Gateway

Site id is not required if you create a Standalone Device on Gateway.

The result of creating a new Standalone Device will be a JSON object:

{
"device_id": "8d7de32e-d00c-4019-a215-db6e14b77375",
"slug": "my-standalone-device",
"config": {
"hardware_id": "SD595D4EF54C643B7988AADDBF12A2E30",
"channel_id": "s",
"mqtt_protocol": "MQTTS",
"mqtt_host": "mqtt.enapter.com",
"mqtt_port": 1883,
"mqtt_credentials": {
"private_key": "...",
"certificate": "...",
"ca_chain": "..."
}
}
}

This response is documented in the HTTP API reference.

To continue implement a device logic you need to save information from the response:

  • copy the device-id or slug value to any place to use later
  • copy config.mqtt_host, config.mqtt_port, config.hardware_id and config.channel_id values to any place to use later;
  • store config.mqtt_credentials.ca_chain into server-ca.crt file (note that you need to replace \n with actual new lines);
  • store config.mqtt_credentials.certificate into client.crt file (note that you need to replace \n with actual new lines);
  • store config.mqtt_credentials.private_key into client.key file (note that you need to replace \n with actual new lines).

All Rights Reserved © 2025 Enapter AG.