BleDescriptor

This class is a representation of a BLE Advertisement for a BlePeripheral in Homey. This class must not be initiated by the developer, but retrieved by calling BleCharacteristic#discoverDescriptors.

Properties

id

id: string

Id of the characteristic assigned by Homey

Type

  • string

name

name: string

The name of the descriptor

Type

  • string

type

type: string

The type of the descriptor

Type

  • string

uuid

uuid: string

Uuid of the characteristic

Type

  • string

value

value: Buffer|null

The value of the descriptor. Note this is set to the last result of $BleDescriptor#read and is initially null

Type

  • Buffer | null

Methods

readValue

(async) readValue(): Promise.<Buffer>

Read the value for this descriptor

Returns

Promise.<Buffer>

writeValue

(async) writeValue(data): Promise.<Buffer>

Write a value to this descriptor

Parameters

Name Type Description
data
Buffer

The data that should be written

Returns

Promise.<Buffer>