To make it easier to work with different devices this library normalizes different models into types. These device types have their own API to match what the actual device can actually do. In addition each device also has a set of capabilities, that are used to flag that a device can do something extra on top of its type API.
Id | Description | Devices |
---|---|---|
power-switch |
Generic switchable devices with one or more power channels. | Aqara Light Control |
power-strip |
Power strip with one or more power channels. | Mi Smart Power Strip |
power-plug |
Switchable power plug with one or more power channels | Mi Smart Socket Plug, Aqara Plug |
power-outlet |
Wall mounted outlet | None yet |
controller |
Devices that are primarily used to control something else. | Aqara Button, Aqara Cube, Aqara Light Switch |
gateway |
Mi Smart Home Gateway that pulls in sub devices of the Aqara type | Mi Smart Home Gateway 2, Mi Smart Home Gateway 3 |
air-purifier |
Air purifiers and air filtering devices. | Mi Air Purifier, Mi Air Purifier 2 and Mi Air Purifier Pro |
humidifier |
Humidifier | Mi Humidifier |
vacuum |
Robot vacuums. | Mi Robot Vacuum |
light |
For any type of lights | Mi Yeelights |
sensor |
For anything that primarily reads values | Aqara Temperature and Humidity Sensor |
Id | Description |
---|---|
power |
Device supports being switched on or off. |
power-channels |
Device has one or more channels that can be switched on or off. Used for type switch . |
power-load |
Device can report how much power is currently used |
power-usage |
Device can report how much power has been used |
sensor |
Device measures one or more values |
temperature |
Device measures the current temperature |
humidity |
Device measures the current relative humidity |
aqi |
Device measures current air quality |
illuminance |
Device measures illuminance in Lux |
The tables below indicates how well different devices are supported. The support column can be one of the following:
- ❓ Unknown - support for this device is unknown, you can help test it if you have access to it
- ❌ None - this device is not a miIO-device or has some quirk making it unusable
⚠️ Generic - this device is supported via the generic API but does not have a high-level API⚠️ Untested - this device has an implementation but needs testing with a real device- ✅ Basic - the basic functionality of the device is implemented, but more advanced features are missing
- ✅ Good - most of the functionality is available including some more advanced features such as settings
- ✅ Excellent - as close to complete support as possible
If your device:
- Is not in this list, it might still be a miIO-device and at least have generic support. See Missing devices for information about how to find out.
- Needs a manual token and the table says it should not, something has probably changed in the firmware, please open an issue so the table can be adjusted.
- Is marked as Untested you can help by testing the implementation is this library and opening an issue with information about the result.
Name | Type | Auto-token | Support | Note |
---|---|---|---|---|
Mi Air Purifier 1 | air-purifier |
Yes | ||
Mi Air Purifier 2 | air-purifier |
Yes | ✅ Good | |
Mi Air Purifier Pro | air-purifier |
Yes | ✅ Basic | Some of the new features and sensors are not supported. |
Mi Flora | - | - | ❌ None | Communicates using Bluetooth. |
Mi Lunar Smart Sleep Sensor | generic |
Yes | ||
Mi Robot Vacuum | vacuum |
No | ✅ Basic | DND, timers and mapping features are not supported. |
Mi Smart Socket Plug | switch |
Yes | ✅ Good | |
Mi Smart Socket Plug 2 | switch |
Yes | ✅ Good | |
Mi Smart Home Gateway 1 | - | Yes | API used to access sub devices not supported. | |
Mi Smart Home Gateway 2 | gateway |
Yes | ✅ Basic | Light, sound and music features not supported. |
Mi Smart Home Gateway 3 | gateway |
Yes | ✅ Basic | Light, sound and music features not supported. |
Mi Smart Home Cube | controller |
Yes | ✅ Excellent | Aqara device via Smart Home Gateway |
Mi Smart Home Light Switch | controller |
Yes | Aqara device via Smart Home Gateway. | |
Mi Smart Home Light Control | switch |
Yes | Aqara device via Smart Home Gateway. Controls power to one or two lights. | |
Mi Smart Home Temperature and Humidity Sensor | sensor |
Yes | Excellent | Aqara device via Smart Home Gateway. |
Mi Smart Home Wireless Switch | controller |
Yes | ✅ Excellent | Aqara device via Smart Home Gateway. |
Mi Smart Home Door / Window Sensor | magnet |
Yes | Aqara device via Smart Home Gateway. | |
Mi Smart Home Occupancy Sensor | motion |
Yes | Aqara device via Smart Home Gateway. | |
Mi Smart Home Aqara Plug | switch |
Yes | Aqara device via Smart Home Gateway. | |
Mi Smart Home Smoke Sensor | - | Yes | ❓ Unknown | Aqara device - unknown support |
Mi Smart Home Gas Sensor | - | Yes | ❓ Unknown | Aqara device - unknown support |
Mi Smart Home Outlet | - | Yes | ❓ Unknown | Aqara device - unknown support |
Mi Smart Power Strip 1 | switch |
Unknown | ✅ Basic | Setting power and mode is untested. |
Mi Smart Power Strip 2 | switch |
Unknown | ✅ Basic | Setting power and mode is untested. |
Mi Rice Cooker | - | Unknown | ❓ Unknown | |
Mi Humidifier | - | Unknown | ||
Mi Smart Fan | generic |
Unknown | ||
Mi Air Quality Monitor (PM2.5) | generic |
Unknown | ||
Yeelight Desk Lamp | light |
No | ✅ Basic | |
Yeelight Color Bulb | light |
No | Setting RGB needs testing. Hue and saturation not added. | |
Yeelight White Bulb | light |
No | ||
Yeelight LED Strip | light |
No | ||
Yeelight Ceiling Lamp | - | - | ❓ Unknown | |
Yeelight Bedside Lamp | - | - | ❓ Unknown | |
Mi Washing Machine | - | - | ❓ Unknown | |
Mi IR Remote | - | - | ❓ Unknown |
Note: This table does not include Aqara (Smart Home Gateway) devices as their model identifier is set based on the type of the device.
Id | Type | Capabilities | Auto-token | Support | Note |
---|---|---|---|---|---|
zhimi.airpurifier.m1 |
air-purifier |
power , sensor , temperature , humidity , aqi |
Yes | ✅ Good | |
zhimi.airpurifier.v1 |
air-purifier |
power , sensor , temperature , humidity , aqi |
Yes | ✅ Good | |
zhimi.airpurifier.v2 |
air-purifier |
power , sensor , temperature , humidity , aqi |
Yes | ✅ Good | |
zhimi.airpurifier.v3 |
air-purifier |
power , sensor , temperature , humidity , aqi |
Unknown | ||
zhimi.airpurifier.v4 |
- | Unknown | Testing needed to check compatibility with air-purifier type. |
||
zhimi.airpurifier.v5 |
- | Unknown | Testing needed to check compatibility with air-purifier type. |
||
zhimi.airpurifier.v6 |
air-purifier |
power , sensor , temperature , humidity , aqi |
Yes | ✅ Basic | |
zhimi.humidifier.v1 |
humdifier |
power , sensor , temperature , humidity |
Unknown | ||
chuangmi.plug.m1 |
power-plug |
power-channels |
Yes | ✅ Good | |
chuangmi.plug.v1 |
power-plug |
power-channels |
Yes | ✅ Good | |
chuangmi.plug.v2 |
power-plug |
power-channels |
Yes | ✅ Good | |
qmi.powerstrip.v1 |
power-strip |
power-channels |
Yes | ||
zimi.powerstrip.v2 |
power-strip |
power-channels |
Yes | ||
rockrobo.vaccum.v1 |
vacuum |
No | ✅ Basic | DND, timers and mapping features are not supported. | |
lumi.gateway.v1 |
generic |
Yes | API used to access sub devices not supported. | ||
lumi.gateway.v2 |
gateway |
Yes | ✅ Basic | ||
lumi.gateway.v3 |
gateway |
Yes | ✅ Basic | ||
yeelink.light.lamp1 |
light |
power , color:temperature |
No | ✅ Good | |
yeelink.light.mono1 |
light |
power , color:temperature |
No | ✅ Good | |
yeelink.light.color1 |
light |
power , color:temperature , color:full |
No | Setting colors has not been tested. |
The generic
type is used when a device is of an unknown model. All properties
and methods of generic devices are also available for specific devices types.
-
device.defineProperty(string)
, indicate that a property should be fetched from the device -
device.defineProperty(string, function)
, indicate that a property should be fetched from the device and mapped with the given function. -
device.setProperty(string, mixed)
, set the value of a property -
device.getProperties(Array[string]): Object
, get the given properties if they are monitored -
device.monitor()
, monitor the device for changes in defined properties -
device.stopMonitoring()
, stop monitoring the device for changes -
device.on('propertyChanged', function)
, receive changes to defined properties -
device.loadProperties(Array[string])
, load properties from the device
device.call(string, array)
, call a method on the device with the given arguments, returns a promise