Skip to content

Device

Functions

Methods

device:addService (service)


Adds a new service to the device. The service must not have been added to another device and there must not be another service already added to the device with same UUID.

Params

  • service Service The service to add to the device.

Returns: bool If the service was successfully added to the device

device:powered (powered)


Powers the devices virtual controller on/off

Params

  • powered bool Device Power on/off.

Returns: bool Indicating the success of the operation

device:discoverable (discoverable)


Sets the discoverability of the device on/off

Params

  • discoverable bool Device Discoverable on/off.

Returns: bool Indicating the success of the operation