Tags: rytilahti/python-miio
Tags
Release 0.6.0.dev0 This is a pre-release for 0.6.0 to make the current state of the library available via PyPI for testing and development, and is not yet ready for end users. There are several breaking changes as detailed in the PRs below, but for most library users, the most visible change being that the integrations have moved into their own packages under `miio.integrations` instead being available under the main package. Instead of directly importing the wanted implementation class, you can now use `DeviceFactory` to construct an instance. This release is a huge with over 200 pull requests with 364 files changed, including 13748 insertions and 5114 deletions. It is also the largest release in terms of device support, as it adds support for _all_ miot/miotspec devices using the genericmiot integration. This is a big change in how the library was originally designed, as these devices will require downloading externally hosted specification files to function. These files are downloaded automatically when the device is used for the first time and cached for some time for later invocations. The major highlights of this release include: - Introspectable interfaces for accessing supported features (status(), sensors(), settings(), actions()) that will allow downstream users (like homeassistant) to support devices without hardcoding details in their codebases. - Generic support for all locally controllable, modern miot devices (using genericmiot integration, `miiocli genericmiot`). - Factory method for creating device instances instead of requiring to hardcode them (see `DeviceFactory`). - miio and miot simulators to allow development without having access to devices. This was used to create the miot support and might be useful for other developers. There are plenty of more in this release, so huge thanks to everyone who has contributed to this release and my apologies that it has taken so long to prepare this. I am hoping that we will get the release blockers fixed in a timely manner to make these new improvements available for everyone without having to use the git version. Help is needed to add the metadata required for the introspectable interfaces to all existing integrations, see https://python-miio.readthedocs.io/en/latest/contributing.html#status-containers and its subsections, if you are looking to contribute. Otherwise, feel free to test and report any issues, so that we can get those fixed for the 0.6.0! :-) **Note: the current homeassistant integration requires major refactoring effort to make use of the new interfaces, so this release will not be directly useful for most of the users until that work is done. This release aims to unblock other homeassistant PRs that have been pending for a long time.**
Release 0.5.12 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](0.5.11...0.5.12) **Breaking changes:** - Require click8+ \(API incompatibility on result\_callback\) [\#1378](#1378) (@Sir-Photch) - Move yeelight to integrations.light package [\#1367](#1367) (@rytilahti) - Move humidifier implementations to miio.integrations.humidifier package [\#1365](#1365) (@rytilahti) - Move airpurifier impls to miio.integrations.airpurifier package [\#1364](#1364) (@rytilahti) **Implemented enhancements:** - Implement fetching device tokens from the cloud [\#1460](#1460) (@rytilahti) - Implement push notifications for gateway [\#1459](#1459) (@starkillerOG) - Add soundpack install support for vacuum/dreame [\#1457](#1457) (@GH0st3rs) - Improve gateway get\_devices\_from\_dict [\#1456](#1456) (@starkillerOG) - Improved fanspeed mapping for Roborock S7 MaxV [\#1454](#1454) (@arthur-morgan-1) - Add push server implementation to enable event handling [\#1446](#1446) (@starkillerOG) - Add yeelink.light.color7 for yeelight [\#1426](#1426) (@rytilahti) - vacuum/roborock: Allow custom timer ids [\#1423](#1423) (@rytilahti) - Add fan speed presets to VacuumInterface [\#1405](#1405) (@2pirko) - Add device\_id property to Device class [\#1384](#1384) (@starkillerOG) - Add common interface for vacuums [\#1368](#1368) (@2pirko) - roborock: auto empty dustbin support [\#1188](#1188) (@craigcabrey) **Fixed bugs:** - Consolidate supported models for class and instance properties [\#1462](#1462) (@rytilahti) - fix lumi.plug.mmeu01 ZNCZ04LM [\#1449](#1449) (@starkillerOG) - Add quirk fix for double-oh values [\#1438](#1438) (@rytilahti) - Use result\_callback \(click8+\) in roborock integration [\#1390](#1390) (@DoganM95) - Retry on error code -9999 [\#1363](#1363) (@rytilahti) - Catch exceptions during quirk handling [\#1360](#1360) (@rytilahti) - Use devinfo.model for unsupported model warning [\#1359](#1359) (@MPThLee) **New devices:** - Add support for Xiaomi Smart Standing Fan 2 Pro \(dmaker.fan.p33\) [\#1467](#1467) (@dainnilsson) - add zhimi.airpurifier.amp1 support [\#1464](#1464) (@dsh0416) - roborock: Add support for Roborock G10S \(roborock.vacuum.a46\) [\#1437](#1437) (@rytilahti) - Add support for Smartmi Air Purifier \(zhimi.airpurifier.za1\) [\#1417](#1417) (@julian-klode) - Add zhimi.airp.rmb1 support [\#1402](#1402) (@jedziemyjedziemy) - Add zhimi.airp.vb4 support \(air purifier 4 pro\) [\#1399](#1399) (@rperrell) - Add support for dreame.vacuum.p2150o [\#1382](#1382) (@icepie) - Add support for Air Purifier 4 \(zhimi.airp.mb5\) [\#1357](#1357) (@MPThLee) - Support for Xiaomi Vaccum Mop 2 Ultra and Pro+ \(dreame\) [\#1356](#1356) (@2pirko) **Documentation updates:** - Various documentation cleanups [\#1466](#1466) (@rytilahti) - Remove docs for now-removed mi{ceil,plug,eyecare} cli tools [\#1465](#1465) (@rytilahti) - Fix outdated vacuum mentions in README [\#1442](#1442) (@rytilahti) - Update troubleshooting to note discovery issues with roborock.vacuum.a27 [\#1414](#1414) (@golddragon007) - Add cloud extractor for token extraction to documentation [\#1383](#1383) (@NiRi0004) **Merged pull requests:** - Mark zhimi.airp.mb3a as supported [\#1468](#1468) (@rytilahti) - Disable 3.11-dev builds on mac and windows [\#1461](#1461) (@rytilahti) - Fix doc8 regression [\#1458](#1458) (@rytilahti) - Disable fail-fast on CI tests [\#1450](#1450) (@rytilahti) - Mark roborock q5 \(roborock.vacuum.a34\) as supported [\#1448](#1448) (@rytilahti) - zhimi\_miot: Rename fan\_speed to speed [\#1439](#1439) (@syssi) - Add viomi.vacuum.v13 for viomivacuum [\#1432](#1432) (@rytilahti) - Add python 3.11-dev to CI [\#1427](#1427) (@rytilahti) - Add codeql checks [\#1403](#1403) (@rytilahti) - Update pre-commit hooks to fix black in CI [\#1380](#1380) (@rytilahti) - Mark chuangmi.camera.038a2 as supported [\#1371](#1371) (@rockyzhang) - Mark roborock.vacuum.c1 as supported [\#1370](#1370) (@rytilahti) - Use integration type specific imports [\#1366](#1366) (@rytilahti) - Mark dmaker.fan.p{15,18} as supported [\#1362](#1362) (@rytilahti) - Mark philips.light.sread2 as supported for philips\_eyecare [\#1355](#1355) (@rytilahti) - Use \_mappings for all miot integrations [\#1349](#1349) (@rytilahti)
Release 0.5.11 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](0.5.10...0.5.11) **Breaking changes:** - Remove deprecated integration classes [\#1343](#1343) (@rytilahti) **Implemented enhancements:** - Add PCAP file parser for protocol analysis [\#1331](#1331) (@rytilahti) **Fixed bugs:** - Fix bug for zhimi.fan.za5 resulting in user ack timeout [\#1348](#1348) (@saxel) **Deprecated:** - Deprecate wifi\_led in favor of led [\#1342](#1342) (@rytilahti) **Merged pull requests:** - Make sure miotdevice implementations define supported models [\#1345](#1345) (@rytilahti) - Add Viomi V2 \(viomi.vacuum.v6\) as supported [\#1340](#1340) (@rytilahti) - Mark Roborock S7 MaxV \(roborock.vacuum.a27\) as supported [\#1337](#1337) (@rytilahti) - Add pyupgrade to CI runs [\#1329](#1329) (@rytilahti)
Release 0.5.10 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](0.5.9.2...0.5.10) **Breaking changes:** - Split fan.py to vendor-specific fan integrations [\#1304](#1304) (@rytilahti) - Drop python 3.6 support [\#1263](#1263) (@rytilahti) **Implemented enhancements:** - Improve miotdevice mappings handling [\#1302](#1302) (@rytilahti) - airpurifier\_miot: force aqi update prior fetching data [\#1282](#1282) (@rytilahti) - improve gateway error messages [\#1261](#1261) (@starkillerOG) - yeelight: use and expose the color temp range from specs [\#1247](#1247) (@Kirmas) - Add Roborock S7 mop scrub intensity [\#1236](#1236) (@shred86) **New devices:** - Add support for zhimi.heater.za2 [\#1301](#1301) (@PRO-2684) - Dreame F9 Vacuum \(dreame.vacuum.p2008\) support [\#1290](#1290) (@peleccom) - Add support for Air Purifier 4 Pro \(zhimi.airp.va2\) [\#1287](#1287) (@ymj0424) - Add support for deerma.humidifier.jsq{s,5} [\#1193](#1193) (@supar) **Merged pull requests:** - Add roborock.vacuum.a23 to supported models [\#1314](#1314) (@rytilahti) - Move philips light implementations to integrations/light/philips [\#1306](#1306) (@rytilahti) - Move leshow fan implementation to integrations/fan/leshow/ [\#1305](#1305) (@rytilahti) - Split fan\_miot.py to vendor-specific fan integrations [\#1303](#1303) (@rytilahti) - Add chuangmi.remote.v2 to chuangmiir [\#1299](#1299) (@rytilahti) - Perform pypi release on github release [\#1298](#1298) (@rytilahti) - Print debug recv contents prior accessing its contents [\#1293](#1293) (@rytilahti) - Add more supported models [\#1292](#1292) (@rytilahti) - Add more supported models [\#1275](#1275) (@rytilahti) - Update installation instructions to use poetry [\#1259](#1259) (@rytilahti) - Add more supported models based on discovery.py's mdns records [\#1258](#1258) (@rytilahti)
Release 0.5.9.2 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](0.5.9.1...0.5.9.2) **Implemented enhancements:** - Add yeelink.bhf\_light.v2 and yeelink.light.lamp22 support [\#1250](#1250) ([FaintGhost](https://github.com/FaintGhost)) - Skip warning if the unknown model is reported on a base class [\#1243](#1243) ([rytilahti](https://github.com/rytilahti)) - Add emptying bin status for roborock s7+ [\#1190](#1190) ([rytilahti](https://github.com/rytilahti)) **Fixed bugs:** - Fix Roborock S7 fan speed [\#1235](#1235) ([shred86](https://github.com/shred86)) - gateway: remove click support for gateway devices [\#1229](#1229) ([starkillerOG](https://github.com/starkillerOG)) - mirobo: make sure config always exists [\#1207](#1207) ([rytilahti](https://github.com/rytilahti)) - Fix typo [\#1204](#1204) ([com30n](https://github.com/com30n)) **Merged pull requests:** - philips\_eyecare: add philips.light.sread1 as supported [\#1246](#1246) ([rytilahti](https://github.com/rytilahti)) - Add yeelink.light.color3 support [\#1245](#1245) ([Kirmas](https://github.com/Kirmas)) - Use codecov-action@v2 for CI [\#1244](#1244) ([rytilahti](https://github.com/rytilahti)) - Add yeelink.light.color5 support [\#1242](#1242) ([Kirmas](https://github.com/Kirmas)) - Add more supported devices to their corresponding classes [\#1237](#1237) ([rytilahti](https://github.com/rytilahti)) - Add zhimi.humidfier.ca4 as supported model [\#1220](#1220) ([jbouwh](https://github.com/jbouwh)) - vacuum: Add t7s \(roborock.vacuum.a14\) [\#1214](#1214) ([rytilahti](https://github.com/rytilahti)) - philips\_bulb: add philips.light.downlight to supported devices [\#1212](#1212) ([rytilahti](https://github.com/rytilahti))
This minor release only adds already known models pre-emptively to th… …e lists of supported models to avoid flooding the issue tracker on reports after the next homeassistant release. [Full Changelog](0.5.9...0.5.9.1) **Merged pull requests:** - Add known models to supported models [\#1202](#1202) ([rytilahti](https://github.com/rytilahti)) - Add issue template for missing model information [\#1200](#1200) ([rytilahti](https://github.com/rytilahti))
Besides enhancements and bug fixes, this release includes plenty of j… …anitoral 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](0.5.8...0.5.9) **Breaking changes:** - Move vacuums to self-contained integrations [\#1165](#1165) ([rytilahti](https://github.com/rytilahti)) - Remove unnecessary subclass constructors, deprecate subclasses only setting the model [\#1146](#1146) ([rytilahti](https://github.com/rytilahti)) - Remove deprecated cli tools \(plug,miceil,mieye\) [\#1130](#1130) ([rytilahti](https://github.com/rytilahti)) **Implemented enhancements:** - Upgrage install and pre-commit dependencies [\#1192](#1192) ([rytilahti](https://github.com/rytilahti)) - Add py.typed to the package [\#1184](#1184) ([rytilahti](https://github.com/rytilahti)) - airhumidifer\_\(mj\)jsq: Add use\_time for better API compatibility [\#1179](#1179) ([rytilahti](https://github.com/rytilahti)) - vacuum: return none on is\_water\_box\_attached if unsupported [\#1178](#1178) ([rytilahti](https://github.com/rytilahti)) - Add more supported vacuum models [\#1173](#1173) ([OGKevin](https://github.com/OGKevin)) - Reorganize yeelight specs file [\#1166](#1166) ([Kirmas](https://github.com/Kirmas)) - enable G1 vacuum for miiocli [\#1164](#1164) ([ghoost82](https://github.com/ghoost82)) - Add light specs for yeelight [\#1163](#1163) ([Kirmas](https://github.com/Kirmas)) - Add S5 MAX model to support models list. [\#1157](#1157) ([OGKevin](https://github.com/OGKevin)) - Use poetry-core as build-system [\#1152](#1152) ([rytilahti](https://github.com/rytilahti)) - Support for Xiaomi Mijia G1 \(mijia.vacuum.v2\) [\#867](#867) ([neturmel](https://github.com/neturmel)) **Fixed bugs:** - Fix test\_properties command logic [\#1180](#1180) ([Zuz666](https://github.com/Zuz666)) - Make sure all device-derived classes accept model kwarg [\#1143](#1143) ([rytilahti](https://github.com/rytilahti)) - Make cli work again for offline gen1 vacs, fix tests [\#1141](#1141) ([rytilahti](https://github.com/rytilahti)) - Fix `water_level` calculation for humidifiers [\#1140](#1140) ([bieniu](https://github.com/bieniu)) - fix TypeError in gateway property exception handling [\#1138](#1138) ([starkillerOG](https://github.com/starkillerOG)) - Do not get battery status for mains powered devices [\#1131](#1131) ([starkillerOG](https://github.com/starkillerOG)) **Deprecated:** - Deprecate roborock specific miio.Vacuum [\#1191](#1191) ([rytilahti](https://github.com/rytilahti)) **New devices:** - add support for smart pet water dispenser mmgg.pet\_waterer.s1 [\#1174](#1174) ([ofen](https://github.com/ofen)) **Documentation updates:** - Docs: Add workaround for file upload failure [\#1155](#1155) ([martin-kokos](https://github.com/martin-kokos)) - Add examples how to avoid model autodetection [\#1142](#1142) ([rytilahti](https://github.com/rytilahti)) - Restructure & improve documentation [\#1139](#1139) ([rytilahti](https://github.com/rytilahti)) **Merged pull requests:** - Add Air Purifier Pro H support [\#1185](#1185) ([pvizeli](https://github.com/pvizeli)) - Allow publish on test pypi workflow to fail [\#1177](#1177) ([rytilahti](https://github.com/rytilahti)) - Relax pyyaml version requirement [\#1176](#1176) ([rytilahti](https://github.com/rytilahti)) - create separate directory for yeelight [\#1160](#1160) ([Kirmas](https://github.com/Kirmas)) - Add workflow to publish packages on pypi [\#1145](#1145) ([rytilahti](https://github.com/rytilahti)) - Add tests for DeviceInfo [\#1144](#1144) ([rytilahti](https://github.com/rytilahti)) - Mark device\_classes inside devicegroupmeta as private [\#1129](#1129) ([rytilahti](https://github.com/rytilahti))
0.5.8 ----- * Add support for smart mi standing fan 3 (zhimi.fan.za5) * Fix usage of deprecated depth for airhumidifer [Full Changelog](0.5.7...0.5.8) **Implemented enhancements:** - vacuum: skip timezone call if there are no timers [\#1122](#1122) ([rytilahti](https://github.com/rytilahti)) **Closed issues:** - Smart Mi Standing fan 3 \(Xiaomi Pedestal Fan 3, zhimi.fan.za5\) [\#788](#788) **Merged pull requests:** - readme: add micloudfaker to list of related projects [\#1127](#1127) ([unrelentingtech](https://github.com/unrelentingtech)) - Update readme with section for related projects [\#1126](#1126) ([rytilahti](https://github.com/rytilahti)) - add lumi.plug.mmeu01 - ZNCZ04LM [\#1125](#1125) ([starkillerOG](https://github.com/starkillerOG)) - Do not use deprecated `depth` property [\#1124](#1124) ([bieniu](https://github.com/bieniu)) - vacuum: remove long-deprecated 'return\_list' for clean\_details [\#1123](#1123) ([rytilahti](https://github.com/rytilahti)) - deprecate Fan{V2,SA1,ZA1,ZA3,ZA4} in favor of model kwarg [\#1119](#1119) ([rytilahti](https://github.com/rytilahti)) - Add support for Smartmi Standing Fan 3 \(zhimi.fan.za5\) [\#1087](#1087) ([rnovatorov](https://github.com/rnovatorov))
This release improves several integrations (including yeelight, airpu… …rifier_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](0.5.6...0.5.7)
Release 0.5.6 [Full Changelog](0.5.5.2...0.5.6) **Implemented enhancements:** - RFC: Add a script to simplify finding supported properties for miio [\#919](#919) - Improve test\_properties output [\#1024](#1024) ([rytilahti](https://github.com/rytilahti)) - Relax zeroconf version requirement [\#1023](#1023) ([rytilahti](https://github.com/rytilahti)) - Add test\_properties command to device class [\#1014](#1014) ([rytilahti](https://github.com/rytilahti)) - Add discover command to miiocli [\#1013](#1013) ([rytilahti](https://github.com/rytilahti)) - Fix supported oscillation angles of the dmaker.fan.p9 [\#1011](#1011) ([syssi](https://github.com/syssi)) - Add additional operation mode of the deerma.humidifier.jsq1 [\#1010](#1010) ([syssi](https://github.com/syssi)) - Roborock S7: Parse history details returned as dict [\#1006](#1006) ([fettlaus](https://github.com/fettlaus)) **Fixed bugs:** - zeroconf 0.29.0 which is incompatible [\#1022](#1022) - Remove superfluous decryption failure for handshake responses [\#1008](#1008) - Skip pausing on Roborock S50 [\#1005](#1005) - Roborock S7 after Firmware Update 4.1.2-0928 - KeyError [\#1004](#1004) - No air quality value when aqi is 1 [\#958](#958) - Fix exception on devices with removed lan\_ctrl [\#1028](#1028) ([Kirmas](https://github.com/Kirmas)) - Fix start bug and improve error handling in walkingpad integration [\#1017](#1017) ([dewgenenny](https://github.com/dewgenenny)) - gateway: fix zigbee lights [\#1016](#1016) ([starkillerOG](https://github.com/starkillerOG)) - Silence unable to decrypt warning for handshake responses [\#1015](#1015) ([rytilahti](https://github.com/rytilahti)) - Fix set\_mode\_and\_speed mode for airdog airpurifier [\#993](#993) ([alexeypetrenko](https://github.com/alexeypetrenko)) **Closed issues:** - Add Dafang camera \(isa.camera.df3\) support [\#996](#996) - Roborock S7 [\#989](#989) - WalkingPad A1 Pro [\#797](#797) **Merged pull requests:** - Add basic dmaker.fan.1c support [\#1012](#1012) ([syssi](https://github.com/syssi)) - Always return aqi value \[Revert PR\#930\] [\#1007](#1007) ([bieniu](https://github.com/bieniu)) - Added S6 to skip pause on docking [\#1002](#1002) ([Sian-Lee-SA](https://github.com/Sian-Lee-SA)) - Added number of dust collections to CleaningSummary if available [\#992](#992) ([fettlaus](https://github.com/fettlaus)) - Reformat history data if returned as a dict/Roborock S7 Support \(\#989\) [\#990](#990) ([fettlaus](https://github.com/fettlaus)) - Add support for Walkingpad A1 \(ksmb.walkingpad.v3\) [\#975](#975) ([dewgenenny](https://github.com/dewgenenny))
PreviousNext