Midea-local python lib
Control your Midea M-Smart appliances via local area network.
This library is part of https://github.com/georgezhao2010/midea_ac_lan code. It was separated to segregate responsibilities.
⭐If this component is helpful for you, please star it, it encourages me a lot.
Getting started
Finding your device
from midealocal.discover import discover
# Without knowing the ip address
discover()
# If you know the ip address
discover(ip_address="203.0.113.11")
# The device type is in hexadecimal as in midealocal/devices/TYPE
type_code = hex(list(discover().values())[0]['type'])[2:]
Getting data from device
from midealocal.discover import discover
from midealocal.devices import device_selector
token = '...'
key = '...'
# Get the first device
d = list(discover().values())[0]
# Select the device
ac = device_selector(
name="AC",
device_id=d['device_id'],
device_type=d['type'],
ip_address=d['ip_address'],
port=d['port'],
token=token,
key=key,
protocol=d['protocol'],
model=d['model'],
subtype=0,
customize="",
)
# Connect and authenticate
ac.connect()
# Getting the attributes
print(ac.attributes)
# Setting the temperature
ac.set_target_temperature(23.0, None)
# Setting the swing
ac.set_swing(False, False)
Metadata
Release files for midea-local-ben 6.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| midea_local_ben-6.1.0.tar.gz | 94.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| midea_local_ben-6.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 245.6 kB
Release files / midea_local_ben-6.1.0.tar.gz
| Download URL | midea_local_ben-6.1.0.tar.gz |
|---|---|
| Size | 94.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5745697667225dc43caa2fb192baf2b15c4501f7b8a36961d18d9b6aa1d93a4
|
|
BLAKE2b-256 checksum How to use checksums |
2cf0afb0a6041e1f9e23f3ee8abed559f40559a82a738f8b1ffb090f8f8c9ab3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / midea_local_ben-6.1.0-py3-none-any.whl
| Download URL | midea_local_ben-6.1.0-py3-none-any.whl |
|---|---|
| Size | 151.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c70d068f2533871828702a537ee2f9e5424bb84e8f8e46bfb2a86df23739f6f6
|
|
BLAKE2b-256 checksum How to use checksums |
126fc8153d4792ca28e9564fdc21669a17e5e40a7cbcae3a2cab293aed6afc71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|