How devices get into a product
A device can add itself the first time it connects, or you can add it ahead of time.Add a device
- Web UI
- CLI
1
Open the dialog
Open Devices in the product and click Add device.
2
Describe the device
Enter the Identifier. This is what the device sends when it connects. Description and Tags are optional.
3
Choose how it connects
Under How it connects, choose one of:
- The product’s shared secret. Nothing more to set up. Shown when shared secrets are on for the instance and the product has an active secret.
- A shared secret of its own. NervesHub creates a key and secret and shows the secret once. Shown when shared secrets are on for the instance.
- Its certificate. Upload the certificate as a PEM or DER file. You can skip the upload when one of your registered CA certificates signed it.
4
Add it
Click Add device. If you chose a secret of its own, copy the Key and Secret before you close the dialog.
Add many devices from a Trust&Go manifest
nh device import creates a device, with its certificate, for every entry in a Microchip Trust&Go manifest. This is the only import format. It does not take CSV.
Set tags
Tags decide which deployment group a device matches. See Deployment groups.--tag sets the device’s whole tag list. The flags that set device fields on nh device create and nh device update need NervesHub 2.5.3 or later.
You cannot put a device in a deployment group directly from the CLI or API. NervesHub assigns a device to a group whose version and tag conditions it matches when the device connects. A tag you set on a connected device is compared the next time it connects. In the web UI you can place a device in a group yourself. See Put a device in a group by hand.
In the web UI, edit tags on the device’s Settings tab.
Manage credentials
Open the device’s Settings tab.Certificates
The Certificates card lists the certificates on file for the device, who signed each, and when it was last used. Click Upload certificate to add one as a PEM or DER file.nh device certificates generate creates a key and certificate on your machine. See Device certificates.
Shared secrets
The Shared secrets card is shown when shared secrets are on for the instance. Click Create secret to issue a key for this device. The secret is shown once.delete deactivates the key. See Shared secret.
Act on a device
console opens the device’s IEx console and needs remote_iex: true in the firmware. See Remote console. clear-penalty clears the device’s penalty box. See Rollout controls.
Show the log lines a device has sent, or follow new ones:

