smartgadget.smart_gadget module¶
- class smartgadget.smart_gadget.SmartGadget(device, interface=None)[source]¶
Bases:
Peripheral
Base class for a Smart Gadget.
- Parameters
- APPEARANCE_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- BATTERY_LEVEL_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- DEVICE_NAME_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- FIRMWARE_REVISION_STRING_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- HARDWARE_REVISION_STRING_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- MANUFACTURER_NAME_STRING_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- MODEL_NUMBER_STRING_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- SERIAL_NUMBER_STRING_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- SOFTWARE_REVISION_STRING_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- SYSTEM_ID_CHARACTERISTIC_UUID = <bluepy.btle.UUID object>¶
- battery() int [source]¶
Returns the temperature [degree C].
Attention
The subclass must override this method.
- dewpoint(temperature=None, humidity=None) float [source]¶
Returns the dew point for the specified MAC address.
- Parameters
- Returns
float
– The dew point [degree C].
- humidity() float [source]¶
Returns the temperature [degree C].
Attention
The subclass must override this method.
- info() dict [source]¶
Returns the temperature [degree C].
Attention
The subclass must override this method.
- rssi() Optional[int] [source]¶
Returns the Received Signal Strength Indication (RSSI) for the last received broadcast from the device.
This is an integer value measured in dB, where 0 dB is the maximum (theoretical) signal strength, and more negative numbers indicate a weaker signal.
- Returns
int
orNone
– The RSSI value if theSmartGadget
was initialized with a ScanEntry object. Otherwise returnsNone
.
- temperature() float [source]¶
Returns the temperature [degree C].
Attention
The subclass must override this method.