Skip to main content

library to read from Sensorpush HW.t bluetooth sensor

Project description

pysensorpush-bleak

Python library which uses gatttool to read temperature data from a Sensorpush HT.w temperature sensor.

  1. Find the mac address of your sensor:
pi@raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
A4:34:F1:7F:CD:D8 SensorPush HT.w CDD8
  1. Example usage:
pi@raspberrypi:~/p/pysensorpush-bleak/src/pysensorpush-bleak $ python
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sensorpush as sp
>>> import asyncio
>>> from bleak import BleakClient
>>> async def main():
...     client = BleakClient("A4:34:F1:7F:CD:D8")
...     await client.connect()
...     temp_c = await sp.read_temperature(client)
...     print("temperature = {}".format(temp_c))
...     client.disconnect()
...
>>> asyncio.run(main())
temperature = 13.92
>>>

pysensorpush_pic

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sensorpush-bleak-1.0.7.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

sensorpush_bleak-1.0.7-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file sensorpush-bleak-1.0.7.tar.gz.

File metadata

  • Download URL: sensorpush-bleak-1.0.7.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for sensorpush-bleak-1.0.7.tar.gz
Algorithm Hash digest
SHA256 eb737834a1cab082f0163b132916859082ea6196a5e1e67f780f6b9d374fe5d9
MD5 5ec85d27500dfd5626b170911c945e73
BLAKE2b-256 9df4e6195c5d8a158a8f717591278a5a94b8315c1c6deca5a14ace0ec968827a

See more details on using hashes here.

File details

Details for the file sensorpush_bleak-1.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for sensorpush_bleak-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7ffe512834900550ec889441f1119bfbcc07e131a688d80d46a59eb26e745d11
MD5 7882d60ecd03f8aafc67d6aac1d4740b
BLAKE2b-256 e5e689c4ba4d5487b870c28ea99c2e9c460554ccfa310d4dcd111809ef27e550

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page