This is a library that allows communication with Midea dehumidifier appliances via the local area network.
midea-beautiful-dehumidifier
This library allows discovering Midea dehumidifiers on local network, getting their state and controlling then. The name comes from Chinese name for Midea (美的) which translates to beautiful in English.
This libary inspired from the repository at mac-zhou/midea-msmart which provides similar functionality for air conditioners.
Thanks for yitsushi's project, NeoAcheron's project, andersonshatch's project, barban's project
Supported appliances
The library works only Midea dehumidifiers supporting V3 protocol. Both appliances with and without ion function are supported.
Some tested examples of supported dehumidifiers:
- Comfee MDDF-20DEN7-WF
- Inventor Eva Ion Pro Wi-Fi 20L
It may work with Comfee, Inventor, Pro Breeze WiFi, as well as other Midea WiFi dehumidifiers.
Dehumidifier data
The following dehumidifier data is accessible via library:
- on/off switch (boolean, can be set)
- current humidity (read-only)
- target humidity (can be set)
- active mode (can be set)
- fan speed (can be set)
- ion switch status (boolean, can be set)
- tank is full (boolean, read-only)
- appliance name (read-only). This one is set through Midea application.
- appliance serial number (read-only)
- appliance IPv4 address (read-only)
- token and key for local network access (read-only)
Discovery
Library can discover appliances on local network. This is done by broadcasting UDP packets on all local networks interfaces to ports 6445. Appliances will respond to this broadcast with description information. Following discovery communication usually goes over port 6444. It also retrieves known appliances from Midea cloud account and then matches this information with information retrieved via local network. Local network communication is encrypted using Midea protocol.
Usage
Discover dehumidifier appliances on the local network:
pip install midea-beautiful-dehumidifier
python -m midea_beautiful_dehumidifier.cli discover --account ACCOUNT_EMAIL --password PASSWORD
# Show tokens used to connect to appliances via local network
python -m midea_beautiful_dehumidifier.cli discover --account ACCOUNT_EMAIL --password PASSWORD --credentials
Get status of an appliance:
pip install midea-beautiful-dehumidifier
python -m midea_beautiful_dehumidifier.cli status --ip APPLIANCE_IP_ADDRESS --token TOKEN --key KEY
TOKEN
and KEY
can be retrieved using discover
command.
Set appliance attribute (target humidity, mode, ion switch, fan speed):
pip install midea-beautiful-dehumidifier
python -m midea_beautiful_dehumidifier.cli set --ip APPLIANCE_IP_ADDRESS --token TOKEN --key KEY --mode MODE