Skip to main content

License PyPI version Supported Python versions PyPI downloads Code style: black pre-commit.ci status

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)

Source distribution for pylywsdxx 2.8.3
File Size Uploaded
pylywsdxx-2.8.3.tar.gz 24.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylywsdxx 2.8.3
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

2.8.3 This release

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.2.2

2 release files

2.2.1

2 release files

1.12.1

2 release files

1.10.4

2 release files

1.10.2

2 release files

1.10.1

2 release files

1.8.1

2 release files

1.6.1

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.2.2

2 release files

1.2.1

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page