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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mihome-0.1.tar.gz | 3.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mihome-0.1-py2.py3-none-any.whl | Python 2, Python 3 | 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 |
Security for mihome 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.