Skip to main content

A Python3 class to interrogate Xiaomi Mijia LYWSD* sensors.

Project description

pylywsdxx

PyPI version Supported Python versions PyPI downloads Code style: Black

This is a Python3 library to allow interrogation of Xiaomi Mijia LYWSD* sensors via Bluetooth (BLE).

Note: This is an unofficial project, and is in no way supported or endorsed by Xiaomi.

Requirements

This module requires bluepy3 which should be installed automagically when using the installation instructions below.

Installation

pip install pylywsdxx

Usage

Please note that versions prior to 0.1.0 are early alpha and virtually guaranteed to be defective!

import pylywsdxx as pyly

mac = "A4:C1:38:0D:EA:D0"

client2 = pyly.Lywsd02client(mac)
data2 = client2.data
print(f"Temperature: {data2.temperature}°C")

client3 = pyly.Lywsd03client(mac)
data3 = client3.data
print(f"Temperature: {data3.temperature}°C")

Please note that this module has completely and intentionally broken backwards compatibility with previous and existing versions of lywsd02 and lywsd03mmc .

Acknowledgements

Based on previous work by Mikhail Baranov (h4) : lywsd02
and Duncan Barclay (uduncanu) : lywsd03mmc

License

See LICENSE.

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

pylywsdxx-0.2.2.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

pylywsdxx-0.2.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pylywsdxx-0.2.2.tar.gz.

File metadata

  • Download URL: pylywsdxx-0.2.2.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pylywsdxx-0.2.2.tar.gz
Algorithm Hash digest
SHA256 35bb7b547934f89115d9e8b89263f37c555d5a1b7de4537e2ea8e9958f6ca89e
MD5 aeaea374172fd463becd8f212355e37b
BLAKE2b-256 f834d56a7fa142825c3f1f51794ed70e9a1517b80893faac4999e77194c58f10

See more details on using hashes here.

File details

Details for the file pylywsdxx-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pylywsdxx-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pylywsdxx-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f1bdc3375926748e3b7119c60925ab57786bd71674e17cab7895971d858637cc
MD5 9f646aa1dea3acccf0acb89c45742521
BLAKE2b-256 e993443aa6e937f1eb9a469f470e004620ade130972b0137f1f6091b3c727068

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