Python library & console tool for controlling Xiaomi smart appliances

Overview

python-miio

Chat PyPI version PyPI downloads Build Status Coverage Status Documentation status Black

This library (and its accompanying cli tool) can be used to interface with devices using Xiaomi's miIO and MIoT protocols.

Getting started

If you already have a token for your device and the device type, you can directly start using miiocli tool. If you don't have a token for your device, refer to Getting started section of the manual for instructions how to obtain it.

The miiocli is the main way to execute commands from command line. You can always use --help to get more information about the available commands. For example, executing it without any extra arguments will print out options and available commands:

$ miiocli --help
Usage: miiocli [OPTIONS] COMMAND [ARGS]...

Options:
  -d, --debug
  -o, --output [default|json|json_pretty]
  --help                          Show this message and exit.

Commands:
  airconditioningcompanion
  ..

You can get some information from any miIO/MIoT device, including its device model, using the info command:

miiocli device --ip 
   --token 
  
    info

Model: some.device.model1
Hardware version: esp8285
Firmware version: 1.0.1_0012
Network: {'localIp': '
   
    ', 'mask': '255.255.255.0', 'gw': '
    
     '}
AP: {'rssi': -73, 'ssid': '
     
      ', 'primary': 11, 'bssid': '
      
       '} 
      
     
    
   
  
 

Each different device type is supported by their corresponding module (e.g., vacuum or fan). You can get the list of available commands for any given module by passing --help argument to it:

$ miiocli vacuum --help

Usage: miiocli vacuum [OPTIONS] COMMAND [ARGS]...

Options:
  --ip TEXT       [required]
  --token TEXT    [required]
  --id-file FILE
  --help          Show this message and exit.

Commands:
  add_timer                Add a timer.
  ..

Each command invocation will automatically detect the device model necessary for some actions by querying the device. You can avoid this by specifying the model manually:

miiocli vacuum --model roborock.vacuum.s5 --ip 
   --token 
  
    start

  
 

API usage

All functionality is accessible through the miio module:

from miio import Vacuum

vac = Vacuum("
  ", "
  
   ")
vac.start()

  
 

Each separate device type inherits from miio.Device (and in case of MIoT devices, miio.MiotDevice) which provides a common API.

Each command invocation will automatically detect (and cache) the device model necessary for some actions by querying the device. You can avoid this by specifying the model manually:

from miio import Vacuum

vac = Vacuum("
  ", "
  
   ", model="roborock.vacuum.s5")

  
 

Please refer to API documentation for more information.

Troubleshooting

You can find some solutions for the most common problems can be found in Troubleshooting section.

If you have any questions, or simply want to join up for a chat, check our Matrix room.

Contributing

We welcome all sorts of contributions from patches to add improvements or fixing bugs to improving the documentation. To ease the process of setting up a development environment we have prepared a short guide for getting you started.

Supported devices

  • Xiaomi Mi Robot Vacuum V1, S5, S5 MAX, M1S, S7
  • Xiaomi Mi Home Air Conditioner Companion
  • Xiaomi Mi Smart Air Conditioner A (xiaomi.aircondition.mc1, mc2, mc4, mc5)
  • Xiaomi Mi Air Purifier 2, 3H, 3C, Pro (zhimi.airpurifier.m2, mb3, mb4, v7)
  • Xiaomi Mi Air (Purifier) Dog X3, X5, X7SM (airdog.airpurifier.x3, airdog.airpurifier.x5, airdog.airpurifier.x7sm)
  • Xiaomi Mi Air Humidifier
  • Xiaomi Aqara Camera
  • Xiaomi Aqara Gateway (basic implementation, alarm, lights)
  • Xiaomi Mijia 360 1080p
  • Xiaomi Mijia STYJ02YM (Viomi)
  • Xiaomi Mijia 1C STYTJ01ZHM (Dreame)
  • Xiaomi Mi Home (Mijia) G1 Robot Vacuum Mop MJSTG1
  • Xiaomi Roidmi Eve
  • Xiaomi Mi Smart WiFi Socket
  • Xiaomi Chuangmi Plug V1 (1 Socket, 1 USB Port)
  • Xiaomi Chuangmi Plug V3 (1 Socket, 2 USB Ports)
  • Xiaomi Smart Power Strip V1 and V2 (WiFi, 6 Ports)
  • Xiaomi Philips Eyecare Smart Lamp 2
  • Xiaomi Philips RW Read (philips.light.rwread)
  • Xiaomi Philips LED Ceiling Lamp
  • Xiaomi Philips LED Ball Lamp (philips.light.bulb)
  • Xiaomi Philips LED Ball Lamp White (philips.light.hbulb)
  • Xiaomi Philips Zhirui Smart LED Bulb E14 Candle Lamp
  • Xiaomi Philips Zhirui Bedroom Smart Lamp
  • Huayi Huizuo Lamps
  • Xiaomi Universal IR Remote Controller (Chuangmi IR)
  • Xiaomi Mi Smart Pedestal Fan V2, V3, SA1, ZA1, ZA3, ZA4, ZA5 1C, P5, P9, P10, P11
  • Xiaomi Rosou SS4 Ventilator (leshow.fan.ss4)
  • Xiaomi Mi Air Humidifier V1, CA1, CA4, CB1, MJJSQ, JSQ, JSQ1, JSQ001
  • Xiaomi Mi Water Purifier (Basic support: Turn on & off)
  • Xiaomi Mi Water Purifier D1, C1 (Triple Setting)
  • Xiaomi PM2.5 Air Quality Monitor V1, B1, S1
  • Xiaomi Smart WiFi Speaker
  • Xiaomi Mi WiFi Repeater 2
  • Xiaomi Mi Smart Rice Cooker
  • Xiaomi Smartmi Fresh Air System VA2 (zhimi.airfresh.va2), VA4 (zhimi.airfresh.va4), A1 (dmaker.airfresh.a1), T2017 (dmaker.airfresh.t2017)
  • Yeelight lights (basic support, we recommend using python-yeelight)
  • Xiaomi Mi Air Dehumidifier
  • Xiaomi Tinymu Smart Toilet Cover
  • Xiaomi 16 Relays Module
  • Xiaomi Xiao AI Smart Alarm Clock
  • Smartmi Radiant Heater Smart Version (ZA1 version)
  • Xiaomi Mi Smart Space Heater
  • Xiaomiyoupin Curtain Controller (Wi-Fi) (lumi.curtain.hagl05)
  • Xiaomi Xiaomi Mi Smart Space Heater S (zhimi.heater.mc2)
  • Yeelight Dual Control Module (yeelink.switch.sw1)
  • Scishare coffee maker (scishare.coffee.s1102)
  • Qingping Air Monitor Lite (cgllc.airm.cgdn1)
  • Xiaomi Walkingpad A1 (ksmb.walkingpad.v3)

Feel free to create a pull request to add support for new devices as well as additional features for supported devices.

Projects using this library

This library is used by various projects to support MiIO/MiOT devices. If you are using this library for your project, feel free to open a PR to get it listed here!

Home Assistant (official)

Home Assistant uses this library to support several platforms out-of-the-box. This list is incomplete as the platforms (in parentheses) may also support other devices listed above.

Home Assistant (custom)

Other related projects

This is a list of other projects around the Xiaomi ecosystem that you can find interesting. Feel free to submit more related projects.

Comments
  • Add support for Dreame D9 Robot Vacuum (dreame.vacuum.p2009)

    Add support for Dreame D9 Robot Vacuum (dreame.vacuum.p2009)

    The Dreame D9 Robot Vacuum is launched in Europe and has some interesting specs and feature.

    Device information:

    • Name(s) of the device: Dreame D9 Robot Vacuum

    • Link: https://www.dreame-technology.com/products/dreame-d9

    • Model: dreame.vacuum.p2009

    • Hardware version: -

    • Firmware version: -

    Additional context As there is already the miot-spec out there (http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:dreame-p2009:1) it should be possible to add support?! As I am new to this, I have no Idea where to start, but would like to contribute (when my robot arrives ^^)

    new device miot 
    opened by bigdx 116
  • miio local api soon deprecated? / add support for miot api

    miio local api soon deprecated? / add support for miot api

    just to let you know. this is part of mail sent to xiaomi iot platform devs today (translated):

    The Xiaomi IoT platform is fully implementing the MioT-Spec access work. The Xiaomi IoT Device Protocol Specification (MIoT Specification) will replace the original miio profile protocol specification.

    i've checked some plugins of new devices and many of them use miot api (cloud only) rather than miio. for example air purifier 3. i can't say for sure because i don't have device, but from what i saw it's stripped from local miio api.

    enhancement help wanted 
    opened by rezmus 93
  • Some devices not responding across subnets.

    Some devices not responding across subnets.

    Hi

    I'm trying to change around a couple of things in my HASS setup, which seems to have surfaced a bug in the communication with chuangmi_ir devices.

    I can ping the device just fine:

    ping 10.0.3.18
    PING 10.0.3.18 (10.0.3.18) 56(84) bytes of data.
    64 bytes from 10.0.3.18: icmp_seq=1 ttl=254 time=5.14 ms
    64 bytes from 10.0.3.18: icmp_seq=2 ttl=254 time=6.86 ms
    64 bytes from 10.0.3.18: icmp_seq=3 ttl=254 time=3.88 ms
    64 bytes from 10.0.3.18: icmp_seq=4 ttl=254 time=2.10 ms
    --- 10.0.3.18 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3005ms
    rtt min/avg/max/mdev = 2.107/4.502/6.866/1.742 ms
    

    but if i try to get info:

    mirobo --ip 10.0.3.18 --token [TOKEN] info
    ERROR:miio.device:Unable to discover a device at address 10.0.3.18
    Error: Unable to discover the device 10.0.3.18
    

    doing the same thing with my Roborock Vacuum works fine:

    mirobo --ip 10.0.3.17 --token [TOKEN]
    State: Charging
    Battery: 100 %
    Fanspeed: 100 %
    Cleaning since: 0:02:34
    Cleaned area: 2.765 m
    

    It does work fine if I have an IP in the same subnet:

    mirobo --ip 10.0.3.18 --token [TOKEN] info
    chuangmi.ir.v2 v1.2.4_38 ([MAC]) @ 10.0.3.18 - token: [TOKEN]
    

    I have tested on 2 different physical machines in different subnets, so it shouldn't be a problem with my network configuration.

    opened by cnrd 64
  • Add Mi Smart Power Plug 2 (chuangmi.plug.212a01) support

    Add Mi Smart Power Plug 2 (chuangmi.plug.212a01) support

    Device information:

    • Name(s) of the device: Mi Smart Power Plug 2 (Wi-Fi and Bluetooth Gateway)

    • Link: https://www.mi.com/buy/detail?product_id=12777

    • Model: chuangmi.plug.212a01

    • Hardware version: esp32

    • Firmware version: 2.1.0_0017

    new device miot 
    opened by sonicmingit 57
  • Viomi V2 discoverable, not responding

    Viomi V2 discoverable, not responding

    Firstly, thank you very much for creating this! I have a Viomi V2 running with the Mi Home app, trying to get it to do stuff using python-miio

    I extracted the token by running version Mi Home v5.4.54 on an emulator. mirobo -d discover --handshake 1: https://gist.github.com/BackSlasher/aa47b96c9b26bde9f67cdbf7ebe39056

    However, running any command (e.g. home) seems to be ignored: mirobo -d --ip 192.168.0.9 --token XXX home https://gist.github.com/BackSlasher/1239ff641a0c5feddc1e6aeae654e844

    This is my first Viomi device, and I'm not sure what I'm missing. What can I collect to troubleshoot further? Thanks!

    support 
    opened by BackSlasher 52
  • Add support for Vacuum 1C STYTJ01ZHM

    Add support for Vacuum 1C STYTJ01ZHM

    WARNING:miio.discovery:Found unsupported device dreame-vacuum-mc1808_miio29430xxxx._miio._udp.local. at 192.168.0.172, please report to developers

    would love to get support :)

    new device miot 
    opened by craiq 50
  • xiaomi vaccum cleaner not responding

    xiaomi vaccum cleaner not responding

    Hi,

    I am using your mirobo library to start and stop my xiaomi mija vacuum cleaner. It works great, except the case when the vacuum is not being called for longer period of time (day/two).

    Then when I try to start the cleaner using your library I get following errors. If I try about 3 times in a row, it start to work again, and works fine. It looks like the vacuum goes to sleep maybe ?

    Executing command: sudo mirobo --ip 192.168.1.25 --token 33795a47547535596d6a526e3563434c start Response from command execution: 1 ERROR:mirobo.device:Unable to discover a device at address 192.168.1.25 Traceback (most recent call last): File "/usr/local/bin/mirobo", line 11, in sys.exit(cli()) File "/usr/lib/python3/dist-packages/click/core.py", line 716, in call return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args[1:], **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/mirobo/vacuum_cli.py", line 152, in start click.echo("Starting cleaning: %s" % vac.start()) File "/usr/local/lib/python3.5/dist-packages/mirobo/vacuum.py", line 27, in start return self.send("app_start") File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 121, in send self.do_discover() File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 73, in do_discover raise DeviceException("Unable to discover the device %s" % self.ip) mirobo.device.DeviceException: Unable to discover the device 192.168.1.25

    opened by btrial 49
  •  Dreame F9 Robot Vacuum |dreame.vacuum.p2008|

    Dreame F9 Robot Vacuum |dreame.vacuum.p2008|

    Before submitting a new request, use the search to see if there is an existing issue for the device.

    Device information:

    • Name(s) of the device: Dreame F9 Robot Vacuum
    • Link: https://www.dreame-technology.com/products/dreame-f9

    Use miiocli dreamevacuum --ip <ip address> --token <token>.

    dreame.vacuum.p1808 dreame.vacuum.p2008 return_home ---> Start Cleanup aiid 1 Start Charge: in: [] -> out: [] start_sweep ---> Return to Docking Station aiid 1 Start Sweep: in: [] -> out: []

    • Model: [dreame.vacuum.p2008]
    • Hardware version: Where can i look this up?
    • Firmware version: 3.5.8_1024

    Additional context I used the dreame.vacuum.p2008 build. Tested some commands and found that i can start a cleanup with the "return_home" command and return the robot to the docking station with "start_sweep"

    Additionally i listend with wireshark while using the Xiaomi Home App. Here is the log: https://textuploader.com/1f3wm There should be "Start Cleanups" and Return to docking station commands

    new device miot 
    opened by wilhelmphilipp94 47
  • Improve Viomi support (status reporting, maps)

    Improve Viomi support (status reporting, maps)

    This PR refactors viomi vacuum (like STYJ02YM)

    I tested all the attributes with STYJ02YM. I re-organised the commands to stick with the android UI. I added also some commands:

    • maps management
    • list rooms
    • cleaning specific room
    enhancement 
    opened by titilambert 47
  • Working with water purifier

    Working with water purifier

    hello, it's working with miio command like: miio --control 10.0.1.8 --token a3d7f95***3 --method get_prop , has working data output, but using mirobo --ip 10.0.1.8 --token a3d7f95***3 -d info failed with error:

    INFO:mirobo.vacuum_cli:Debug mode active
    ERROR:mirobo.vacuum_cli:Unable to read the stored msgid: [Errno 2] No such file or directory: '/tmp/python-mirobo.seq'
    DEBUG:mirobo.vacuum_cli:Connecting to 10.0.1.8 with token a3d7f95***3
    ERROR:mirobo.device:Unable to discover a device at address 10.0.1.8
    Traceback (most recent call last):
      File "/usr/local/bin/mirobo", line 11, in <module>
        sys.exit(cli())
      File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/usr/local/lib/python3.5/dist-packages/click/decorators.py", line 64, in new_func
        return ctx.invoke(f, obj, *args[1:], **kwargs)
      File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/usr/local/lib/python3.5/dist-packages/mirobo/vacuum_cli.py", line 339, in info
        res = vac.info()
      File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 183, in info
        return DeviceInfo(self.send("miIO.info", []))
      File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 120, in send
        self.do_discover()
      File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 72, in do_discover
        raise DeviceException("Unable to discover the device %s" % self.ip)
    mirobo.device.DeviceException: Unable to discover the device 10.0.1.8
    

    Any idea to get water purifier working? Thanks.

    bug 
    opened by nutinshell 43
  • No token in miio2.db after version 5.0.29 of MiHome app...

    No token in miio2.db after version 5.0.29 of MiHome app...

    In versions 5.0.31+ there is empty field token in miio2.db file. They change something in application. An investigation is required.

    Tested on Mi Robot Vacuum Cleaner (1st generation)

    support documentation 
    opened by khalitovsv 41
  • Release Schedule

    Release Schedule

    Is your feature request related to a problem? Please describe. It is possible to have some type of release schedule for minor updates like bug fixes and new simple devices?

    Describe the solution you'd like A once in month minor release would be nice to have. But I don't trying to push you, and life sometimes hits hard, take your time.

    Additional context it's 5 months from last public release. And there was same type of a problem already #1463

    enhancement 
    opened by Aljutor 0
  • Implement input parameters for actions

    Implement input parameters for actions

    This makes the action input parameters accessible through action descriptors.

    Here's an excerpt from the actions command for ijai.vacuum.v3 showing some parameter infos:

    sweep (sweep)
            sweep:reset-consumable          reset-consumable
                    Parameter #1: sweep:consumable-index (consumable-index) (<class 'int'>) choices: 主刷 (1), 边刷 (2), 滤网 (3), 拖布 (4)
            sweep:set-calibration           set-calibration
            sweep:set-room-clean            set-room-clean
                    Parameter #1: sweep:clean-room-ids () (<class 'str'>) 
                    Parameter #2: sweep:clean-room-mode () (<class 'int'>) choices: 全局 (0), 沿边 (1)
                    Parameter #3: sweep:clean-room-oper (clean-room-oper) (<class 'int'>) choices: 停止 (0), 开始 (1), 暂停 (2), 假暂停 (3)
            sweep:set-preference-clean              set-preference-clean
                    Parameter #1: sweep:clean-preference (clean-preference) (<class 'str'>) 
                    Parameter #2: sweep:clean-current-map (clean-current-map) (<class 'int'>) min: 1, max: 4294967295, step: 1
    <--snip-->
    language (language)
            language:download-voice         download-voice
                    Parameter #1: language:target-voice (target-voice) (<class 'str'>) 
                    Parameter #2: language:voice-url (voice-url) (<class 'str'>) 
                    Parameter #3: language:voice-mdfive (voice-mdfive) (<class 'str'>) 
            language:get-download-status            get-download-status
    
    

    For the time being this is just a draft and requires some more work and testing. I have no test device that has such actions, so I'm creating this PR in hopes someone who has one could help with some testing.

    TODO:

    • [ ] Convert inputs to descriptors for downstreams
    • [x] Update call command to allow passing the parameters
    enhancement 
    opened by rytilahti 1
  • Xiaomi Smart Kettle 2 Pro - Support request

    Xiaomi Smart Kettle 2 Pro - Support request

    Before submitting a new request, use the search to see if there is an existing issue for the device.

    Device information:

    Use miiocli device --ip <ip address> --token <token> info.

    • Model: yunmi.kettle.v19
    • Hardware version: esp32
    • Firmware version: 2.2.0_0030

    Additional context There is spec for it: https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:kettle:0000A009:yunmi-v19:1

    new device 
    opened by Itzamna44 3
  • Support for vacuum Roborock T8 Plus

    Support for vacuum Roborock T8 Plus

    Device information:

    • Name(s) of the device: Roborock T8 Plus
    • Link:

    Use miiocli device --ip <ip address> --token <token> info.

    • Model: roborock.vacuum.a52
    • Hardware version:
    • Firmware version: 02.11.06

    Additional context The device successfully returns the token when use the discover command. However, the device does not work with the command 'status'. For most of the commands, the device returns {'code': -10002, 'message': 'rrcheck access denied'}, 'exe_time': 101}.

    The configure wifi command works but it seems the device only stored the wifi credential without connecting to the wifi. The device was purchased in Mainland China.

    new device 
    opened by chris-chensy 1
  • roborock.vacuum.a09 works fine

    roborock.vacuum.a09 works fine

    Logger: miio.device Source: components/xiaomi_miio/init.py:235 First occurred: 11:45:24 (1 occurrences) Last logged: 11:45:24

    Found an unsupported model 'roborock.vacuum.a09' for class 'RoborockVacuum'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/

    new device 
    opened by wingkuen 0
Releases(0.5.12)
  • 0.5.12(Jul 18, 2022)

    Release highlights:

    • Thanks to @starkillerOG, this library now supports event handling using miio.PushServer, making it possible to support instantenous event-based callbacks on supported devices. This works by leveraging the scene functionality for subscribing to events, and is at the moment only known to be supported by gateway devices. See the documentation for details: https://python-miio.readthedocs.io/en/latest/push_server.html

    • Optional support for obtaining tokens from the cloud (using micloud library by @Squachen), making onboarding new devices out-of-the-box simpler than ever. You can access this feature using miiocli cloud command, or through miio.CloudInterface API.

    • And of course support for new devices, various enhancements to existing ones as well as bug fixes

    Thanks to all 20 individual contributors for this release, see the full changelog below for details!

    Full Changelog

    Breaking changes:

    • Require click8+ (API incompatibility on result_callback) #1378 (@Sir-Photch)
    • Move yeelight to integrations.light package #1367 (@rytilahti)
    • Move humidifier implementations to miio.integrations.humidifier package #1365 (@rytilahti)
    • Move airpurifier impls to miio.integrations.airpurifier package #1364 (@rytilahti)

    Implemented enhancements:

    • Implement fetching device tokens from the cloud #1460 (@rytilahti)
    • Implement push notifications for gateway #1459 (@starkillerOG)
    • Add soundpack install support for vacuum/dreame #1457 (@GH0st3rs)
    • Improve gateway get_devices_from_dict #1456 (@starkillerOG)
    • Improved fanspeed mapping for Roborock S7 MaxV #1454 (@arthur-morgan-1)
    • Add push server implementation to enable event handling #1446 (@starkillerOG)
    • Add yeelink.light.color7 for yeelight #1426 (@rytilahti)
    • vacuum/roborock: Allow custom timer ids #1423 (@rytilahti)
    • Add fan speed presets to VacuumInterface #1405 (@2pirko)
    • Add device_id property to Device class #1384 (@starkillerOG)
    • Add common interface for vacuums #1368 (@2pirko)
    • roborock: auto empty dustbin support #1188 (@craigcabrey)

    Fixed bugs:

    • Consolidate supported models for class and instance properties #1462 (@rytilahti)
    • fix lumi.plug.mmeu01 ZNCZ04LM #1449 (@starkillerOG)
    • Add quirk fix for double-oh values #1438 (@rytilahti)
    • Use result_callback (click8+) in roborock integration #1390 (@DoganM95)
    • Retry on error code -9999 #1363 (@rytilahti)
    • Catch exceptions during quirk handling #1360 (@rytilahti)
    • Use devinfo.model for unsupported model warning #1359 (@MPThLee)

    New devices:

    • Add support for Xiaomi Smart Standing Fan 2 Pro (dmaker.fan.p33) #1467 (@dainnilsson)
    • add zhimi.airpurifier.amp1 support #1464 (@dsh0416)
    • roborock: Add support for Roborock G10S (roborock.vacuum.a46) #1437 (@rytilahti)
    • Add support for Smartmi Air Purifier (zhimi.airpurifier.za1) #1417 (@julian-klode)
    • Add zhimi.airp.rmb1 support #1402 (@jedziemyjedziemy)
    • Add zhimi.airp.vb4 support (air purifier 4 pro) #1399 (@rperrell)
    • Add support for dreame.vacuum.p2150o #1382 (@icepie)
    • Add support for Air Purifier 4 (zhimi.airp.mb5) #1357 (@MPThLee)
    • Support for Xiaomi Vaccum Mop 2 Ultra and Pro+ (dreame) #1356 (@2pirko)

    Documentation updates:

    • Various documentation cleanups #1466 (@rytilahti)
    • Remove docs for now-removed mi{ceil,plug,eyecare} cli tools #1465 (@rytilahti)
    • Fix outdated vacuum mentions in README #1442 (@rytilahti)
    • Update troubleshooting to note discovery issues with roborock.vacuum.a27 #1414 (@golddragon007)
    • Add cloud extractor for token extraction to documentation #1383 (@NiRi0004)

    Merged pull requests:

    • Mark zhimi.airp.mb3a as supported #1468 (@rytilahti)
    • Disable 3.11-dev builds on mac and windows #1461 (@rytilahti)
    • Fix doc8 regression #1458 (@rytilahti)
    • Disable fail-fast on CI tests #1450 (@rytilahti)
    • Mark roborock q5 (roborock.vacuum.a34) as supported #1448 (@rytilahti)
    • zhimi_miot: Rename fan_speed to speed #1439 (@syssi)
    • Add viomi.vacuum.v13 for viomivacuum #1432 (@rytilahti)
    • Add python 3.11-dev to CI #1427 (@rytilahti)
    • Add codeql checks #1403 (@rytilahti)
    • Update pre-commit hooks to fix black in CI #1380 (@rytilahti)
    • Mark chuangmi.camera.038a2 as supported #1371 (@rockyzhang)
    • Mark roborock.vacuum.c1 as supported #1370 (@rytilahti)
    • Use integration type specific imports #1366 (@rytilahti)
    • Mark dmaker.fan.p{15,18} as supported #1362 (@rytilahti)
    • Mark philips.light.sread2 as supported for philips_eyecare #1355 (@rytilahti)
    • Use _mappings for all miot integrations #1349 (@rytilahti)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.11(Mar 7, 2022)

    This release fixes zhimi.fan.za5 support and makes all integrations introspectable for their supported models. For developers, there is now a network trace parser (in devtools/parse_pcap.py) that prints the decrypted the traffic for given tokens.

    The following previously deprecated classes in favor of model-based discovery, if you were using these classes directly you need to adjust your code:

    • AirFreshVA4 - use AirFresh
    • AirHumidifierCA1, AirHumidifierCB1, AirHumidifierCB2 - use AirHumidifier
    • AirDogX5, AirDogX7SM - use AirDogX3
    • AirPurifierMB4 - use AirPurifierMiot
    • Plug, PlugV1, PlugV3 - use ChuangmiPlug
    • FanP9, FanP10, FanP11 - use FanMiot
    • DreameVacuumMiot - use DreameVacuum
    • Vacuum - use RoborockVacuum

    Full Changelog

    Breaking changes:

    • Remove deprecated integration classes #1343 (@rytilahti)

    Implemented enhancements:

    • Add PCAP file parser for protocol analysis #1331 (@rytilahti)

    Fixed bugs:

    • Fix bug for zhimi.fan.za5 resulting in user ack timeout #1348 (@saxel)

    Deprecated:

    • Deprecate wifi_led in favor of led #1342 (@rytilahti)

    Merged pull requests:

    • Make sure miotdevice implementations define supported models #1345 (@rytilahti)
    • Add Viomi V2 (viomi.vacuum.v6) as supported #1340 (@rytilahti)
    • Mark Roborock S7 MaxV (roborock.vacuum.a27) as supported #1337 (@rytilahti)
    • Add pyupgrade to CI runs #1329 (@rytilahti)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.10(Feb 17, 2022)

    This release adds support for several new devices (see details below, thanks to @PRO-2684, @peleccom, @ymj0424, and @supar), and contains improvements to Roborock S7, yeelight and gateway integrations (thanks to @starkillerOG, @Kirmas, and @shred86). Thanks also to everyone who has reported their working model information, we can use this information to provide better discovery in the future and this release silences the warning for known working models.

    Python 3.6 is no longer supported, and Fan{V2,SA1,ZA1,ZA3,ZA4} utility classes are now removed in favor of using Fan class.

    Full Changelog

    Breaking changes:

    • Split fan.py to vendor-specific fan integrations #1304 (@rytilahti)
    • Drop python 3.6 support #1263 (@rytilahti)

    Implemented enhancements:

    • Improve miotdevice mappings handling #1302 (@rytilahti)
    • airpurifier_miot: force aqi update prior fetching data #1282 (@rytilahti)
    • improve gateway error messages #1261 (@starkillerOG)
    • yeelight: use and expose the color temp range from specs #1247 (@Kirmas)
    • Add Roborock S7 mop scrub intensity #1236 (@shred86)

    New devices:

    • Add support for zhimi.heater.za2 #1301 (@PRO-2684)
    • Dreame F9 Vacuum (dreame.vacuum.p2008) support #1290 (@peleccom)
    • Add support for Air Purifier 4 Pro (zhimi.airp.va2) #1287 (@ymj0424)
    • Add support for deerma.humidifier.jsq{s,5} #1193 (@supar)

    Merged pull requests:

    • Add roborock.vacuum.a23 to supported models #1314 (@rytilahti)
    • Move philips light implementations to integrations/light/philips #1306 (@rytilahti)
    • Move leshow fan implementation to integrations/fan/leshow/ #1305 (@rytilahti)
    • Split fan_miot.py to vendor-specific fan integrations #1303 (@rytilahti)
    • Add chuangmi.remote.v2 to chuangmiir #1299 (@rytilahti)
    • Perform pypi release on github release #1298 (@rytilahti)
    • Print debug recv contents prior accessing its contents #1293 (@rytilahti)
    • Add more supported models #1292 (@rytilahti)
    • Add more supported models #1275 (@rytilahti)
    • Update installation instructions to use poetry #1259 (@rytilahti)
    • Add more supported models based on discovery.py's mdns records #1258 (@rytilahti)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.9.2(Dec 14, 2021)

    This release fixes regressions caused by the recent refactoring related to supported models:

    • philips_bulb now defaults to a bulb that has color temperature setting
    • gateway devices do not perform an info query as that is handled by their parent

    Also, the list of the supported models was extended thanks to the feedback from the community!

    Full Changelog

    Implemented enhancements:

    • Add yeelink.bhf_light.v2 and yeelink.light.lamp22 support #1250 (FaintGhost)
    • Skip warning if the unknown model is reported on a base class #1243 (rytilahti)
    • Add emptying bin status for roborock s7+ #1190 (rytilahti)

    Fixed bugs:

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.9.1(Dec 2, 2021)

  • 0.5.9(Nov 30, 2021)

    0.5.9 (2021-11-30)

    Besides enhancements and bug fixes, this release includes plenty of janitoral work to enable common base classes in the future.

    For library users:

    • Integrations are slowly moving to their own packages and directories, e.g. the vacuum module is now located in miio.integrations.vacuum.roborock.
    • Using Vacuum is now deprecated and will be later used as the common interface class for all vacuum implementations. For roborock vacuums, use RoborockVacuum instead.

    Full Changelog

    Breaking changes:

    • Move vacuums to self-contained integrations #1165 (rytilahti)
    • Remove unnecessary subclass constructors, deprecate subclasses only setting the model #1146 (rytilahti)
    • Remove deprecated cli tools (plug,miceil,mieye) #1130 (rytilahti)

    Implemented enhancements:

    Fixed bugs:

    Deprecated:

    New devices:

    • add support for smart pet water dispenser mmgg.pet_waterer.s1 #1174 (ofen)

    Documentation updates:

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.8(Sep 1, 2021)

    • Add support for smart mi standing fan 3 (zhimi.fan.za5)
    • Fix usage of deprecated depth for airhumidifer

    Full Changelog

    Implemented enhancements:

    Closed issues:

    • Smart Mi Standing fan 3 (Xiaomi Pedestal Fan 3, zhimi.fan.za5) #788

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.7(Aug 13, 2021)

    0.5.7 (2021-08-13)

    This release improves several integrations (including yeelight, airpurifier_miot, dreamevacuum, rockrobo) and adds support for Roidmi Eve vacuums, see the full changelog for more details.

    Note that this will likely be the last release on the 0.5 series before breaking the API to reorganize the project structure and provide common device type specific interfaces.

    Full Changelog

    Implemented enhancements:

    • Add setting for carpet avoidance to vacuums #1040
    • Add optional "Length" parameter to chuangmi_ir.py play_raw(). for "chuangmi.remote.v2" to send some command properly #820
    • Add update_service callback for zeroconf listener #1112 (rytilahti)
    • Add rockrobo-vacuum-a10 to mdns discovery list #1110 (rytilahti)
    • Added additional OperatingModes and FaultStatuses for dreamevacuum #1090 (StarterCraft)
    • yeelight: add dump_ble_debug #1053 (rytilahti)
    • Convert codebase to pass mypy checks #1046 (rytilahti)
    • Add optional length parameter to play_* for chuangmi_ir #1043 (Dozku)
    • Add features for newer vacuums (eg Roborock S7) #1039 (fettlaus)

    Fixed bugs:

    • air purifier unknown oprating mode #1106
    • Missing Listener method for current zeroconf library #1101
    • DeviceError when trying to turn on my Xiaomi Mi Smart Pedestal Fan #1100
    • Unable to discover vacuum cleaner: Xiaomi Mi Robot Vacuum Mop (aka dreame.vacuum.mc1808) #1086
    • Crashes if no hw_ver present #1084
    • Viomi S9 does not expose hv_wer #1082
    • set_rotate FanP10 sends the wrong command #1076
    • Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808) is not update, 0% battery #1069
    • Requirement is pinned for python-miio 0.5.6: defusedxml>=0.6,<0.7 #1062
    • Problem with dmaker.fan.1c #1036
    • Yeelight Smart Dual Control Module (yeelink.switch.sw1) - discovered by HA but can not configure #1033
    • Update-firmware not working for Roborock S5 #1000
    • Roborock S7 #994
    • airpurifier_miot: return OperationMode.Unknown if mode is unknown #1111 (rytilahti)
    • Fix set_rotate for dmaker.fan.p10 (#1076) #1078 (pooyashahidi)

    Closed issues:

    • Xiaomi Roborock S6 MaxV #1108
    • dreame.vacuum.mb1808 unsupported #1104
    • The new way to get device token #1088
    • Add Air Conditioning Partner 2 support #1058
    • Please add support for the Mijia 1G Vacuum! #1057
    • ble_dbg_tbl_dump user ack timeout #1051
    • Roborock S7 can't be added to Home Assistant #1041
    • Cannot get status from my zhimi.airpurifier.mb3(Airpurifier 3H) #1037
    • Xiaomi Mi Robot (viomivacuum), command stability #800
    • [meta] list of miot-enabled devices #627

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.6(May 5, 2021)

    Full Changelog

    Implemented enhancements:

    • RFC: Add a script to simplify finding supported properties for miio #919
    • Improve test_properties output #1024 (rytilahti)
    • Relax zeroconf version requirement #1023 (rytilahti)
    • Add test_properties command to device class #1014 (rytilahti)
    • Add discover command to miiocli #1013 (rytilahti)
    • Fix supported oscillation angles of the dmaker.fan.p9 #1011 (syssi)
    • Add additional operation mode of the deerma.humidifier.jsq1 #1010 (syssi)
    • Roborock S7: Parse history details returned as dict #1006 (fettlaus)

    Fixed bugs:

    • zeroconf 0.29.0 which is incompatible #1022
    • Remove superfluous decryption failure for handshake responses #1008
    • Skip pausing on Roborock S50 #1005
    • Roborock S7 after Firmware Update 4.1.2-0928 - KeyError #1004
    • No air quality value when aqi is 1 #958
    • Fix exception on devices with removed lan_ctrl #1028 (Kirmas)
    • Fix start bug and improve error handling in walkingpad integration #1017 (dewgenenny)
    • gateway: fix zigbee lights #1016 (starkillerOG)
    • Silence unable to decrypt warning for handshake responses #1015 (rytilahti)
    • Fix set_mode_and_speed mode for airdog airpurifier #993 (alexeypetrenko)

    Closed issues:

    • Add Dafang camera (isa.camera.df3) support #996
    • Roborock S7 #989
    • WalkingPad A1 Pro #797

    Merged pull requests:

    • Add basic dmaker.fan.1c support #1012 (syssi)
    • Always return aqi value [Revert PR#930] #1007 (bieniu)
    • Added S6 to skip pause on docking #1002 (Sian-Lee-SA)
    • Added number of dust collections to CleaningSummary if available #992 (fettlaus)
    • Reformat history data if returned as a dict/Roborock S7 Support (#989) #990 (fettlaus)
    • Add support for Walkingpad A1 (ksmb.walkingpad.v3) #975 (dewgenenny)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.5.2(Mar 24, 2021)

    This release is mainly to re-add mapping parameter to MiotDevice constructor for backwards-compatibility reasons, but adds also PyYAML dependency and improves MiOT support to allow limiting how many properties to query at once.

    Full Changelog

    Implemented enhancements:

    • Please add back the mapping parameter to MiotDevice constructor #982

    Fixed bugs:

    • Missing dependency: pyyaml #986

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.5.1(Mar 20, 2021)

  • 0.5.5(Mar 13, 2021)

    0.5.5 (2021-03-13)

    This release adds support for several new devices, and contains improvements and fixes on several existing integrations. Instead of summarizing all changes here, this library seeks to move completely automated changelogs based on the pull request tags to facilitate faster release cycles. Until that happens, the full list of changes is listed below as usual.

    Full Changelog

    Implemented enhancements:

    • Connecting from external network #931
    • Filter out value 1 from the property AQI #925
    • Any plans on supporting Air Detector Lite PM2.5? #879
    • Get possible device commands/arguments via API #846
    • Add support for xiaomi scishare coffee machine #833
    • Make netifaces optional dependency #970 (rytilahti)
    • Unify subdevice types #947 (starkillerOG)
    • Cleanup: add DeviceStatus to simplify status containers #941 (rytilahti)
    • add method to load subdevices from dict (EU gateway support) #936 (starkillerOG)
    • Refactor & improve support for gateway devices #924 (starkillerOG)
    • Add docformatter to pre-commit hooks #914 (rytilahti)
    • Improve MiotDevice API (get_property_by, set_property_by, call_action, call_action_by) #905 (rytilahti)
    • Stopgap fix for miottemplate #902 (rytilahti)
    • Support resume_or_start for vacuum's segment cleaning #894 (Sian-Lee-SA)
    • Add missing annotations for ViomiVacuum #872 (dominikkarall)
    • Add generic __repr__ for Device class #869 (rytilahti)
    • Set timeout as parameter #866 (titilambert)
    • Improve Viomi support (status reporting, maps) #808 (titilambert)

    Fixed bugs:

    • Make netifaces optional dependency #964
    • Some errors in miio/airdehumidifier.py #960
    • Roborock S5 Max not discovered #944
    • Vacuum timezone returns 'int' object is not subscriptable #921
    • discover_devices doesnt work with xiaomi gateway v3 #916
    • Can control but not get info from the vacuum #912
    • airhumidifier_miot.py - mapping attribute error #911
    • Xiaomi Humidifier CA4 fail to read status. (zhimi.humidifier.ca4) #908
    • miottemplate.py print specs.json fails #906
    • Miiocli and Airdog appliance #892
    • ServiceInfo has no attribute 'address' in miio/discovery #891
    • Devtools exception miottemplate.py generate #885
    • Issue with Xiaomi Miio gateway Integrations ZNDMWG03LM #864
    • Xiaomi Mi Robot Vacuum V1 - Fan Speed Issue #860
    • Xiaomi Smartmi Evaporation Air Humidifier 2 (zhimi.humidifier.ca4) #859
    • Report more specific exception when airdehumidifer is off #963 (rytilahti)
    • vacuum: second try to fix the timezone returning an integer #949 (rytilahti)
    • Fix the logic of staring cleaning a room for Viomi #946 (AlexAlexPin)
    • vacuum: skip pausing on s50 and s6 maxv before return home call #933 (rytilahti)
    • Fix airpurifier_airdog x5 and x7sm to derive from the x3 base class #903 (rytilahti)
    • Fix discovery for python-zeroconf 0.28+ #898 (rytilahti)
    • Vacuum: add fan speed preset for gen1 firmwares 3.5.8+ #893 (mat4444)

    Closed issues:

    • miiocli command not found #956
    • [Roborock S6 MaxV] Need a delay between pause and charge commands to return to dock #918
    • Support for Xiaomi Air purifier 3C #888
    • zhimi.heater.mc2 not fully supported #880
    • Support for leshow.fan.ss4 (xiaomi Rosou SS4 Ventilator) #806
    • Constant spam of: Unable to discover a device at address [IP] and Got exception while fetching the state: Unable to discover the device [IP] #407
    • Add documentation for miiocli #400

    Merged pull requests:

    • Fix another typo in the docs #968 (muellermartin)
    • Fix link to API documentation #967 (muellermartin)
    • Add section for getting tokens from rooted devices #966 (muellermartin)
    • Improve airpurifier doc strings by adding raw responses #961 (arturdobo)
    • Add troubleshooting for Roborock app #954 (lyghtnox)
    • Initial support for Vacuum 1C STYTJ01ZHM (dreame.vacuum.mc1808) #952 (legacycode)
    • Replaced typing by pyyaml #945 (legacycode)
    • janitoring: add bandit to pre-commit checks #940 (rytilahti)
    • vacuum: fallback to UTC when encountering unknown timezone response #932 (rytilahti)
    • [miot air purifier] Return None if aqi is 1 #930 (bieniu)
    • added support for zhimi.humidifier.cb2 #917 (sannoob)
    • Include some more flake8 checks #915 (rytilahti)
    • Improve miottemplate.py print to support python 3.7.3 (Closes: #906) #910 (syssi)
    • Fix __repr__ of AirHumidifierMiotStatus (Closes: #908) #909 (syssi)
    • Add clean mode (new feature) to the zhimi.humidifier.ca4 #907 (syssi)
    • Allow downloading miot spec files by model for miottemplate #904 (rytilahti)
    • Add Qingping Air Monitor Lite support (cgllc.airm.cgdn1) #900 (arturdobo)
    • Add support for Xiaomi Air purifier 3C #899 (arturdobo)
    • Add support for zhimi.heater.mc2 #895 (bafonins)
    • Add support for Yeelight Dual Control Module (yeelink.switch.sw1) #887 (IhorSyerkov)
    • Retry and timeout can be change by setting a class attribute #884 (titilambert)
    • Add support for all Huizuo Lamps (w/ fans, heaters, and scenes) #881 (darckly)
    • Add deerma.humidifier.jsq support #878 (syssi)
    • Export MiotDevice for miio module #876 (syssi)
    • Add missing "info" to device information query #873 (rytilahti)
    • Add Rosou SS4 Ventilator (leshow.fan.ss4) support #871 (syssi)
    • Initial support for HUIZUO PISCES For Bedroom #868 (darckly)
    • Add airdog.airpurifier.{x3,x5,x7sm} support #865 (syssi)
    • Add dmaker.airfresh.a1 support #862 (syssi)
    • Add support for Scishare coffee maker (scishare.coffee.s1102) #858 (rytilahti)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.4(Nov 15, 2020)

    New devices:

    • Xiaomi Smartmi Fresh Air System VA4 (zhimi.airfresh.va4) (@syssi)
    • Xiaomi Mi Smart Pedestal Fan P9, P10, P11 (dmaker.fan.p9, dmaker.fan.p10, dmaker.fan.p11) (@swim2sun)
    • Mijia Intelligent Sterilization Humidifier SCK0A45 (deerma.humidifier.jsq1)
    • Air Conditioner Companion MCN (lumi.acpartner.mcn02) (@EugeneLiu)
    • Xiaomi Water Purifier D1 (yunmi.waterpuri.lx9) and C1 (Triple Setting, yunmi.waterpuri.lx11) (@zhangjingye03)
    • Xiaomi Mi Smart Air Conditioner A (xiaomi.aircondition.mc1, mc2, mc4 and mc5) (@zhangjingye03)
    • Xiaomiyoupin Curtain Controller (Wi-Fi) / Aqara A1 (lumi.curtain.hagl05) (@in7egral)

    Improvements:

    • ViomiVacuum: New modes, states and error codes (@fs79)
    • ViomiVacuum: Consumable status added (@titilambert)
    • Gateway: Throws GatewayException in get_illumination (@javicalle)
    • Vacuum: Tangible User Interface (TUI) for the manual mode added (@rnovatorov)
    • Vacuum: Mopping to VacuumingAndMopping renamed (@rytilahti)
    • raw_id moved from Vacuum to the Device base class (@rytilahti)
    • __json__ boilerplate code from all status containers removed (@rytilahti)
    • Pinned versions loosed and cryptography dependency bumped to new major version (@rytilahti)
    • importlib_metadata python_version bounds corrected (@jonringer)
    • CLI: EnumType defaults to incasesensitive now (@rytilahti)
    • Better documentation and presentation of the documentation (@rytilahti)

    Fixes:

    • Vacuum: Invalid cron expression fixed (@rytilahti)
    • Vacuum: Invalid cron elements handled gracefully (@rytilahti)
    • Vacuum: WaterFlow as an enum defined (@rytilahti)
    • Yeelight: Check color mode values for emptiness (@rytilahti)
    • Airfresh: Temperature property of the zhimi.airfresh.va2 fixed (@syssi)
    • Airfresh: PTC support of the dmaker.airfresh.t2017 fixed (@syssi)
    • Airfresh: Payload of the boolean setter fixed (@syssi)
    • Fan: Fan speed property of the dmaker.fan.p11 fixed (@iquix)

    Full Changelog

    Implemented enhancements:

    • Add error codes 2103 & 2105 #789
    • ViomiVacuumState 6 seems to be VaccuumMopping #783
    • Added some parameters: Error code, Viomimode, Viomibintype #799 (fs79)
    • Add mopping state & log a warning when encountering unknown state #784 (rytilahti)

    Fixed bugs:

    • Invalid cron expression when using xiaomi_miio integration in Home Assistant #847
    • viomivacuum doesn´t work with -o json_pretty #816
    • yeeligth without color temperature status error #802
    • set_waterflow roborock.vacuum.s5e #786
    • Requirement is pinned for python-miio 0.5.3: zeroconf>=0.25.1,<0.26.0 #780
    • Requirement is pinned for python-miio 0.5.3: pytz>=2019.3,<2020.0 #779
    • miiocli: remove network & AP information from info output #857 (rytilahti)
    • Fix PTC support of the dmaker.airfresh.t2017 #853 (syssi)
    • Vacuum: handle invalid cron elements gracefully #848 (rytilahti)
    • yeelight: Check color mode values for emptiness #829 (rytilahti)
    • Define WaterFlow as an enum #787 (rytilahti)

    Closed issues:

    • Notify access support for MIoT Device #843
    • Xiaomi WiFi Power Plug(Bluetooth Gateway)(chuangmi.plug.hmi208) #840
    • Mi Air Purifier 3H - unable to connect #836
    • update-firmware on Xiaomi Mi Robot Vacuum V1 fails #818
    • Freash air system calibration of CO2 sensor command #814
    • Unable to discover the device (zhimi.airpurifier.ma4) #798
    • Mi Air Purifier 3H Timed out #796
    • Xiaomi Smartmi Fresh Air System XFXTDFR02ZM. upgrade version of XFXT01ZM with heater. #791
    • mi smart sensor gateway - check status #762
    • Installation problem 64bit #727
    • support dmaker.fan.p9 and dmaker.fan.p10 #721
    • Add support for lumi.acpartner.mcn02 please? #637

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.3(Jul 27, 2020)

    0.5.3 (2020-07-27)

    New devices:

    • Xiaomi Mi Air Humidifier CA4 (zhimi.humidifier.ca4) (@Toxblh)

    Improvements:

    • S5 vacuum: adjustable water volume for mopping
    • Gateway: improved light controls (@starkillerOG)
    • Chuangmi Camera: improved home monitoring support (@impankratov)

    Fixes:

    • Xioawa E25: do not crash when trying to access timers
    • Vacuum: allow resuming after error in zoned cleanup (@r4nd0mbr1ck)

    Full Changelog

    Implemented enhancements:

    Fixed bugs:

    • AqaraSmartBulbE27 support added in #729 is not work #771
    • Broken timezone call (dictionary instead of string) breaks HASS integration #759

    Closed issues:

    • Roborock S5 Max, Failure to connect in Homeassistant. #758
    • Unable to decrypt, returning raw bytes: b'' - while mirobo discovery #752
    • Error with Windows x64 python #733
    • Xiaomi Vacuum - resume clean-up after pause #471

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.2.1(Jul 3, 2020)

  • 0.5.2(Jul 3, 2020)

    0.5.2 (2020-07-03)

    This release brings several improvements to the gateway support, thanks to @starkillerOG as well as some minor improvements and fixes to some other parts.

    Improvements:

    • gateway: plug controls, support for aqara wall outlet and aqara smart bulbs, ability to enable telnet access & general improvements
    • viomi: ability to change the mopping pattern
    • fan: ability to disable delayed turn off

    Fixes:

    • airpurifier_miot: Incorrect get_properties usage

    Full Changelog

    Fixed bugs:

    • Air priefier H3 doasn't work in 0.5.1 #730

    Closed issues:

    • Viomi V8: AttributeError: 'NoneType' object has no attribute 'header' #746
    • viomi: add command for changing the mopping mode #725
    • fan za3, got token, but does not work #720
    • Capitalisation of Air Purifier modes #715
    • STYJ02YM Unable to decrypt error #701

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Jun 4, 2020)

    The most noteworthy change in this release is the work undertaken by @starkillerOG to improve the support for Xiaomi gateway devices. See the PR description for more details at https://github.com/rytilahti/python-miio/pull/700 .

    For downstream developers, this release adds two new exceptions to allow better control in situations where the response payloads from the device are something unexpected. This is useful for gracefully fallbacks when automatic device type discovery fails.

    P.S. There is now a matrix room (https://matrix.to/#/#python-miio-chat:matrix.org) so feel free to hop in for any reason.

    This release adds support for the following new devices:

    • chuangmi.plug.hmi208
    • Gateway subdevices: Aqara Wireless Relay 2ch (@bskaplou), AqaraSwitch{One,Two}Channels (@starkillerOG)

    Fixes & Enhancements:

    • The initial UDP handshake is sent now several times to accommodate spotty networks
    • chuangmi.camera.ipc019: camera rotation & alarm activation
    • Vacuum: added next_schedule property for timers, water tank status, is_on state for segment cleaning mode
    • chuangmi.plug.v3: works now with updated firmware version
    • Viomi vacuum: various minor fixes

    API changes:

    • Device.send() accepts extra_parameters to allow passing values to the main payload body. This is useful at least for gateway devices.

    • Two new exceptions to give more control to downstream developers:

      • PayloadDecodeException (when the payload is unparseable)
      • DeviceInfoUnavailableException (when device.info() fails)
    • Dependency management is now done using poetry & pyproject.toml

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.5.0.1(Mar 29, 2020)

  • 0.5.0(Mar 29, 2020)

    Xiaomi is slowly moving to use new protocol dubbed MiOT on the newer devices. To celebrate the integration of initial support for this protocol, it is time to jump from 0.4 to 0.5 series! Shout-out to @rezmus for the insightful notes, links, clarifications on #543 to help to understand how the protocol works!

    Special thanks go to both @petrkotek (for initial support) and @foxel (for polishing it for this release) for making this possible. The ground work they did will make adding support for other new miot devices possible.

    For those who are interested in adding support to new MiOT devices can check out devtools directory in the git repository, which now hosts a tool to simplify the process. As always, contributions are welcome!

    This release adds support for the following new devices:

    • Air purifier 3/3H support (zhimi.airpurifier.mb3, zhimi.airpurifier.ma4)
    • Xiaomi Gateway devices (lumi.gateway.v3, basic support)
    • SmartMi Zhimi Heaters (zhimi.heater.za2)
    • Xiaomi Zero Fog Humidifier (shuii.humidifier.jsq001)

    Fixes & Enhancements:

    • Vacuum objects can now be queried for supported fanspeeds
    • Several improvements to Viomi vacuums
    • Roborock S6: recovery map controls
    • And some other fixes, see the full changelog!

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.4.8(Dec 12, 2019)

    This release adds support for the following new devices:

    • Xiaomi Mijia STYJ02YM vacuum (viomi.vacuum.v7)
    • Xiaomi Mi Smart Humidifier (deerma.humidifier.mjjsq)
    • Xiaomi Mi Fresh Air Ventilator (dmaker.airfresh.t2017)
    • Xiaomi Philips Desk Lamp RW Read (philips.light.rwread)
    • Xiaomi Philips LED Ball Lamp White (philips.light.hbulb)

    Fixes & Enhancements:

    • Improve Xiaomi Tinymu Smart Toilet Cover support
    • Remove UTF-8 encoding definition from source files
    • Azure pipeline for tests
    • Pre-commit hook to enforce black, flake8 and isort
    • Pre-commit hook to check-manifest, check for pypi-description, flake8-docstrings

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.4.7(Oct 27, 2019)

    This release adds support for the following new devices:

    • Widetech WDH318EFW1 dehumidifier (nwt.derh.wdh318efw1)
    • Xiaomi Xiao AI Smart Alarm Clock (zimi.clock.myk01)
    • Xiaomi Air Quality Monitor 2gen (cgllc.airmonitor.b1)
    • Xiaomi ZNCZ05CM EU Smart Socket (chuangmi.plug.hmi206)

    Fixes & Enhancements:

    • Air Humidifier: Parsing of the firmware version improved
    • Add travis build for python 3.7
    • Use black for source code formatting
    • Require python >=3.6

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.4.6(Oct 2, 2019)

    This release adds support for the following new devices:

    • Xiaomi Air Quality Monitor S1 (cgllc.airmonitor.s1)
    • Xiaomi Mi Dehumidifier V1 (nwt.derh.wdh318efw1)
    • Xiaomi Mi Roborock M1S and Mi Robot S1
    • Xiaomi Mijia 360 1080p camera (chuangmi.camera.ipc009)
    • Xiaomi Mi Smart Fan (zhimi.fan.za3, zhimi.fan.za4, dmaker.fan.p5)
    • Xiaomi Smartmi Pure Evaporative Air Humidifier (zhimi.humidifier.cb1)
    • Xiaomi Tinymu Smart Toilet Cover
    • Xiaomi 16 Relays Module

    Fixes & Enhancements:

    • Air Conditioning Companion: Add particular swing mode values of a chigo air conditioner
    • Air Humidifier: Handle poweroff exception on set_mode
    • Chuangmi IR controller: Add indicator led support
    • Chuangmi IR controller: Add discovery of the Xiaomi IR remote 2gen (chuangmi.remote.h102a03)
    • Chuangmi Plug: Fix set_wifi_led cli command
    • Vacuum: Add state 18 as "segment cleaning"
    • Device: Add easily accessible properties to DeviceError exception
    • Always import DeviceError exception
    • Require click version >=7
    • Remove pretty_cron and typing dependencies from requirements.txt

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.4.5(Mar 19, 2019)

    This release adds support for the following new devices:

    • Xiaomi Chuangmi Plug M3
    • Xiaomi Chuangmi Plug HMI205
    • Xiaomi Air Purifier Pro V7
    • Xiaomi Air Quality Monitor 2gen
    • Xiaomi Aqara Camera

    Fixes & Enhancements:

    • Handle "resp invalid json" error
    • Drop pretty_cron dependency
    • Make android_backup an optional dependency
    • Docs: Add troubleshooting guide for cross-subnet communications
    • Docs: Fix link in discovery.rst
    • Docs: Sphinx config fix
    • Docs: Token extraction for Apple users
    • Docs: Add a troubleshooting entry for vacuum timeouts
    • Docs: New method to obtain tokens
    • miio-extract-tokens: Allow extraction from Yeelight app db
    • miio-extract-tokens: Fix for devices without tokens

    API changes:

    • Air Conditioning Partner: Add swing mode 7 with unknown meaning
    • Air Conditioning Partner: Extract the return value of the plug_state request properly
    • Air Conditioning Partner: Expose power_socket property
    • Air Conditioning Partner: Fix some conversion issues
    • Air Humidifier: Add set_led method
    • Air Humidifier: Rename speed property to avoid a name clash at HA
    • Air Humidifier CA1: Fix led brightness command
    • Air Purifier: Add favorite level 17
    • Moonlight: Align signature of set_brightness_and_rgb
    • Moonlight: Fix parameters of the set_rgb api call
    • Moonlight: Night mode support and additional scenes
    • Vacuum: Add control for persistent maps, no-go zones and barriers
    • Vacuum: Add resume_zoned_clean() and resume_or_start() helper
    • Vacuum: Additional error descriptions
    • Yeelight Bedside: Fix set_name and set_color_temp

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.4.4(Dec 5, 2018)

    This release adds support for the following new devices:

    • Air Purifier 2s
    • Vacuums roborock.vacuum.e2 and roborock.vacuum.c1 (limited features, sound packs are known not to be working)

    Fixes & Enhancements:

    • AC Partner V3: Add socket support
    • AC Parner & AirHumidifer: improved autodetection
    • Cooker: fixed model confusion
    • Vacuum: add last_clean_details() to directly access the information from latest cleaning
    • Yeelight: RGB support
    • Waterpurifier: improved support

    API changes:

    • Vacuum: returning a list for clean_details() is deprecated and to be removed in the future.
    • Philips Moonlight: RGB values are expected and delivered as tuples instead of an integer

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.4.3(Nov 1, 2018)

  • 0.4.2(Oct 7, 2018)

    This release removes the version pinning for "construct" library as its API has been stabilized and we don't want to force our downstreams for our version choices. Another notable change is dropping the "mirobo" package which has been deprecated for a very long time, and everyone using it should have had converted to use "miio" already. Furthermore the client tools work now with click's version 7+.

    This release also changes the behavior of vacuum's got_error property to signal properly if an error has occured. The previous behavior was based on checking the state instead of the error number, which changed after an error to 'idle' after a short while.

    Source code(tar.gz)
    Source code(zip)
  • 0.4.1(Aug 21, 2018)

    This release provides support for some new devices, improved support of existing devices and various fixes.

    New devices:

    • Xiaomi Mijia Smartmi Fresh Air System Wall-Mounted (@syssi)
    • Xiaomi Philips Zhirui Bedside Lamp (@syssi)

    Improvements:

    • Vacuum: Support of multiple zones for app_zoned_cleaning added (@ciB89)
    • Fan: SA1 and ZA1 support added as well as various fixes and improvements (@syssi)
    • Chuangmi Plug V3: Measurement unit of the power consumption fixed (@syssi)
    • Air Humidifier: Strong mode property added (@syssi)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Jun 3, 2018)

    The highlight of this release is a crisp, unified and scalable command line interface called miiocli (thanks @yawor). Each supported device of this library is already integrated.

    New devices:

    • Xiaomi Mi Smart Electric Rice Cooker (@syssi)

    Improvements:

    • Unified and scalable command line interface (@yawor)
    • Air Conditioning Companion: Support for captured infrared commands added (@syssi)
    • Air Conditioning Companion: LED property fixed (@syssi)
    • Air Quality Monitor: Night mode added (@syssi)
    • Chuangi Plug V3 support fixed (@syssi)
    • Pedestal Fan: Improved support of both versions
    • Power Strip: Both versions are fully supported now (@syssi)
    • Vacuum: New commands app_goto_target and app_zoned_clean added (@ciB89)
    • Vacuum: Carpet mode support (@rytilahti)
    • WiFi Repeater: WiFi roaming and signal strange indicator added (@syssi)
    Source code(tar.gz)
    Source code(zip)
  • 0.3.9(Mar 27, 2018)

    This release provides support for some new devices, improved support of existing devices and various fixes.

    New devices:

    • Xiaomi Mi WiFi Repeater 2 (@syssi)
    • Xiaomi Philips Zhirui Smart LED Bulb E14 Candle Lamp (@syssi)

    Improvements:

    • Repr of the AirPurifierStatus fixed (@sq5gvm)
    • Chuangmi Plug V1, V2, V3 and M1 merged into a common class (@syssi)
    • Water Purifier: Some properties added (@syssi)
    • Air Conditioning Companion: LED status fixed (@syssi)
    • Air Conditioning Companion: Target temperature property renamed (@syssi)
    • Air Conditioning Companion: Swing mode property returns the enum now (@syssi)
    • Move some generic util functions from vacuumcontainers to utils module (@rytilahti)
    • Construct version bumped (@syssi)
    Source code(tar.gz)
    Source code(zip)
  • 0.3.8(Mar 10, 2018)

    Goodbye Python 3.4! This release marks end of support for python versions older than 3.5, paving a way for cleaner code and a nicer API for a future asyncio support. Highlights of this release:

    • Support for several new devices, improvements to existing devices and various fixes thanks to @syssi.

    • Firmware updates for vacuums (@rytilahti), the most prominent use case being installing custom firmwares (e.g. for rooting your device). Installing sound packs is also streamlined with a self-hosting server.

    • The protocol quirks handling was extended to handle invalid messages from the cloud (thanks @jschmer), improving interoperability for Dustcloud.

    New devices:

    • Chuangmi Plug V3 (@syssi)
    • Xiaomi Air Humidifier CA (@syssi)
    • Xiaomi Air Purifier V3 (@syssi)
    • Xiaomi Philips LED Ceiling Light 620mm (@syssi)

    Improvements:

    • Provide the mac address as property of the device info (@syssi)
    • Air Purifier: button_pressed property added (@syssi)
    • Generalize and move configure_wifi to the Device class (@rytilahti)
    • Power Strip: The wifi led and power price can be controlled now (@syssi)
    • Try to fix decrypted payload quirks if it fails to parse as json (@jschmer)
    • Air Conditioning Companion: Turn on/off and LED property added, load power fixed (@syssi)
    • Strict check for version equality of construct (@arekbulski)
    • Firmware update functionality (@rytilahti)
    Source code(tar.gz)
    Source code(zip)
Bad Apple printed out on the console with Python!

Bad Apple printed out on the console with Python!

CalvinLoke 186 Dec 1, 2022
Magnificent app which corrects your previous console command.

The Fuck The Fuck is a magnificent app, inspired by a @liamosaur tweet, that corrects errors in previous console commands. Is The Fuck too slow? Try t

Vladimir Iakovlev 75k Jan 2, 2023
Simple and convenient console ToDo list app

How do you handle remembering all that loads of plans you are going to realize everyday? Producing tons of paper notes, plastered all over the house?

null 3 Aug 3, 2022
Todo list console based application. Todo's save to a seperate file.

Todo list console based application. Todo's save to a seperate file.

null 1 Dec 24, 2021
Tncli - TON smart contract command line interface

Tncli TON smart contract command line interface State Not working, in active dev

Disintar IO 100 Dec 18, 2022
A command line tool (and Python library) for archiving Twitter JSON

A command line tool (and Python library) for archiving Twitter JSON

Documenting the Now 1.3k Dec 28, 2022
Python package with library and CLI tool for analyzing SeaFlow data

Seaflowpy A Python package for SeaFlow flow cytometer data. Table of Contents Install Read EVT/OPP/VCT Files Command-line Interface Configuration Inte

SeaFlow@UW 3 Nov 3, 2021
A webmining CLI tool & library for python.

minet is a webmining command line tool & library for python (>= 3.6) that can be used to collect and extract data from a large variety of web sources

médialab Sciences Po 165 Dec 17, 2022
Python library and command line tool for interacting with Bugzilla

python-bugzilla This package provides two bits: bugzilla python module for talking to a Bugzilla instance over XMLRPC or REST /usr/bin/bugzilla comman

Python Bugzilla Project 112 Nov 5, 2022
Shortcut-Maker - It is a tool that can be set to run any tool with a single command

Shortcut-Maker It is a tool that can be set to run any tool with a single command Coded by Dave Smith(Owner of Sl Cyber Warriors) Command list ?? pkg

Dave Smith 10 Sep 14, 2022
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
py-image-dedup is a tool to sort out or remove duplicates within a photo library

py-image-dedup is a tool to sort out or remove duplicates within a photo library. Unlike most other solutions, py-image-dedup intentionally uses an approximate image comparison to also detect duplicates of images that slightly differ in resolution, color or other minor details.

Markus Ressel 96 Jan 2, 2023
Python command line tool and python engine to label table fields and fields in data files.

Python command line tool and python engine to label table fields and fields in data files. It could help to find meaningful data in your tables and data files or to find Personal identifable information (PII).

APICrafter 22 Dec 5, 2022
Simple Python Library to display text with color in Python Terminal

pyTextColor v1.0 Introduction pyTextColor is a simple Python Library to display colorful outputs in Terminal, etc. Note: Your Terminal or any software

Siddhesh Chavan 1 Jan 23, 2022
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

fyst_14 2 Jul 15, 2022
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Timo Furrer 659 Dec 28, 2022
Python commandline tool for remembering linux/terminal commands

ehh Remember linux commands Commandline tool for remembering linux/terminal commands. It stores your favorite commands in ~/ehh.json in your homedir a

null 56 Nov 10, 2022
A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging.

A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging.

Clint E. 105 Dec 31, 2022