Skip to main content
Library to use the Xiaomi Mi Home zigbee hub (receive paquets, events for now).


Example of usage as a simple mqtt relay:

```python
import paho.mqtt.client as mqtt

MQTT_SERVER = "192.168.0.149"
MQTT_PORT = 1883

PATH_FMT = "xiaomi/{model}/{sid}/{prop}" # short_id or sid ?

def prepare_mqtt():
client = mqtt.Client()
client.connect(MQTT_SERVER, MQTT_PORT, 60)

return client

def push_data(client, model, sid, cmd, data):
for key, value in data.items():
path = PATH_FMT.format(model=model,
sid=sid,
cmd=cmd,
prop=key)
client.publish(path, payload=value, qos=0)

client = prepare_mqtt()
cb = lambda m, s, c, d: push_data(client, m, s, c, d)
connector = XiaomiConnector(data_callback=cb)

while True:
connector.check_incoming()
```

For more information on the protocol and devices, see my notes: https://notes.jmsinfor.com/blog/post/admin/Xiaomi-Hub


Metadata

Release files for mihome 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mihome 0.1
File Size Uploaded
mihome-0.1.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mihome 0.1
File Interpreter ABI Platform
mihome-0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 8.1 kB

Release files / mihome-0.1.tar.gz

Download URL mihome-0.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
50670265810ad01646accb14fd4112fdb608dcfdca788785118b8bdaea77c089
BLAKE2b-256 checksum
How to use checksums
edef9bf726d70d5f23556c44341df7f33984c8653a410faa82cebcc0e95abb54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mihome-0.1-py2.py3-none-any.whl

Download URL mihome-0.1-py2.py3-none-any.whl
Size 4.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d79f3766c198bcda625aff0e8af9028953c92b6afa65d1e1ced71cf9dfe6fba1
BLAKE2b-256 checksum
How to use checksums
2e00103ea6654526e2f62b9d9f07c4f83ee94dc333855a7c5fdf5ea554ef51fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

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