Registering a Device
Create a new device record with a unique identifier:Assigning Tags
Tags control which deployment groups a device falls into. A group lists one or more tags and a tag operator —Require all (the default) or Allow any — so assigning the right tags is how you route firmware updates to the correct subset of your fleet:
main and qa, replacing any previously assigned tags. A device can hold multiple tags simultaneously.
Common tagging strategies:
- By environment —
dev,staging,production - By cohort —
beta,canary,stable - By hardware revision —
hw-rev-a,hw-rev-b
Bulk Registration
For large manufacturing runs, use the CSV import feature in the NervesCloud UI:- Navigate to Products → my-product → Devices.
- Click Import Devices.
- Upload a CSV file with one device identifier per row (and optional tag columns).
nh CLI in a loop:
Device Certificates
For mTLS authentication, each device needs a certificate signed by a CA that you have registered with NervesHub. Thenh CLI manages the full certificate lifecycle.
List certificates for a device:
Device Actions
Trigger remote actions on a connected device directly from the CLI: Reboot the device:Ctrl+C twice to exit without affecting the running device.
A device that repeatedly fails to apply an update is placed in the penalty box and stops receiving update notifications until its timeout expires. You can clear it from the device page in the console, or with the API, once you have addressed the underlying problem.
Device Logs
Stream or review logs from a device:--follow flag tails the log stream in real time. Omit it to retrieve a snapshot of recent log lines. Logs are useful for diagnosing connection issues, firmware crashes, or unexpected reboots without requiring physical access to the device.
Device logs require the
logging extension to be enabled on the product, and the device’s client library must support it.
