Documentation

Mistake on this page? Email us

Device Device

Hierarchy

Index

Constructors

constructor

Properties

accountId

accountId: string

The owning Identity and Access Management (IAM) account ID The ID of the associated account.

example

00000000000000000000000000000000

alias

alias: string

The alias of the device

autoUpdate

autoUpdate: boolean

DEPRECATED: Mark this device for automatic firmware update.

bootstrapCertificateExpiration

bootstrapCertificateExpiration: Date

Expiration date of the certificate used to connect to bootstrap server

bootstrapExpirationDate

bootstrapExpirationDate: Date

The expiration date of the certificate used to connect to bootstrap server.

bootstrappedTimestamp

bootstrappedTimestamp: Date

The date and time the device was bootstrapped The timestamp of the device's most recent bootstrap process.

example

2017-05-22T12:37:55.576563Z

caId

caId: string

The certificate issuer's ID.

example

00000000000000000000000000000000

certificateFingerprint

certificateFingerprint: string

This is not part of the certificate but rather the SH-256 hash of the certificate.

certificateIssuerId

certificateIssuerId: string

This is the value of the CN field (in the Subject) of the Issuer of the certificate.

claimedAt

claimedAt: Date

The claim date/time

connectorCertificateExpiration

connectorCertificateExpiration: Date

Expiration date of the certificate used to connect to connector server

connectorExpirationDate

connectorExpirationDate: Date

The expiration date of the certificate used to connect to LwM2M server.

createdAt

createdAt: Date

The timestamp of when the device was created The timestamp of when the device was created in the device directory.

example

2017-05-22T12:37:55.576563Z

customAttributes

customAttributes: object

Up to 5 custom JSON attributes Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.

example

[object Object]

Type declaration

  • [key: string]: string

deployedState

deployedState: DeviceDeployedState

DEPRECATED: The state of the device's deployment.

deployment

deployment: string

DEPRECATED: The last deployment used on the device.

description

description: string

The description of the device The description of the device.

example

Temperature measuring device

deviceClass

deviceClass: string

The device class An ID representing the model and hardware revision of the device.

deviceExecutionMode

deviceExecutionMode: number

The device execution mode The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device. Permitted values:

  • 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.
  • 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.
  • 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.

deviceKey

deviceKey: string

The fingerprint of the device certificate.

example

00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

deviceType

deviceType: string

The type of the device - e.g. if the device is a gateway.

endpointName

endpointName: string

The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.

example

00000000-0000-0000-0000-000000000000

endpointType

endpointType: string

The endpoint type of the device. For example, the device is a gateway.

enrolmentListTimestamp

enrolmentListTimestamp: Date

The claim date/time.

example

2017-05-22T12:37:55.576563Z

firmwareChecksum

firmwareChecksum: string

The SHA256 checksum of the current firmware image The SHA256 checksum of the current firmware image.

example

0000000000000000000000000000000000000000000000000000000000000000

groups

groups: Array<string>

groups

hostGateway

hostGateway: string

The device name of the host gateway, if appropriate. The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.

id

id: string

The ID of the device

issuerFingerprint

issuerFingerprint: string

SHA256 fingerprint of the certificate used to validate the signature of the device certificate.

example

C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322

lastOperatorSuspendedCategory

lastOperatorSuspendedCategory: string

The reference of the block category.

example

maintenance

lastOperatorSuspendedDescription

lastOperatorSuspendedDescription: string

The most recent description why the device was suspended or returned to service.

example

Suspended for maintenance.

lastOperatorSuspendedUpdatedAt

lastOperatorSuspendedUpdatedAt: Date

The timestamp of the most recent suspension activity.

example

2017-05-22T12:37:55.576563Z

lastSystemSuspendedCategory

lastSystemSuspendedCategory: string

The reference of the block category.

example

maintenance

lastSystemSuspendedDescription

lastSystemSuspendedDescription: string

The most recent description of why the device was blocked or unblocked by the system.

example

A certificate in the device's certificate chain was blacklisted by the system.

lastSystemSuspendedUpdatedAt

lastSystemSuspendedUpdatedAt: Date

The timestamp of the most recent system block activity.

example

2017-05-22T12:37:55.576563Z

lifecycleStatus

lifecycleStatus: DeviceLifecycleStatus

The lifecycle status of the device. Enabled: The device is allowed to connect to Pelion Device Management. Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.

example

enabled

manifest

manifest: string

DEPRECATED: The URL for the current device manifest.

manifestTimestamp

manifestTimestamp: Date

The date-time of the current manifest version The timestamp of the current manifest version.

example

2017-05-22T12:37:55.576563Z

mechanism

mechanism: DeviceMechanism

The ID of the channel used to communicate with the device NOT USED: The ID of the channel used to communicate with the device.

mechanismUrl

mechanismUrl: string

The address of the connector to use NOT USED: The address of the connector to use.

name

name: string

The name of the device The name given by the web application for the device. Device itself provides only the endpoint_name.

example

00000000-0000-0000-0000-000000000000

operatorSuspended

operatorSuspended: boolean

Device has been suspended by operator.

serialNumber

serialNumber: string

The serial number of the device The serial number of the device. The serial number is injected by the factory tool during manufacturing.

example

00000000-0000-0000-0000-000000000000

state

The current state of the device The current state of the device. Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management. Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds. Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management. Registered: The device has registered with Pelion Device Management. Device commands can be queued. The device sends events for subscribed resources. Deregistered: The device has requested deregistration, or its registration has expired.

systemSuspended

systemSuspended: boolean

Is the device suspended by the system?

updatedAt

updatedAt: Date

The date-time of when the device was updated The time this data object was updated.

example

2017-05-22T12:37:55.576563Z

vendorId

vendorId: string

The device vendor ID The device vendor ID.

example

00000000-0000-0000-0000-000000000000

Methods

delete

  • delete(): Promise<void>
  • Deletes a device

    Returns Promise<void>

    Promise containing any error

  • Deletes a device

    Parameters

    • callback: CallbackFn<void>

      A function that is passed any error

    Returns void

update

  • Update the device

    Returns Promise<Device>

    Promise of device

  • Update the device

    Parameters

    • callback: CallbackFn<Device>

      A function that is passed the arguments (error, device)

    Returns void