pylywsdxx
This is a Python3 library to allow interrogation of Xiaomi Mijia LYWSD* sensors via Bluetooth Low Energy (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.
Development of this package is done in Python 3.12. The package is considered forwards compatible at least upto Python 3.12 and probably also beyond. Backwards compatibility is not guaranteed; if it works on Python 3.9 or before consider yourself lucky. Python versions that are end-of-life are not supported.
The package has been extensively tested on a Raspberry Pi 3 Model B+ (aarch64) with Debian GNU Linux 12 /w Python 3.11.*.
Installation
pip install pylywsdxx
Usage
import pylywsdxx as pyly
mac = "A4:C1:38:0D:EA:D0"
device2 = pyly.Lywsd02(mac)
data2 = device2.data
print(f"Temperature: {data2.temperature}˚C")
device3 = pyly.Lywsd03(mac)
data3 = device3.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 and with v1.* versions of itself.
Acknowledgements
Based on previous work stolen from Mikhail Baranov (h4) : lywsd02
and Duncan Barclay (uduncanu) : lywsd03mmc
Disclaimer & License
As of September 2024 pylywsdxx is distributed under AGPL-3.0-or-later.
Metadata
Release files for pylywsdxx 2.8.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylywsdxx-2.8.3.tar.gz | 24.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylywsdxx-2.8.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.2 kB
Release files / pylywsdxx-2.8.3.tar.gz
| Download URL | pylywsdxx-2.8.3.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ea0ec4677273f16c937c1a257430780debf7bde7ce8a047d8d6f5ec20e3bf55
|
|
BLAKE2b-256 checksum How to use checksums |
d5ca1e50ec67a7cddb6a50d3343340ac0146db52a9574b9789a48e51bd5233e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|
Release files / pylywsdxx-2.8.3-py3-none-any.whl
| Download URL | pylywsdxx-2.8.3-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
341313ba07e7a14593bb885573debb3666be6d73f2f4877668e1d11c2ef9b6c2
|
|
BLAKE2b-256 checksum How to use checksums |
b4a636782e0747b12c55142057d3f20626cd19d2f65cab127740f8e20c9e6935
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|