Library for connecting to xiaomi cloud.
Report Bug
·
Request Feature
Simple implementation for logging in to your Xiaomi cloud account and fetch device information.
How to get and use micloud.
To download micloud, either fork this github repo or use Pypi via pip.
$ pip install micloud
You can use micloud in your project or directly from the terminal.
Usage: micloud [OPTIONS]
Options:
-u, --username TEXT Your Xiaomi username.
-c, --country TEXT Language code of the server to query. Default: "de"
--pretty Pretty print json output.
--help Show this message and exit.
As of right now there's not much you can do. You can login and get device info from Xiaomi cloud:
from micloud import MiCloud
mc = MiCloud("USERNAME", "PASSWORD")
mc.login()
token = mc.get_token() # to get your cloud service token.
device_list = mc.get_devices() # get list of devices
To query a different server, use the country argument:
device_list = mc.get_devices(country="cn")
And to save the device list as json:
mc.get_devices(country="cn", save=True, file="devices.json")
Distributed under the MIT License. See LICENSE
for more information.
Sammy Svensson - @S_Svensson - sammy@ssvensson.se
Project Link: https://github.com/squachen/micloud