Python Swithbot Meter API
Comprehensible SwitchBot Meter API. Read your SwitchBot Meter status in real time via BLE.
Installation
This library is available on Pypi, you can install it directly with pip
pip install switchbotmeter
This library acts as a BLE client, so you need a BLE-capable device (a bluetooth dongle or integrated)
Usage
This library exports a DeviceScanner object that will dected any SwitchBot Meter devices nearby. Note that you need to have permissions to access your bluetooth device, the scope of wich will not be covered by this readme :
from switchbotmeter import DevScanner
for current_devices in DevScanner():
for device in current_devices:
print(device)
print(f'{device.mac} -> {device.temp}')
<T temp: 19.8 humidity: 73> (c6:97:89:d6:c8:09)
c6:97:89:d6:c8:09 -> 19.8
...
<T temp: 20.4 humidity: 71> (c6:97:89:d6:c8:09)
c6:97:89:d6:c8:09 -> 20.4
If your device is shown but not returned by DevScanner, it wasn’t identified as a SwitchBot meter. In this case, pass the MAC address to DevScanner, e.g.:
DevScanner(macs=['c6:97:89:d6:c8:09'])
Metadata
Release files for switchbotmeter 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| switchbotmeter-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for switchbotmeter-1.1.0-py3-none-any.whl |
Release files / switchbotmeter-1.1.0-py3-none-any.whl
| Download URL | switchbotmeter-1.1.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36028c34b305ee8d88e5e226b0c01346613152f7cda20a37b32dca93f42b3242
|
|
BLAKE2b-256 checksum How to use checksums |
bc480d3e9695bdf8d2d85fb3861e48f9c3f25117111ec599df0dbc0e8db2b09b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for switchbotmeter 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.