BleCharacteristic

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 BleService#discoverCharacteristics or BleService#getCharacteristic.

Table of Contents

Methods

(async) discoverDescriptors(descriptorsFilteropt) → {Promise.<Array.<BleDescriptor>>}

Discovers descriptors for this characteristic

Parameters:
Name Type Attributes Description
descriptorsFilter Array.<string> <optional>

list of descriptorUuids to search for

Returns:
Type:
Promise.<Array.<BleDescriptor>>

(async) read() → {Promise.<Buffer>}

Read the value for this characteristic

Returns:
Type:
Promise.<Buffer>

(async) write(data) → {Promise.<Buffer>}

Write a value to this characteristic

Parameters:
Name Type Description
data Buffer

The data that should be written

Returns:
Type:
Promise.<Buffer>