A Python3 class to interrogate Xiaomi Mijia LYWSD* sensors.
Project description
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.
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
License
See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pylywsdxx-1.12.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d48c0dedb8ef30123bad4de35f9abb98e5714b2b1ffcad1f883e482fd65779a |
|
MD5 | 2da79f734241ac8c4256b5ca97afe2e7 |
|
BLAKE2b-256 | 00977f86970c2df0b13e565a46ad4efc778aa3a027c4630e423b8afc2116fe32 |