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.

Table of Contents

Constructor

new Homey.BleDescriptor()

Properties:
Name Type Description
id string

Id of the characteristic assigned by Homey

uuid string

Uuid of the characteristic

peripheral BlePeripheral

The peripheral object that is the owner of this descriptor

service BleService

The service object that is the owner of this descriptor

characteristic BleCharacteristic

The characteristic object that is the owner of this descriptor

name string

The name of the descriptor

type string

The type of the descriptor

value Buffer

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

Methods

getInfoString(ic, callbackopt) → {Promise}

Get all available information of this descriptor as a printable string

Parameters:
Name Type Attributes Description
ic number

Indent count

callback function <optional>
Name Type Description
err Error

Will always be null

infoString string

the info string

Returns:
Type:
Promise

readValue(callbackopt) → {Promise}

Read the value for this descriptor

Parameters:
Name Type Attributes Description
callback function <optional>
Name Type Description
err Error
value Buffer
Returns:
Type:
Promise

writeValue(data, callbackopt) → {Promise}

Write a value to this descriptor

Parameters:
Name Type Attributes Description
data Buffer

The data that should be written

callback function <optional>
Name Type Description
err Error
value Buffer
Returns:
Type:
Promise