Skip to main content

AsyncIO-compatible SwitchBot Meter library

Project description

./docs/switchbot.png

Python Swithbot Meter API

Comprehensible [SwitchBot Meter](https://www.switch-bot.com/products/switchbot-meter) API. Read your SwitchBot Meter status in real time via BLE.

pypi release downloads python_versions pypi_versions coverage actions

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.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

switchbotmeter-1.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file switchbotmeter-1.0.0.tar.gz.

File metadata

  • Download URL: switchbotmeter-1.0.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.9.12-arch1-1

File hashes

Hashes for switchbotmeter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f3252031cc6ecfae6e7e69c61eaf355cdce2d204b464597feeafb11b4fcbaf51
MD5 40c8c43bd383550226c41d657af14966
BLAKE2b-256 f9f6d68c51a9653d6e4fbe328c1e895c43423cd46de799dc270343244fb44b29

See more details on using hashes here.

File details

Details for the file switchbotmeter-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: switchbotmeter-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.9.12-arch1-1

File hashes

Hashes for switchbotmeter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd4117c68a5550c21da4c402c7440e7483b8b1e7544c8ab258d44e881a4ac501
MD5 a2d77c2ea4ad82ab5cf38ff7dd1682b3
BLAKE2b-256 63c7ef8f8fc5d90489fd65f96f01c7455c19ff19c59302d4ead6a1add53d89ee

See more details on using hashes here.

Supported by

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