You are currently viewing the Homey Apps SDK v2 documentation. New apps should use Homey Apps SDK v3 ››

Homey.BleDescriptor

const { BleDescriptor } = require('homey');

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

(async) readValue() → {Buffer}

Read the value for this descriptor

Returns:
Type:
Buffer

(async) writeValue(data) → {Buffer}

Write a value to this descriptor

Parameters:
Name Type Description
data Buffer

The data that should be written

Returns:
Type:
Buffer