Skip to content

Releases: rytilahti/python-miio

0.6.0.dev0: introspectable APIs and miot support

13 Mar 17:17
0665f5b
Compare
Choose a tag to compare

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.

Full Changelog

Breaking changes:

Implemented enhancements:

Read more

0.5.12

18 Jul 21:26
ecdabcd
Compare
Choose a tag to compare

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:

Fixed bugs:

New devices:

Documentation updates:

Merged pull requests:

0.5.11

07 Mar 22:33
6e5b153
Compare
Choose a tag to compare

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:

Implemented enhancements:

Fixed bugs:

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

Deprecated:

Merged pull requests:

0.5.10

17 Feb 23:34
5d22118
Compare
Choose a tag to compare

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:

Implemented enhancements:

New devices:

Merged pull requests:

0.5.9.2

14 Dec 21:01
df1745a
Compare
Choose a tag to compare

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:

0.5.9.1 - before the storm

02 Dec 00:03
5699aea
Compare
Choose a tag to compare

0.5.9.1 (2021-12-01)

This minor release only adds already known models pre-emptively to the lists of supported models to avoid flooding the issue tracker on reports after the next homeassistant release.

Full Changelog

Merged pull requests:

0.5.9

30 Nov 17:50
72cd423
Compare
Choose a tag to compare

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:

0.5.8

01 Sep 21:41
26795b5
Compare
Choose a tag to compare
  • 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:

0.5.7

13 Aug 16:58
81b51ab
Compare
Choose a tag to compare

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:

0.5.6

05 May 21:05
8fa59e7
Compare
Choose a tag to compare

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: