Skip to main content

Sensirion-SmartGadget

Python library for reading temperature, humidity, and battery level from a SHT31 Smart Gadget Development Kit by Sensirion.

Supported features

  • Direct reading of SHT31 sensor values and device battery level.

  • Subscription to notifications on value changes.

  • Output of manufacturer, model name, and firmware version.

Currently not supported

  • Downloading data from the integrated data logger.

  • Setup of data logger interval.

Installation

pip install sensirion-smartgadget

Usage

from sensirionbt import SmartGadget

sensor = SmartGadget('CA:FE:12:34:56:78')
print(sensor.get_values(init_static=True))
# 'init_static' is optional; it fetches following values immediately.
print("Manufacturer:", sensor.manufacturer)
print("Model:", sensor.model)
print("Firmware:", sensor.firmware_version)

Notes

  • The device only allows one connection at a time. If the connection keeps failing, make sure you have disconnected other services, e.g. the smartphone app.

  • On a connection failure, transmission will be re-attempted, depending on the ‘retries’ argument or property. The default is to retry twice.

  • The first connection and value readings take a few seconds. The reason for this is that characteristics are discovered by UUID, then handles are cached and reused for subsequent calls.

Release files for python-smartgadget 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-smartgadget 0.1.3
File Size Uploaded
python-smartgadget-0.1.3.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-smartgadget 0.1.3
File Interpreter ABI Platform
python_smartgadget-0.1.3-py3.7.egg Legacy Egg format - - Details

Total release size: 13.9 kB

Release files / python-smartgadget-0.1.3.tar.gz

Download URL python-smartgadget-0.1.3.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a854ff83cd28db3e2c9fc083594de319e119aa10dfc5bb47a53d9e244c80ba50
BLAKE2b-256 checksum
How to use checksums
2cb4e405f457ea5d0b91e461ce4e08eb3198d7d258b9cd047027bd3615b56a0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / python_smartgadget-0.1.3-py3.7.egg

Download URL python_smartgadget-0.1.3-py3.7.egg
Size 9.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
5986be73019afc409b45dea83a77287df6c50c32b2b4b68fc535724f7e07a957
BLAKE2b-256 checksum
How to use checksums
a4b1295a46abdd36d4818e35c2885a5302f63502fce600361cbceaf252bed084
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page