Device Configuration
The device.json5 configuration file contains device identification and descriptive properties to uniquely identify a device.
The device.json5 contains properties for:
- The device unique ID
- A product token indicating which product on which the device is based
- When the device was made
- Identifying description and model strings
- Whether the device is a test device
You can also add any other properties to the device.json5 that may provide useful device context.
Example
js
{
id: "731KPY4BA6",
product: "01GHTB33NJZXYZ1XA80GY5SZSN",
name: "Acme Router",
created: "2022-12-14T03:20:39.347Z",
description: "Acme Router for Home Office",
model: "Office-Hub",
test: false,
ports: 16,
memory: "256MB"
}created
| Name | created |
|---|---|
| Description | An ISO date for when the device was manufactured. |
| Synopsis | created: 'ISO Date'. |
Example
js
created: '2022-12-14T03:20:39.347Z'description
| Name | description |
|---|---|
| Description | A short description of your product. |
| Synopsis | description: 'Short sentence' |
| Notes | This should be a one sentence description of your product. |
Example
js
description: 'Acme Router for Home Office'id
| Name | id |
|---|---|
| Description | The unique device ID. |
| Synopsis | id: "Unique device ID" |
| Notes | The id property defines a unique per-device ID. This must be a globally unique ID. This should have a minimum of 80-bits of entropy. |
Example
js
id: '731KPY4BA6'model
| Name | model |
|---|---|
| Description | A product model string. |
| Synopsis | model: 'Short model string' |
| Notes | This should be a short identifier that describes your device model type. |
Example
js
model: 'Office-Hub-32'name
| Name | name |
|---|---|
| Description | The name of your product. |
| Synopsis | name: 'Few words' |
| Notes | This should be the short, public name of your product. |
Example
js
name: 'Acme Rocket'product
| Name | product |
|---|---|
| Description | A product identifier token that identifies the product on which the device is based. |
| Synopsis | product: 'product-id' |
| Notes | The product token identifies the type of product. |
Example
js
product: '01GHTB33NJZXYZ1XA80GY5SZSN'test
| Name | test |
|---|---|
| Description | Determine if the device is a test device |
| Synopsis | `test: true |
| Notes | This defaults to false. |
Example
js
test: true