ManagerBLE

You can access this manager through the Homey instance as this.homey.ble

Table of Contents

Methods

(async) discover(serviceFilteropt, timeoutopt) → {Promise.<Array.<BleAdvertisement>>}

Discovers BLE peripherals for a certain time

Requires the homey:wireless:ble permission. For more information about permissions read the Permissions tutorial.

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

List of required serviceUuids the peripheral should expose

timeout number <optional>
10000

Time in ms to search for Ble peripherals (max 30 seconds)

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

(async) find(peripheralUuid, timeoutopt) → {Promise.<BleAdvertisement>}

Finds a Ble peripheral with a given peripheralUuid

Requires the homey:wireless:ble permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Attributes Default Description
peripheralUuid string

The uuid of the peripheral to find

timeout number <optional>
10000

Time in ms to search for the Ble peripheral (max 30 seconds)

Returns:
Type:
Promise.<BleAdvertisement>