Constructor
new Homey.BleCharacteristic()
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 characteristic |
service |
BleService
|
The service object that is the owner of this characteristic |
name |
string
|
The name of the characteristic |
type |
string
|
The type of the characteristic |
properties |
Array.<string>
|
The properties of the characteristic |
value |
Buffer
|
The value of the characteristic. Note this is set to the last result of $BleCharacteristic#read and is initially null |
Methods
(async) discoverDescriptors(descriptorsFilteropt) → {Array.<BleDescriptor>}
Discovers descriptors for this characteristic
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
descriptorsFilter |
Array.<string>
|
<optional> |
list of descriptorUuids to search for |
Returns:
- Type:
-
Array.<BleDescriptor>
(async) read() → {Buffer}
Read the value for this characteristic
Returns:
- Type:
-
Buffer
(async) write(data) → {Buffer}
Write a value to this characteristic
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer
|
The data that should be written |
Returns:
- Type:
-
Buffer