MirAIe-AC API for Python
Project description
MirAIe API for Python
Installation
pip install miraie-ac
Get started
import asyncio
from miraie_ac import MirAIeHub, MirAIeBroker
async def setup():
# Instantiate a MirAIeHub object
broker = MirAIeBroker()
# Instantiate a MirAIeHub object
hub = MirAIeHub()
# Intialize the hub (+91xxxxxxxxxx, password, broker)
await hub.init("<mobile>", "<password>", broker)
# Display list of available devices
print( hub.home.devices )
# Wait till connection has been established with the broker
async def waitForClient():
while not hasattr(broker, 'client') or getattr(broker, 'client') is None:
await asyncio.sleep(1)
await waitForClient()
# Now you can run any operation on the device(s)
hub.home.devices[0].turn_off()
asyncio.run(setup())
Logs can be enabled in Home Assistant as follows
logger:
...
logs:
...
custom_components.miraie: debug
...
Notes
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
miraie_ac-1.0.8.tar.gz
(8.4 kB
view details)
Built Distribution
miraie_ac-1.0.8-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file miraie_ac-1.0.8.tar.gz
.
File metadata
- Download URL: miraie_ac-1.0.8.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b90eab975f17c17ecd88f4878a990fdb87b517ad6b65d27ed6d01ca0b5bafdc8 |
|
MD5 | 9df81f53e518c6ebb301ae8804daa1af |
|
BLAKE2b-256 | 35bb1ab646cf629ee7e92564d276a18db0a749255b131616b0ff432c13c0bd75 |
File details
Details for the file miraie_ac-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: miraie_ac-1.0.8-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73e74a06c75ee30629b4f407063004462c42f42affb1dd924697ece3e2653dd |
|
MD5 | 2545cbaeb3a1e4a914b09e3c3ccb0527 |
|
BLAKE2b-256 | c3cb35f05eee82c749f2ffc292e89dda58ded02163920884ae026eed77875e73 |