Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat history data if returned as a dict/Roborock S7 Support (#989) #990

Merged
merged 2 commits into from
Mar 25, 2021

Conversation

fettlaus
Copy link
Contributor

This should fix #989 by taking care of the new history format, the Roborock S7 is using. I also added some tests just in case. Couldn't find anything else not working with this vacuum so maybe that was all it takes for it to be supported.

I would've used some pull request template but it seems there isn't any so there is that.

Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the PR! Could you add the S7 to the list of supported devices in the README.md?

@rytilahti rytilahti merged commit 3244224 into rytilahti:master Mar 25, 2021
@vukisz
Copy link

vukisz commented Mar 26, 2021

When this will be available to test?

fettlaus added a commit to fettlaus/python-miio that referenced this pull request Mar 26, 2021
…lahti#989) (rytilahti#990)

* Reformat history data if returned as a dict/Roborock S7 Support (rytilahti#989)

* Added Roborock S7 to list of supported devices
@micke
Copy link

micke commented Apr 7, 2021

Would it be possible to release a new version of this library so that HA and others can update with support for the S7? 🥇

@rytilahti
Copy link
Owner

It hasn't been that much since the last release, so this will need to wait a bit as I want to have at least some WIP PRs merged before I spend some time to do release preparation.

There is also #992 that is related, but I haven't managed to test nor review that yet.

@StefanSarzio
Copy link

StefanSarzio commented Apr 8, 2021 via email

@rytilahti
Copy link
Owner

Yes, there has been no releases with this fix so far. After a new release it will still require a version bump to homeassistant (assuming you are using it), otherwise you could simply use the git version of the library in the meanwhile.

rytilahti added a commit that referenced this pull request May 5, 2021
[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))
@rytilahti rytilahti mentioned this pull request May 5, 2021
rytilahti added a commit that referenced this pull request May 5, 2021
[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))
@andybali
Copy link

andybali commented May 7, 2021

I update core today. Still Error by adding S7

xiaomi_miio: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 407, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 516, in async_device_update await task File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py", line 499, in update self.last_clean = self._device.last_clean_details() File "/usr/local/lib/python3.8/site-packages/miio/vacuum.py", line 381, in last_clean_details if not history.ids: File "/usr/local/lib/python3.8/site-packages/miio/vacuumcontainers.py", line 214, in ids return list(self.data[3]) KeyError: 3

@rytilahti
Copy link
Owner

Are you sure you are running 2021.5.1 that just got released today? The fix was confirmed to work in a homeassistant issue just few moments ago.

@vukisz
Copy link

vukisz commented May 8, 2021

After this update started working for me.

@andybali
Copy link

andybali commented May 8, 2021

Sorry, I am running 2021.5.0

xvlady pushed a commit to xvlady/python-miio that referenced this pull request May 9, 2021
…lahti#989) (rytilahti#990)

* Reformat history data if returned as a dict/Roborock S7 Support (rytilahti#989)

* Added Roborock S7 to list of supported devices
@Claustn
Copy link
Contributor

Claustn commented May 10, 2021

I have tried adding my S7 today, and I am getting this error, I can add my S4 without any issues

ERROR (MainThread) [homeassistant.components.xiaomi_miio.device] DeviceException during setup of xiaomi device with host

I am running core-2021.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Roborock S7
7 participants