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

Roborock S7 after Firmware Update 4.1.2-0928 - KeyError #1004

Closed
bbr111 opened this issue Apr 8, 2021 · 5 comments · Fixed by #1006
Closed

Roborock S7 after Firmware Update 4.1.2-0928 - KeyError #1004

bbr111 opened this issue Apr 8, 2021 · 5 comments · Fixed by #1006
Labels

Comments

@bbr111
Copy link

bbr111 commented Apr 8, 2021

Describe the bug
Error after Firmware Update.

Status, consumable_status, info and other commands are running.

Rebooting the device does not clear the issue.

Version information (please complete the following information):

  • OS: Linux Debian
  • python-miio: [Use miiocli --version or pip show python-miio]

Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:

  • Model: roborock.vacuum.a15
  • Hardware version: Linux
  • Firmware version: 4.1.2_0928

To Reproduce
Steps to reproduce the behavior:
1.

Expected behavior
A clear and concise description of what you expected to happen.

Console output
miiocli vacuum --ip <my_ip> --token <my_token> clean_history Running command clean_history

INFO:miio.cli:Debug mode active
DEBUG:miio.vacuum:Read stored sequence ids: {'seq': 36, 'manual_seq': 0}
Running command consumable_status
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x17P\xc6U\x00\x00\x0f%' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('1750c655')
ts = 1970-01-01 01:04:37
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 1750c655 with ts: 1970-01-01 01:04:37, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:<my_ip>:54321 >>: {'id': 37, 'method': 'get_consumable', 'params': []}
DEBUG:miio.miioprotocol:<my_ip>:54321 (ts: 1970-01-01 01:04:38, id: 37) << {'id': 37, 'result': [{'main_brush_work_time': 37961, 'side_brush_work_time': 37961, 'filter_work_time': 37961, 'filter_element_work_time': 0, 'sensor_dirty_time': 37504}], 'exe_time': 101}
<ConsumableStatus filter=10:32:41 filter_left=5 days, 19:27:19 main_brush=10:32:41 main_brush_left=12 days, 1:27:19 sensor_dirty=10:25:04 sensor_dirty_left=19:34:56 side_brush=10:32:41 side_brush_left=7 days, 21:27:19>

@bbr111 bbr111 added the bug label Apr 8, 2021
@rytilahti
Copy link
Owner

Hmm, I'm not seeing the error here, so this was probably fixed with #990?

@fettlaus
Copy link
Contributor

fettlaus commented Apr 8, 2021

It seems as if the response contains no records. Maybe try to create a record by letting the vacuum clean a small area and then try again. I just updated to 4.1.2-0928 as well and everything still works fine.

@rytilahti
Copy link
Owner

If that's the case, a stacktrace would be useful as this should still be fixed not to cause one if no entries are available :-)

@bbr111
Copy link
Author

bbr111 commented Apr 8, 2021

After a few short runs, i now have values in reading.

But still having trouble to get last_clean_details

DEBUG:miio.miioprotocol:Discovered 1750c655 with ts: 1970-01-01 00:43:23, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:<my_ip>:54321 >>: {'id': 52, 'method': 'get_clean_summary', 'params': []}
DEBUG:miio.miioprotocol:<my_ip>:54321 (ts: 1970-01-01 00:43:24, id: 52) << {'id': 52, 'result': {'clean_time': 40566, 'clean_area': 547730000, 'clean_count': 67, 'dust_collection_count': 0, 'records': [1617903508, 1617895704, 1617895008, 1617892263, 1617892245, 1617892195, 1617889898, 1617887908, 1617879405, 1617879300, 1617874935, 1617869934, 1617728779, 1617728768, 1617727674, 1617721661, 1617705508, 1617703035, 1617701904, 1617700284]}, 'exe_time': 101}
Traceback (most recent call last):
File "/usr/local/bin/miiocli", line 8, in
sys.exit(create_cli())
File "/usr/local/lib/python3.8/site-packages/miio/cli.py", line 45, in create_cli
return cli(auto_envvar_prefix="MIIO")
File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 59, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 280, in wrap
kwargs["result"] = func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 245, in command_callback
return miio_command.call(miio_device, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 193, in call
return method(*args, **kwargs)
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

@bbr111
Copy link
Author

bbr111 commented Apr 8, 2021

@fettlaus Thanks.

I tested the PR and it works for me.

@bbr111 bbr111 closed this as completed Apr 8, 2021
rytilahti added a commit that referenced this issue 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 added a commit that referenced this issue 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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants