A Device instance resource represents a single device entity.
Resource Attributes
Attribute | Description |
---|---|
id | A 23 to 26 characters long string that uniquely identifies this device. |
accountId | The unique id of the account that created this device. |
name | Account wide unique, URL friendly name of the device. |
friendlyName | Human friendly name of the device. |
profileId | Id of the device profile that this device is generated from. |
apps | Id list of the apps that this device plugged into. Can be empty. |
description | Optional. Device description, maintenance notes, etc. |
tags | Optional. Device tags. |
status | Can be enabled , disabled and debug . All incoming and outgoing data are rejected for disabled devices. Disabled devices cannot connect to Connio via MQTT. Default value is enabled . |
period | Number of seconds that is the expected reporting period of the device. This attribute helps Connio to determine whether a device is active and communicating as expected. 0 can be set to disable this feature. Default is 0. See predefined device profiles tutorial for advanced usage of this attribute. |
customIds | Optional. Map of user defined identifiers. Supported custom id types are sn , mac , imei , and esn . |
timezone | Optional. The time zone of this device to be used when visualizing device data. |
annotateWithLoc | if true, each incoming data point is annotated with device location info. Default value is false. |
annotateWithMeta | if true, each incoming data point is annotated with device meta data such as device profile tags, device tags, device class, product name, custom ids etc. Default value is false. |
location | Optional. Location of the device. |
locked | if locked, entity cannot be modified, deleted. |
dateCreated | The date that this device was created, in ISO 8601 format. |
dateModified | The date that this device entity was modified in ISO 8601 format. |
Rule
Note that all custom ids are case sensitive. They must be account wide unique; otherwise device won't be located. Max length of a custom id value can be 64 ASCII character long.
Tip
debug
status is a feature designed to provide more visibility into device backend's behaviour. When indebug
mode, device backends log unexpected events such as data point rejections, out of bounds conditions, etc.As its name suggests it should not be used in production due to performance implications. When set, the following internal errors and events are written into the device log:
- Data rejections caused by property type and boundaries
- Invalid / malformed data feeds
- Every web hook calls done by alert notification mechanism
- Provisioning attempts
- Errors related to methods
Tip
When
annotateWithLoc
attribute is true, all data points written by the device is automatically enriched by the device location at the server. This feature eliminates the need to set location information in each data point sent over wire and helps users to better control the size of the payload.
{
"id": "_dev_867347085435988080",
"accountId": "_acc_865397927566828278",
"name": "factory3.floor4.forklift4",
"friendlyName": "Fork lift 001-0023904",
"profileId": "_dpf_865412173101628139",
"apps": ["_app_865398009039773695"],
"description": "Maintenance cycle: every 1,000 km",
"tags": [
"forklift",
"ford"
],
"status": "enabled",
"period": 60,
"customIds": {
"sn": "SN-001-0023904"
},
"timezone": "Vancouver UTC-08:00",
"annotateWithLoc": false,
"annotateWithMeta": false,
"location": {
"zone": "vancouver-facility",
"geo": {
"lat": 41.0296287,
"lon": 28.6232202,
"alt": 0
}
},
"locked": false,
"dateCreated": "2017-03-23T08:12:16.597Z",
"dateModified": "2016-03-23T08:12:16.597Z"
}