SwitchBot Meter library
Project description
Python Swithbot Meter API
Comprehensible SwitchBot Meter. 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
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
switchbotmeter-1.0.1.tar.gz
(15.5 kB
view hashes)
Built Distribution
Close
Hashes for switchbotmeter-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d3032c38eac781014a9c17bd289e4e8b0c4df45cd25f5b4c94e25b4ef1c5fdd |
|
MD5 | c4b91ce0613b0839e4fd8854d6233cda |
|
BLAKE2b-256 | ca2339c3b352d85e6029cb0cae60fc2f4c48cd6b8170d5f01a403bd1c743d137 |