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.
- Find the mac address of your sensor:
pi@raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
A4:34:F1:7F:CD:D8 SensorPush HT.w CDD8
- 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
>>>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb737834a1cab082f0163b132916859082ea6196a5e1e67f780f6b9d374fe5d9 |
|
MD5 | 5ec85d27500dfd5626b170911c945e73 |
|
BLAKE2b-256 | 9df4e6195c5d8a158a8f717591278a5a94b8315c1c6deca5a14ace0ec968827a |
File details
Details for the file sensorpush_bleak-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: sensorpush_bleak-1.0.7-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ffe512834900550ec889441f1119bfbcc07e131a688d80d46a59eb26e745d11 |
|
MD5 | 7882d60ecd03f8aafc67d6aac1d4740b |
|
BLAKE2b-256 | e5e689c4ba4d5487b870c28ea99c2e9c460554ccfa310d4dcd111809ef27e550 |