Events¶
foundDevice¶
The event gets called when a new device is found. Possible for the same device to call this event multiple times.
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "foundDevice"
event.response¶
Table. Table specifying parameters of the found peripheral. The table values are name
and address
. The address
value must be used to connect to the peripheral.
scanEnd¶
Called when the plugin stops scanning for peripherals (Android only)
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "scanEnd"
obtainPeripheralData¶
Gets called every time new data is obtained from the peripheral.
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "obtainPeripheralData"
event.response¶
Table. Table specifying parameters of the found peripheral. The table values are name
, address
, and temperature
. Temperature is specified in degrees Celsius.
lowBattery¶
The event gets called when the battery of the connected device is low.
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "lowBattery"
event.response¶
Boolean. true
means battery is low.
noTemperature¶
The event gets called when there is no temperature from the connected device.
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "noTemperature"
temperatureIsBalance¶
The event gets called when temperature is not changing.
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "temperatureIsBalance"
temperatureIsAbnormal¶
The event gets called when temperature is abnormal.
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "temperatureIsAbnormal"
noSignal¶
The event gets called when there is no signal from the connected peripheral.
Properties¶
event.name¶
String. "bonbonbearThermometerEvent"
event.type¶
String. "noSignal"