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 S5 Max getting / setting water flow mode doesn't work #1990

Open
cetygamer opened this issue Dec 10, 2024 · 0 comments
Open

Roborock S5 Max getting / setting water flow mode doesn't work #1990

cetygamer opened this issue Dec 10, 2024 · 0 comments
Labels

Comments

@cetygamer
Copy link

cetygamer commented Dec 10, 2024

Describe the bug

Roborock S5 Max getting / setting water flow mode doesn't work.

Version information:

  • OS: Linux
  • python-miio: 0.5.12

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

  • Model: roborock.vacuum.s5e
  • Hardware version: Linux
  • Firmware version: 4.1.2_1668

To Reproduce

Run waterflow command:

# miiocli roborockvacuum --ip IP --token TOKEN waterflow
Running command waterflow
Traceback (most recent call last):
  File "/usr/bin/miiocli", line 8, in <module>
    sys.exit(create_cli())
             ^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/miio/cli.py", line 66, in create_cli
    return cli(auto_envvar_prefix="MIIO")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/miio/click_common.py", line 51, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/miio/click_common.py", line 305, in wrap
    kwargs["result"] = func(*args, **kwargs)
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/miio/click_common.py", line 270, in command_callback
    return miio_command.call(miio_device, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/miio/click_common.py", line 217, in call
    return method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/miio/click_common.py", line 184, in _wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/miio/integrations/vacuum/roborock/vacuum.py", line 933, in waterflow
    return WaterFlow(self.send("get_water_box_custom_mode")[0])
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 0

Expected behavior

Water flow information is returned.

It seems that key 0 should be replaced with "water_box_mode", as I can retreive the information by running this raw_command:

# miiocli roborockvacuum --ip IP --token TOKEN raw_command get_water_box_custom_mode
Running command raw_command
{'water_box_mode': 203, 'distance_off': 205}
@cetygamer cetygamer added the bug label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant