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

To be determined.

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.0.10.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

pylywsdxx-0.0.10-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

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