Device
Functions
Methods
characteristic:addDescriptor (descriptor)
Adds a new descriptor to the characteristic. The descriptor must not have been added to another characteristic and there must not be another descriptor already added to the characteristic with same UUID.
Params
- descriptor
DescriptorThe descriptor to add to the characteristic.
Returns: bool If the descriptor was successfully added to the device.
characteristic:notifying (notify)
Changes a characteristics notifying state. If a characterisitc is notifying, then a notification will be produced every time its value changes.
Params
- notify
boolThe descriptor to add to the characteristic.
Returns: bool If the notifying state was successfully updated.
characteristic:setValue (value, type)
Sets the value of a characteristic. If notifying is enabled, then a notification will be produced.
Params
- value
bool|number|string|arraythe new value - type
DataTypethe type of the value
Returns: bool If the value was successfully updated.