Devices

A Device instance resource represents a single device entity.

Resource Attributes

AttributeDescription
idA 23 to 26 characters long string that uniquely identifies this device.
accountIdThe unique id of the account that created this device.
nameAccount wide unique, URL friendly name of the device.
friendlyNameHuman friendly name of the device.
profileIdId of the device profile that this device is generated from.
appsId list of the apps that this device plugged into. Can be empty.
descriptionOptional. Device description, maintenance notes, etc.
tagsOptional. Device tags.
statusCan 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.
periodNumber 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.
customIdsOptional. Map of user defined identifiers. Supported custom id types are sn, mac, imei, and esn.
timezoneOptional. The time zone of this device to be used when visualizing device data.
annotateWithLocif true, each incoming data point is annotated with device location info. Default value is false.
annotateWithMetaif 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.
locationOptional. Location of the device.
lockedif locked, entity cannot be modified, deleted.
dateCreatedThe date that this device was created, in ISO 8601 format.
dateModifiedThe 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 in debugmode, 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"
}