Releases: rytilahti/python-miio
0.5.5.2
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.
Implemented enhancements:
- Please add back the mapping parameter to
MiotDevice
constructor #982
Fixed bugs:
- Missing dependency: pyyaml #986
Merged pull requests:
0.5.5.1
0.5.5
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.
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 s...
0.5.4
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)
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:
- Add deerma.humidifier.jsq1 support #856 (syssi)
- Fix CLI of the PTC support (dmaker.airfresh.t2017) #855 (syssi)
- Fix payload of all dmaker.airfresh.t2017 toggles #854 (syssi)
- Fix fan speed property of the dmaker.fan.p11 #852 (iquix)
- Initial support for lumi.curtain.hagl05 #851 (in7egral)
- Add basic dmaker.fan.p11 support #850 (syssi)
- Vacuum: Implement TUI for the manual mode #845 (rnovatorov)
- Throwing GatewayException in get_illumination #831 (javicalle)
- improve poetry usage documentation #830 (rytilahti)
- Correct importlib_metadata python_version bounds #828 (jonringer)
- Remove __json__ boilerplate code from all status containers #827 (rytilahti)
- Add basic support for yunmi.waterpuri.lx9 and lx11 #826 (zhangjingye03)
- Add basic support for xiaomi.aircondition.mc1, mc2, mc4, mc5 #825 (zhangjingye03)
- Bump cryptography dependency to new major version #824 (rytilahti)
- Add support for dmaker.fan.p9 and dmaker.fan.p10 #819 (swim2sun)
- Add support for lumi.acpartner.mcn02 #809 (EugeneLiu)
- Add consumable status to viomi vacuum #805 (titilambert)
- Add zhimi.airfresh.va4 support #795 (syssi)
- Fix zhimi.airfresh.va2 temperature #794 (syssi)
- Make EnumType default to incasesensitive for cli tool #790 (rytilahti)
- Rename Mopping to VacuumingAndMopping #785 (rytilahti)
- Loosen pinned versions #781 (rytilahti)
- Improve documentation presentation #777 (rytilahti)
- Move raw_id from Vacuum to the Device base class #776 (rytilahti)
0.5.3
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)
Implemented enhancements:
- Vacuum: Add water volume setting (s5 max) #773 (rytilahti)
- improve gateway light class #770 (starkillerOG)
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:
- Remove labeler as it doesn't work as expected #774 (rytilahti)
- Add support for zhimi.humidifier.ca4 (miot) #772 (Toxblh)
- add "lumi.acpartner.v3" since it also works with this code #769 (starkillerOG)
- Add automatic labeling for PRs #768 (rytilahti)
- Add --version to miiocli #767 (rytilahti)
- Add preliminary issue templates #766 (rytilahti)
- Create separate API doc pages per module #765 (rytilahti)
- Add sphinxcontrib.apidoc to doc builds to keep the API index up-to-date #764 (rytilahti)
- Resume zoned clean from error state #763 (r4nd0mbr1ck)
- Allow alternative timezone format seen in Xioawa E25 #760 (rytilahti)
- Fix readthedocs build after poetry convert #755 (rytilahti)
- Add retries to discovery requests #754 (rytilahti)
- AirPurifier MIoT: round temperature #753 (petrkotek)
- chuangmi_camera: Improve home monitoring support #751 (impankratov)
0.5.2.1: A quick minor fix for vacuum gen1 fan speed detection.
0.5.2
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
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:
- Use "get_properties" instead of "get_prop" for miot devices #745 (rytilahti)
- viomi: add ability to change the mopping pattern #744 (rytilahti)
- fan: Ability to disable delayed turn off functionality #741 (insajd)
- Gateway: Add control commands to Plug #737 (starkillerOG)
- gateway: cleanup SensorHT and Plug class #735 (starkillerOG)
- Add "enable_telnet" to gateway #734 (starkillerOG)
- prevent errors on "lumi.gateway.mieu01" #732 (starkillerOG)
- Moved access to discover message attribute inside 'if message is not None' statement #731 (jthure)
- Add AqaraSmartBulbE27 support #729 (starkillerOG)
- Gateway: add name + model property to subdevice & add loads of subdevices #724 (starkillerOG)
- Add gentle mode for Roborock E2 #723 (tribut)
- gateway: add model property & implement SwitchOneChannel #722 (starkillerOG)
- Add support for fanspeeds of Roborock E2 (E20/E25) #718 (tribut)
- add AqaraWallOutlet support #717 (starkillerOG)
- Add new device type mappings, add note about 'used_for_public' #713 (starkillerOG)
0.5.1
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 #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
0.5.0.1 - Fix packaging
Due to a mistake during the release process, some changes were completely left out from the release.
This release simply bases itself on the current master to fix that.
0.5.0 - MiOT support is here!
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!