Xiaomi Humidifier support

Everything is OK.
It works well.

@af950833 Do you own a rooted android device and are you familiar with the android debug bridge (adb)? If yes, I would like to request some plugin files (apks) of your xiaomi mihome app. :slight_smile:

Just a side note, a backup can be extracted also without rooting the device, usually at least :slight_smile:

Sorry.
I don’t have a rooted device.
Because my phone is connected to company, I can’t root it.
If you want a just apk files to install, I can extract it without rooting.

I found a old old old Samsung Galaxy S3 :slight_smile:
I installed Mi Home and rooted the phone.
Android OS version is 4.3 now.
Please let me know what you want~

Please install the mihome app and login into your account. With each registered device (f.e. the air humidifier) the app does install a plugin (apk) I’m interested in. The APKs of the plugins are located here normally:

/data/data/com.xiaomi.smarthome/files/plugin/install/mpk

Could you provide a complete copy of the folder?

adb root
adb connect 192.168.132.24
adb pull /data/data/com.xiaomi.smarthome/files/plugin/install/mpk
zip -r plugins.zip mpk

This is the content in my case:

hammerhead:/data # find ./data/com.xiaomi.smarthome/files/plugin/install/mpk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.xiaomi.catalog
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.xiaomi.catalog/7
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.xiaomi.catalog/7/7.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.mijiashop.main
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.mijiashop.main/19
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.mijiashop.main/19/19.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.xiaomi.pinwei
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.xiaomi.pinwei/2
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/com.xiaomi.pinwei/2/2.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/108
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/108/10707.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/108/10585.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/229
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/229/7956.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/229/10301.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/107
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/107/8653.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/473
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/473/7490.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/503
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/503/10146.apk
/data/data/com.xiaomi.smarthome/files/plugin/install/mpk/503/10536.apk

I sent a message to you.
You can download my mpk.zip from my dropbox.

Thanks a lot! I just downloaded the archive and decompiled the air humidifier plugin. A few new findings:

  • The MiHome app uses the same properties like us: “humidity”, “temp_dec”, “power”, “mode”, “led_b”, “buzzer”, “child_lock”, “limit_hum”, “trans_level”
  • There is an additional mode called “strong” may be.
  • The temperature range is limited to -40 - +125°C (and round up)
  • There is second version (for canada?) called zhimi.humidifier.ca1
    • Requested properties: “humidity”, “temp_dec”, “power”, “mode”, “buzzer”, “led_b”, “child_lock”, “depth”, “speed”, “limit_hum”, “dry”
    • Modes: auto, high, medium, silent
    • Additional properties: hw_version, use_time, button_pressed
    • Setter: set_buzzer, set_child_lock, set_dry(on/off), set_led_b, set_limit_hum, set_mode, set_power
# The strong mode seems to be support of a new firmware only
isStrongMode() {
  if(fw_version == 25 && trans_level == 90) {
    return true;
  } else if(fw_version > 25) {
    return (operation_mode == "strong")
  }
  return false;
}

@af950833 Could you test the strong mode?

# should return "ok"
mirobo --ip 192.168.0.25 --token 689c4056fe28ebb3a2e8c2fe350e51ba raw_command set_mode '["strong"]'
# should return "strong"
mirobo --ip 192.168.0.25 --token 689c4056fe28ebb3a2e8c2fe350e51ba raw_command get_prop '["mode"]'

You’re welcome :slight_smile:

It looks that the strong mode does not support my humidifier.
The firmware version is newest now(1.2.9_5033) and Mi Home is 5.1.1

(homeassistant) homeassistant@Tommy:/home/pi $ # should return “ok”
(homeassistant) homeassistant@Tommy:/home/pi $ mirobo --ip 192.168.0.25 --token 689c4056fe28ebb3a2e8c2fe350e51ba raw_command set_mode ‘[“strong”]’
Sending cmd set_mode with params [‘strong’]
{‘error’: {‘code’: -5001, ‘message’: ‘invaild_arg’}, ‘id’: 1}
(homeassistant) homeassistant@Tommy:/home/pi $ # should return “strong”
(homeassistant) homeassistant@Tommy:/home/pi $ mirobo --ip 192.168.0.25 --token 689c4056fe28ebb3a2e8c2fe350e51ba raw_command get_prop ‘[“mode”]’
Sending cmd get_prop with params [‘mode’]
[‘silent’]
(homeassistant) homeassistant@Tommy:/home/pi $

@af950833 Could you try to request some additional attributes and provide the output? Thanks in advance!

mirobo --ip 192.168.0.25 --token 689c4056fe28ebb3a2e8c2fe350e51ba raw_command get_prop '["speed", "depth", "dry", "use_time", "hw_version", "button_pressed", "dept"]'

Hi syssi,

The below is the result.

(homeassistant) homeassistant@Tommy:/home/pi $ mirobo --ip 192.168.0.25 --token 689c4056fe28ebb3a2e8c2fe350e51ba raw_command get_prop ‘[“speed”, “depth”, “dry”, “use_time”, “hw_version”, “button_pressed”, “dept”]’
Sending cmd get_prop with params [‘speed’, ‘depth’, ‘dry’, ‘use_time’, ‘hw_version’, ‘button_pressed’, ‘dept’]
[None, None, None, 941100, 0, ‘led’, None]
(homeassistant) homeassistant@Tommy:/home/pi $

1 Like

@syssi or anyone else… I am having an issue with a Smartmi Pure Humidifier where the metal connections are no longer recognizing the bottom tub and sensors. The top which has the power wire connected turns on and the fan runs but all the water indicator lights are showing full even though the tub has little or no water. I have tried various levels of water, no change. Also if you pull the top off of the tub and the metal connections separate, the top is supposed to turn off. It does not turn off. It stays on. So it seems the top thinks it is connected to the tub with a full tub of water no matter what. Everything else works such as controlling through the app and HA. But it is just the sensors and the metal connections. I have tried removing the device from the app, resetting the power. I do not know of a factory reset or way to reset the connections.

Would really love to salvage this thing as it is only a month old and I have opened a ticket with Gear Best. When it worked, it worked great.

Thanks!

Why do you assume the device is supposed to turn off if you remove the top? Could you provide a photo of the sensor?

Try to identify the type of the sensor. I can imagine an analog sensor. Two wires next to each other attached to the water container. A analog-digital converter measures the resistance in between. If the resistance is high the water tub is empty. If the resistance is low because of the contact to the water the tub is “full”. In this case I assume the contacts/wires are short closed may be somewhere at the top because you can detach the water tub and the device still indicates a full tub.

Anyone using new Evaporative Humidifier?

I just bought one and was wondering if this will be supported by home assistant.

I’m also wondering if this will be supported.

Guys,

how to connect Xiaomi Smartmi Pure Humidifier 2 to Home Assistant?

Standard component Xiaomi Air Purifier in Home Assistant with this humidifier does not work, I tried both available models in the component, but in no way:

  - platform: xiaomi_miio
    ...
    model: zhimi.humidifier.v1

and

  - platform: xiaomi_miio
    ...
    model: zhimi.humidifier.ca1

image

What’s the miio model name of the device?

Photo packaging will help answer your question?

image