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

Homey.ManagerBLE

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

Table of Contents

Methods

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

Discovers BLE peripherals for a certain time

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:
Array.<BleAdvertisement>

(async) find(peripheralUuid, timeoutopt) → {BleAdvertisement}

Finds a Ble peripheral with a given peripheralUuid

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:
BleAdvertisement